Score:4

Ubuntu wakes up immediately from sleep after NVIDIA driver update

nl flag

I was using the Nouveau X.org driver for my graphics card, but today I changed the driver to nvidia-driver-470 (proprietary and tested) from the "additional drivers" program in Ubuntu. Everything is fine, except that whenever I suspend my laptop, it wakes up itself immediately.

Here is the output of the following command:

journalctl -b | grep suspend

the output is

Sep 24 22:26:38 minaHP ModemManager[1527]: <info>  [sleep-monitor] system is about to suspend
Sep 24 22:26:39 minaHP systemd[1]: Starting NVIDIA system suspend actions...
Sep 24 22:26:39 minaHP suspend[518255]: nvidia-suspend.service
Sep 24 22:26:39 minaHP logger[518255]: <13>Sep 24 22:26:39 suspend: nvidia-suspend.service
Sep 24 22:26:39 minaHP systemd[518256]: nvidia-suspend.service: Failed to execute command: No such file or directory
Sep 24 22:26:39 minaHP systemd[518256]: nvidia-suspend.service: Failed at step EXEC spawning /usr/bin/nvidia-sleep.sh: No such file or directory
Sep 24 22:26:39 minaHP systemd[1]: nvidia-suspend.service: Main process exited, code=exited, status=203/EXEC
Sep 24 22:26:39 minaHP systemd[1]: nvidia-suspend.service: Failed with result 'exit-code'.
Sep 24 22:26:39 minaHP systemd[1]: Failed to start NVIDIA system suspend actions.
Sep 24 22:26:39 minaHP systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
Sep 24 22:26:39 minaHP systemd[1]: systemd-suspend.service: Job systemd-suspend.service/start failed with result 'dependency'.
Sep 24 22:26:39 minaHP suspend[518257]: nvidia-resume.service
Sep 24 22:26:39 minaHP logger[518257]: <13>Sep 24 22:26:39 suspend: nvidia-resume.service

if anyone can tell me how to fix this without changing the driver back to Nouveau, it would be great.

Here is another command and its output if it is helpful

mina@minaHP:~$ systemctl status nvidia-suspend nvidia-hibernate nvidia-resume
● nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/lib/systemd/system/nvidia-suspend.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2021-09-24 22:26:39 EET; 12min ago
    Process: 518255 ExecStart=/usr/bin/logger -t suspend -s nvidia-suspend.service (code=exited, status=0/SUCCESS)
    Process: 518256 ExecStart=/usr/bin/nvidia-sleep.sh suspend (code=exited, status=203/EXEC)
   Main PID: 518256 (code=exited, status=203/EXEC)

Sep 24 22:26:39 minaHP systemd[1]: Starting NVIDIA system suspend actions...
Sep 24 22:26:39 minaHP suspend[518255]: nvidia-suspend.service
Sep 24 22:26:39 minaHP logger[518255]: <13>Sep 24 22:26:39 suspend: nvidia-suspend.service
Sep 24 22:26:39 minaHP systemd[518256]: nvidia-suspend.service: Failed to execute command: No such file or directory
Sep 24 22:26:39 minaHP systemd[518256]: nvidia-suspend.service: Failed at step EXEC spawning /usr/bin/nvidia-sleep.sh: No such file or directory
Sep 24 22:26:39 minaHP systemd[1]: nvidia-suspend.service: Main process exited, code=exited, status=203/EXEC
Sep 24 22:26:39 minaHP systemd[1]: nvidia-suspend.service: Failed with result 'exit-code'.
Sep 24 22:26:39 minaHP systemd[1]: Failed to start NVIDIA system suspend actions.

● nvidia-hibernate.service - NVIDIA system hibernate actions
     Loaded: loaded (/lib/systemd/system/nvidia-hibernate.service; enabled; vendor preset: enabled)
     Active: inactive (dead)

● nvidia-resume.service - NVIDIA system resume actions
     Loaded: loaded (/lib/systemd/system/nvidia-resume.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2021-09-24 22:26:39 EET; 12min ago
    Process: 518257 ExecStart=/usr/bin/logger -t suspend -s nvidia-resume.service (code=exited, status=0/SUCCESS)
    Process: 518258 ExecStart=/usr/bin/nvidia-sleep.sh resume (code=exited, status=203/EXEC)
   Main PID: 518258 (code=exited, status=203/EXEC)

Sep 24 22:26:39 minaHP systemd[1]: Starting NVIDIA system resume actions...
Sep 24 22:26:39 minaHP suspend[518257]: nvidia-resume.service
Sep 24 22:26:39 minaHP logger[518257]: <13>Sep 24 22:26:39 suspend: nvidia-resume.service
Sep 24 22:26:39 minaHP systemd[518258]: nvidia-resume.service: Failed to execute command: No such file or directory
Sep 24 22:26:39 minaHP systemd[518258]: nvidia-resume.service: Failed at step EXEC spawning /usr/bin/nvidia-sleep.sh: No such file or directory
Sep 24 22:26:39 minaHP systemd[1]: nvidia-resume.service: Main process exited, code=exited, status=203/EXEC
Sep 24 22:26:39 minaHP systemd[1]: nvidia-resume.service: Failed with result 'exit-code'.
Sep 24 22:26:39 minaHP systemd[1]: Failed to start NVIDIA system resume actions.
BeastOfCaerbannog avatar
ca flag
Try changing your driver through *Additional Drivers* to a previous one that works. Follow the steps shown in [this answer](https://askubuntu.com/a/1345212/618353).
Score:1
sy flag

These errors appear cause you have to install NVIDIA-{suspend/hibernate/resume} services.

Something like this:

sudo install /usr/share/doc/NVIDIA_GLX-1.0/samples/systemd/nvidia-suspend.service /etc/systemd/system
sudo install /usr/share/doc/NVIDIA_GLX-1.0/samples/systemd/nvidia-hibernate.service /etc/systemd/system
sudo install /usr/share/doc/NVIDIA_GLX-1.0/samples/systemd/nvidia-resume.service /etc/systemd/system
sudo install /usr/share/doc/NVIDIA_GLX-1.0/samples/systemd/nvidia /lib/systemd/system-sleep
sudo install /usr/share/doc/NVIDIA_GLX-1.0/samples/systemd/nvidia-sleep.sh /usr/bin

The NVIDIA systemd services then need to be enabled:

sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service

Reinstalling the NVIDIA driver should help.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.