The laptop instantly wakes up from suspension after installing NVIDIA

Hi.

After installing the Nvidia driver from rpm-fusion, I can’t suspend my laptop. It was instantly awake after I hit the suspend button.

After some research, I concluded that I need to install xorg-x11-drv-nvidia-power according to Howto/NVIDIA - RPM Fusion.

However, I got conflicting requests which I solved by running dnf remove *nvidia*, then dnf --refresh install akmod-nvidia xorg-x11-drv-nvidia-cuda. According to this comment Can’t install NVIDIA driver due to “conflicting requests” - Ask Fedora

Now, I have different Nvidia installations:

❯ dnf list installed \*nvidia\*
Installed Packages
akmod-nvidia-470xx.x86_64                                   3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-470xx-6.0.12-300.fc37.x86_64.x86_64             3:470.161.03-1.fc37             @@commandline
kmod-nvidia-470xx-6.0.15-300.fc37.x86_64.x86_64             3:470.161.03-1.fc37             @@commandline
nvidia-gpu-firmware.noarch                                  20221214-145.fc37               @updates
nvidia-persistenced.x86_64                                  3:525.60.11-1.fc37              @rpmfusion-nonfree-nvidia-driver
nvidia-settings-470xx.x86_64                                3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver
nvidia-texture-tools.x86_64                                 2.1.2-3.fc36                    @fedora
xorg-x11-drv-nvidia-470xx.x86_64                            3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-470xx-cuda.x86_64                       3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-470xx-cuda-libs.i686                    3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-470xx-cuda-libs.x86_64                  3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-470xx-kmodsrc.x86_64                    3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-470xx-libs.i686                         3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-470xx-libs.x86_64                       3:470.161.03-1.fc37             @rpmfusion-nonfree-nvidia-driver

After reinstalling with xorg-x11-drv-nvidia-power compatibility:

~
❯ dnf list installed \*nvidia\*
Installed Packages
akmod-nvidia.x86_64                                      3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.0.15-300.fc37.x86_64.x86_64                3:525.60.11-1.fc37                 @@commandline
nvidia-persistenced.x86_64                               3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                                   3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                               3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64                          3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686                       3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                     3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                       3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                            3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                          3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64                         3:525.60.11-1.fc37                 @rpmfusion-nonfree-nvidia-driver

All went well, but I got nvidia-powerd.service failed to start. Some people in the forum said it is safe to ignore because it is meant to be that way with the older card.

However, I am still not able to suspend my laptop. It awakes instantly.

Any help will be greatly appreciated. I don’t want to power off and on just to leave my laptop for minutes.

Thanks in advance.

OS: Fedora release 37 (Thirty Seven) x86_64
Host: 80TU Lenovo ideapad 310-14IKB
Kernel: 6.0.15-300.fc37.x86_64
Packages: 2461 (rpm), 36 (flatpak)
Shell: zsh 5.9
Resolution: 1920x1080
DE: GNOME 43.2
WM: Mutter
WM Theme: Adwaita
Theme: Adwaita [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: zellij-v0.34.4
CPU: Intel i5-7200U (4) @ 3.100GHz
GPU: NVIDIA GeForce 920MX
GPU: Intel HD Graphics 620
Memory: 3377MiB / 11864MiB

One package you removed that is mandatory for nvidia is nvidia-gpu-firmware. Please reinstall it so the boot process can properly configure the nvidia GPU.

Otherwise it looks like you now have the proper drivers installed and after the firmware is reinstalled the system should work properly.

Actually, it is my understanding that the nvidia-powerd service is intended for use with laptops and not for use with desktops, which would explain the missunderstanding of those providing advice. On desktops the error is really just a warning and not an error of note. On laptops with dual GPU it should be heeded.

Try this to see if the proper services are running for suspend to work.
systemctl status nvidia-{hibernate,resume,suspend}.service

I have installed nvidia-gpu-firmware:

~ 
❯ sudo dnf list installed \*nvidia\*
Installed Packages
akmod-nvidia.x86_64                       3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.0.15-300.fc37.x86_64.x86_64 3:525.60.11-1.fc37 @@commandline
nvidia-gpu-firmware.noarch                20221214-145.fc37  @updates
nvidia-persistenced.x86_64                3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                    3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64           3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686        3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686             3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64           3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64          3:525.60.11-1.fc37 @rpmfusion-nonfree-nvidia-driver

But after reboting my laptop twice, I still get this error:

~ took 2s 
❯ sudo systemctl start nvidia-powerd.service
[sudo] password for user: 
Job for nvidia-powerd.service failed because the control process exited with error code.
See "systemctl status nvidia-powerd.service" and "journalctl -xeu nvidia-powerd.service" for details.

~ took 3s 
❯ sudo systemctl status nvidia-powerd.service
× nvidia-powerd.service - nvidia-powerd service
     Loaded: loaded (/usr/lib/systemd/system/nvidia-powerd.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Thu 2022-12-29 04:49:31 WIB; 10s ago
    Process: 4757 ExecStart=/usr/bin/nvidia-powerd (code=exited, status=1/FAILURE)
   Main PID: 4757 (code=exited, status=1/FAILURE)
        CPU: 5ms

Dec 29 04:49:31 machine systemd[1]: Starting nvidia-powerd.service - nvidia-powerd service...
Dec 29 04:49:31 machine /usr/bin/nvidia-powerd[4757]: nvidia-powerd version:1.0(build 1)
Dec 29 04:49:31 machine /usr/bin/nvidia-powerd[4757]: SBIOS support not found for NVPCF GET_SUPPORTED function
Dec 29 04:49:31 machine /usr/bin/nvidia-powerd[4757]: No matching GPU found
Dec 29 04:49:31 machine /usr/bin/nvidia-powerd[4757]: Failed to initialize RM Client
Dec 29 04:49:31 machine systemd[1]: nvidia-powerd.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 04:49:31 machine systemd[1]: nvidia-powerd.service: Failed with result 'exit-code'.
Dec 29 04:49:31 machine systemd[1]: Failed to start nvidia-powerd.service - nvidia-powerd service.

Am I missing something?

Thanks a lot for the help, Jeff.

No, you are not missing anything.
What is the result of the systemctl command I asked about in the post above.
systemctl status nvidia-{hibernate,resume,suspend}.service

If only leaving the laptop for a few minutes it may be just as well to simply lock the screen. That provides just as much security as suspending, though it is a little more demanding of power.

❯ systemctl status nvidia-{hibernate,resume,suspend}.service
○ nvidia-hibernate.service - NVIDIA system hibernate actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-hibernate.service; enabled; preset: enabled)
     Active: inactive (dead)

○ nvidia-resume.service - NVIDIA system resume actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-resume.service; enabled; preset: enabled)
     Active: inactive (dead)

Dec 29 04:55:15 machine systemd[1]: Starting nvidia-resume.service - NVIDIA system resume actions...
Dec 29 04:55:15 machine suspend[6281]: nvidia-resume.service
Dec 29 04:55:15 machine logger[6281]: <13>Dec 29 04:55:15 suspend: nvidia-resume.service
Dec 29 04:55:15 machine systemd[1]: nvidia-resume.service: Deactivated successfully.
Dec 29 04:55:15 machine systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.

○ nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-suspend.service; enabled; preset: enabled)
     Active: inactive (dead)

Dec 29 04:55:07 machine systemd[1]: Starting nvidia-suspend.service - NVIDIA system suspend actions...
Dec 29 04:55:07 machine suspend[5933]: nvidia-suspend.service
Dec 29 04:55:07 machine logger[5933]: <13>Dec 29 04:55:07 suspend: nvidia-suspend.service
Dec 29 04:55:08 machine systemd[1]: nvidia-suspend.service: Deactivated successfully.
Dec 29 04:55:08 machine systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.

If only leaving the laptop for a few minutes it may be just as well to simply lock the screen. That provides just as much security as suspending, though it is a little more demanding of power.

I never switch off my laptop. Because I use it daily. So it only goes off when I go vacation. The suspend feature is huge necessity for me.

Turns out, after switching back to X11 I can suspend my laptop without any issue.

I never realize that I am on Wayland. Because right after NVIDIA installation, the Wayland button for login is disabled. Maybe after some update (because I update my machine daily) I can log in with Wayland without my consent. Thus crippling the suspension process.

Now I am wondering what If I switch to X11 without installing xorg-x11-drv-nvidia-power is the suspend issue will be gone? I don’t have time to try this. At least now I can suspend my laptop.

Note: I realize that I am on Wayland after I want to use an automatic time tracker such ActivityWatch. Most of them don’t work. Turns out I am on Wayland.