I’ve just added more memory to my system, sadly it didn’t help. But before suspend, I did have more than double my gpu memory as free space on system memory.
I’m at a loss to the cause of this issue.
This is probably obvious, but the issue disappears when Prime Intel (Power Saving Mode) is selected (normally I run the ‘Nvidia on-demand mode’). In the sys log below you can find several reboots:
Prime Intel boot (line 2) here suspend proceeds perfectly fine. This apparently does call the nvidia-suspend.service (line 3990) and nvidia-resume.service (line 4154) even though it hasn’t loaded the nvidia-drivers. Then I made the first bug report after which then I changed to Prime Nvidia (Performance mode) see line 9216.
Prime nvidia boot (line 10087) does show the same behaviour as reported before. Suspend isn’t working properly. As expected, the issue is not the ‘on-demand’ setting itself, but simlpy the nvidia-driver being loaded.
I’ve now also reproduced with 470.42.01, below is a new bug report:
In terms of behaviour, there was a small change: Now my screen turns black immediately upon loading the module, no flickering of the backlight as observed with 460/465 versions.
There’s now also more in the kernel log (of course also contained in the bug report):
So I distro-hopped from Elementary OS (Ubuntu variant) to Fedora and the issues disappeared for me. Decided to retry Elementary OS and the issue came back.
To finally fix this on my machine I uninstalled the nvidia driver deb packges and reinstall them using the NVIDIA-*.run install file instead and it worked. Now I’m running Elementary OS using nvidia without sleep-resume crashing.
Feels like whomever is packaging the nvidia-drivers for Ubuntu is doing something which doesn’t play nice with my laptop.
This is an interesting route to pursue, I to run on drivers installed via a PPA for Ubuntu variants. I’m not exactly clear on where to submit the bug report. Originally I expected that I had to report it to the organization that made the ppa:graphics-drivers/ppa but only 3 bugs have been made there in the past. Besides I get the issues also from the drivers that are packaged by the Ubuntu team itself as well. That is I get the problems also when using nvidia-graphics-drivers-470 maintained by the Ubuntu Developers (see for the 460 and 465). These have way more bug reports, and the team seems to respond.
Tried to switch to other driver versions in “Software and Updates” → “Additional drivers” - didn’t help (tried all available versions there). Also tried to install latest Nvidia driver from nvidea.com - didn’t help as well.
The only solution that worked for me, was to install nvidia-driver-450-server driver, but not from “Software and Updates” GUI, but from terminal, like that:
I’m also on Acer Aspire 7 with Nvidia GeForce GTX 1050, but with ubuntu 21.10.
I was able to solve it, as the way @alex21975 and @hdaniel mentioned, but with nvidia-driver-460-server:
Nowt the computer will not stuck on boot after suspend
but if I do
sudo service nvidia-suspend status
it will show
“Unit nvidia-suspend.service could not be found.”
Solving it with NVIDIA Suspend fix
still shows me
"
nvidia-suspend.service - NVIDIA system suspend actions
Loaded: loaded (/etc/systemd/system/nvidia-suspend.service; enabled; vendor preset: enabled)
Active: inactive (dead)
"
and the logs shows
kernel: snd_hda_codec_hdmi hdaudioC1D0: Unable to sync register 0x7f0800. -5
kernel: snd_hda_intel 0000:01:00.1: can't change power state from D3cold to D0 (config space inaccessible)
I found a kind of workaround. When the screen wakes from sleep (but goes black), use CTRL + ALT + F2 to switch to a terminal (terminal shows on the screen in a few seconds) and CTRL + ALT + F1 or F7 (depending on the system) to switch back to the graphical session. The screen will then work normally again (until the next time it goes to sleep).
The 495 driver seems to work, although this might be because I’ve tinkered around a lot when trying to fix previous driver versions. But I guess that it is worth trying the update. I do include some of my settings below, as those might be useful if the 495 driver is not working for you.
Getting the conformation on the installed driver.
user@device:~$ nvidia-smi
Tue Nov 9 09:58:24 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.44 Driver Version: 495.44 CUDA Version: 11.5 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Quadro M1000M Off | 00000000:01:00.0 On | N/A |
| N/A 52C P8 N/A / N/A | 259MiB / 4043MiB | 22% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1320 G /usr/lib/xorg/Xorg 158MiB |
| 0 N/A N/A 2710 G /usr/lib/xorg/Xorg 97MiB |
+-----------------------------------------------------------------------------+
Getting some of my settings listed (I had changed some of these while trying to change the memory handling at hibernation), see above.
I’ve also looked at the hibernate, suspend and resume services, which seem to be inactive but loaded.
user@device:~$ sudo service nvidia-suspend status
● nvidia-suspend.service - NVIDIA system suspend actions
Loaded: loaded (/etc/systemd/system/nvidia-suspend.service; enabled; vendor preset: enabled)
Active: inactive (dead)
nov 09 09:52:10 device systemd[1]: Starting NVIDIA system suspend actions...
nov 09 09:52:10 device suspend[6680]: nvidia-suspend.service
nov 09 09:52:10 device logger[6680]: <13>Nov 9 09:52:10 suspend: nvidia-suspend.service
nov 09 09:52:11 device systemd[1]: nvidia-suspend.service: Succeeded.
nov 09 09:52:11 device systemd[1]: Finished NVIDIA system suspend actions.
nov 09 09:53:06 device systemd[1]: Starting NVIDIA system suspend actions...
nov 09 09:53:06 device suspend[7975]: nvidia-suspend.service
nov 09 09:53:06 device logger[7975]: <13>Nov 9 09:53:06 suspend: nvidia-suspend.service
nov 09 09:53:07 device systemd[1]: nvidia-suspend.service: Succeeded.
nov 09 09:53:07 device systemd[1]: Finished NVIDIA system suspend actions.
user@device:~$ sudo service nvidia-hibernate status
● nvidia-hibernate.service - NVIDIA system hibernate actions
Loaded: loaded (/etc/systemd/system/nvidia-hibernate.service; enabled; vendor preset: enabled)
Active: inactive (dead)
user@device:~$ sudo service nvidia-resume status
● nvidia-resume.service - NVIDIA system resume actions
Loaded: loaded (/etc/systemd/system/nvidia-resume.service; enabled; vendor preset: enabled)
Active: inactive (dead)
nov 09 09:52:39 device systemd[1]: Starting NVIDIA system resume actions...
nov 09 09:52:39 device suspend[7377]: nvidia-resume.service
nov 09 09:52:39 device logger[7377]: <13>Nov 9 09:52:39 suspend: nvidia-resume.service
nov 09 09:52:39 device systemd[1]: nvidia-resume.service: Succeeded.
nov 09 09:52:39 device systemd[1]: Finished NVIDIA system resume actions.
nov 09 09:54:07 device systemd[1]: Starting NVIDIA system resume actions...
nov 09 09:54:07 device suspend[8614]: nvidia-resume.service
nov 09 09:54:07 device logger[8614]: <13>Nov 9 09:54:07 suspend: nvidia-resume.service
nov 09 09:54:07 device systemd[1]: nvidia-resume.service: Succeeded.
nov 09 09:54:07 device systemd[1]: Finished NVIDIA system resume actions.
@generix weirdly enough, it didn’t only fix the reboot problem, but even the audio device pci problem was fixed. The second device had all ffs listed before. (I only have a single graphics card, but ever since the start the M1000M gets also recognized as a 940MX).