View previous topic :: View next topic |
Author |
Message |
andi456 Apprentice
Joined: 06 Mar 2005 Posts: 217 Location: Germany
|
Posted: Fri Sep 20, 2024 7:38 pm Post subject: 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. |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2802
|
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 |
|
|
|
|
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
|
|