View previous topic :: View next topic |
Author |
Message |
andi456 Apprentice
Joined: 06 Mar 2005 Posts: 218 Location: Germany
|
Posted: Fri Sep 20, 2024 7:38 pm Post subject: [Solved] nvidia-drivers and suspend to RAM |
|
|
Hi,
my habit using sys-power/hibernate-script to suspend my main machine to RAM after a while in order to not let the computer run without reason, cannot be kept up, if I do not change some configuration, but I don't know exactly how
When issuing suspend to ram, the machine immediately returns back to power on and dmesg tells me the following about the reason why:
Code: |
NVRM: GPU 0000:06:00.0: PreserveVideoMemoryAllocations module parameter is set. System Power Management attempted without driver procfs suspend interface. Please refer to the 'Configuring Power Management Support' section in the driver README.
nvidia 0000:06:00.0: PM: pci_pm_suspend(): nvidia_isr_kthread_bh+0x560/0x810 [nvidia] returns -5
nvidia 0000:06:00.0: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -5
nvidia 0000:06:00.0: PM: failed to suspend: error -5
PM: Some devices failed to suspend, or early wake event detected
|
As far as I understand the README by nvidia, I've been lucky that s2ram has been working for so long, and now I have to somehow make suspend work via elogind, as I don't use systemd. Is there any documentation for that?
Kind regards.
Last edited by andi456 on Sat Sep 21, 2024 9:43 am; edited 1 time in total |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2806
|
Posted: Fri Sep 20, 2024 9:17 pm Post subject: |
|
|
The recent nvidia-drivers revbumps (-r1) had a one-time warning that you may have missed:
Code: | if [[ ${REPLACING_VERSIONS##* } ]] &&
ver_test ${REPLACING_VERSIONS##* } -lt 560.35.03-r1 # may get repeated
then
elog
elog "For suspend/sleep, 'NVreg_PreserveVideoMemoryAllocations=1' is now default"
elog "with this version of ${PN}. This is recommended (or required) by"
elog "major DEs especially with wayland but, *if* experience regressions with"
elog "suspend, try reverting to =0 in '${EROOT}/etc/modprobe.d/nvidia.conf'."
elog
elog "May notably be an issue when using neither systemd nor elogind to suspend."
elog
elog "Also, the systemd suspend/hibernate/resume services are now enabled by"
elog "default, and for openrc+elogind a similar hook has been installed."
fi | So you if you want to return to the previous behaviour and everything was fine "for you", then you can edit nvidia.conf to return to =0 then reboot.
As for elogind, `loginctl suspend` should work in theory (same as systemd). Not something I ever tried and most users been testing this using their DE's suspend/sleep button instead.
Alternatively, not familiar with hibernate-script, but in theory anything can be used if you can just make them call /usr/bin/nvidia-sleep.sh (takes suspend, hibernate, or resume as arguments) to do the same thing that elogind/systemd would be doing. I imagine calling sleep.sh resume may be difficult without some kind of "on resume" hooks w/ a daemon though.
Switching to =1 would be esp. needed if you ever plan to use wayland as resume otherwise (often) resullts in graphical corruption. Both Gnome and Plasma also recommend that this is set, which is why this is the new default. May matter less for simple setups. |
|
Back to top |
|
|
andi456 Apprentice
Joined: 06 Mar 2005 Posts: 218 Location: Germany
|
Posted: Sat Sep 21, 2024 9:42 am Post subject: |
|
|
Thanks for your quick answer. Indeed, I must have overlooked the new default in /etc/modprobe.d/nvidia.conf
I've set PreserveVideoMemoryAllocations back to 0 for now and will probably switch to the eloginctl method in the future, as the elogind-daemon is running anyway, although i use awesome wm. |
|
Back to top |
|
|
Frautoincnam Guru
Joined: 19 May 2017 Posts: 311
|
Posted: Sun Sep 22, 2024 5:29 pm Post subject: |
|
|
I had the same problem although using elogind and loginctl suspend/hibernate (openrc and X11).
I had to set NVreg_PreserveVideoMemoryAllocations=0 to get a display back when waking up from hibernation, but entering suspend/hibernate and waking up from it are much slower than before. I hope a future update will fix the problem, but I won't know when to go back to NVreg_PreserveVideoMemoryAllocations=1. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|