6

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.
1
  • Try changing your driver through Additional Drivers to a previous one that works. Follow the steps shown in this answer. Sep 27, 2021 at 9:09

1 Answer 1

5

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.

2
  • Those paths for the docs are not present on my system
    – Alkanshel
    Dec 8, 2023 at 22:01
  • @Alkanshel I'm on a different distro and installed through APT. The .service files were in /lib/systemd/system
    – Tyress
    Mar 6 at 11:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .