Plasma with nvidia won't wake from sleep

I know people always post this without any research, but I’ve tried everything I could think of and still can’t resolve it, and the behavior seems somewhat different from the posted issues. The system goes to sleep, and will not resume or respond at all, leaving me no option but to cut power and reboot. (i have not tried to ssh in to see if the system is still up.) I can’t ctl-alt-Fx into a tty, no change in indicators - nothing. Interestingly my open windows seems to be preserved on reboot.

I scrolled up journalctl* and saw it going to sleep, and then it seems no messages til I boot again - nothing that obviously seemed like an error.

The system:

CPU: Ryzen 5
GPU: RTX 2060 (turing running 570.133.07)
Memory: 16gb of ram 32gb of swap
Kernel: 6.14.2 booting from GRUB into endeavourOS on btrfs (partitions and subvolumes done by installer onto a full nvme)
Desktop: Plasma 6.3.4

I have verified that Vreg_PreserveVideoMemoryAllocations=1 is set as well as set the temporary path to /var/tmp

I have created /etc/modprobe.d/nvidia-power-management.conf containing:

options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp
options nvidia_drm modeset=1
options nvidia_drm fbdev=1
options nvidia NVreg_EnableGpuFirmware=0

Most of the guides for fixing it say you have to run “mkinitcpio” to load the module but it seems endeavourOS uses dracut instead to load modules so I ran “dracut-rebuild” (i suspect this last bit may be where I’ve gone wrong) and rebooted to the same issue. Anyways thanks in advance for any help y’all can give me. This is the only issue I’ve encountered in an otherwise amazing experience!

*edit: accidentally typed dmesg instead of journalctl

Did you use this manual?

Indeed, which is what brings me here. I believe my nvidia-power-management.conf both loads the nvidia kernel module and moves the unnamed temporary files to a filesystem of a type and size that can handle them. I also included the options recommended on this board. Systemctl tells me all the necessary services are enabled.
However, there’s clearly a delta between my belief and reality.

You may need also try

nvidia.NVreg_PreserveVideoMemoryAllocations=0

Edit: It should be set with 1 according to arch wiki

Edit: Are you on Wayland?

Are you a bot? Both of your responses recommend I do the things i said I tried already in the op. Yes I’m on Wayland.

No I’m not a bot. I have no idea what exactly you were following so i just asked if you followed the actual nvidia power management support pdf i posted and arch wiki?

My headline said I read the manual(in fact I edited it out bc it felt like snark from me when your response was essentially “rtfm”), my post described everything I tried. I followed the manual procedure to a T (unless I made a mistake in implementation) and additionally you can clearly see I included from the beginning the setting you mistyped in your second post. I guess I’m confused as to why you’re responding if you didn’t read my post, and don’t seem to have any domain-specific knowledge.

For those with similar hardware and problems, my hacky solution is probably going to be to make a script that kicks me to the login screen after a time, from which my system can wake up from sleep. If that gets too cumbersome I may see if things go better with systemd boot.

edit: LTS kernel also on my “to try” list

OMG what is wrong with people? My response was in no way tell you to RTFM. I was just trying to help by offering you the Nvidia’s documentation in case you hadn’t seen it. I am btw running btrfs with grub on Wayland with nvidia.

Good luck!

Now we’re getting somewhere! You’ve never had any issues waking from sleep? Are you using kde? (i’m assuming arch bc of where we’re at)

1 Like

Thanks for the link! So it seems this is just a sort of chronic issue that pops up between kernel and driver revisions. I suppose the nvidia forums are a more appropriate place for this discussion, I’ll keep looking over there and post any revelations here.

Yes i am using EOS Kde plasma with btrfs and grub on nvidia. I also am using btrfs-assistant, snapper-support, btrfsmaintenance, and grub-btrfs for booting with snapshots.

All i can tell you is this. It depends on the specific hardware and or software one is using. You have to try using power management settings and services and also without to see if the system can do it on it’s own also. There are many factors that can lead it to not working such as Bios settings. Is the UEFI Firmware (Bios) outdated? Also systemd updates have introduced changes related to freezing user sessions during sleep which can impact NVIDIA drivers. Sometimes it’s driver issues or kernel issues or conflicting software. I don’t have a one answer here’s how to fix it. You have to work through the problem trying different things until you figure out what works for your hardware. It may not necessarily be the same for someone else.

I have an Nvidia gpu you as well RTX 5080 and am using the nvidia-open drivers and I am using Gnome. My system does wake up from sleep/suspend by pressing a key on the keyboard and by pressing a slow press on the power button, but I have to do a bit more of testing with it. I don’t have any of the nvidia services enabled because the Archwiki tips/tricks says this.

  • While nvidia-resume.service is marked as required by NVIDIA, it can be optional, as its functionality is also provided by a systemd-sleep(8) hook (/usr/lib/systemd/system-sleep/nvidia) and the latter is invoked automatically. Note that GDM with Wayland however explicitly requires nvidia-resume.service to be enabled.

Are you using the nvidia-open or nvidia(propietary drivers), if the latter you may want to try the nvidia-open drivers, to see if it makes a difference.

And how do you wake your system up from sleep? If pressing a keyboard button doesn’t work, maybe try pressing the power button once a short press not long as long press shuts down the system. As I have found using a short press wakes the system up too from sleep.

How a reply comes across and how it makes you think or feel is most of the time not the case, as most people are just helpful to each other around here and this isn’t the Arch forums. Also don’t forget most people are just trying to be helpful, I actually appreciate when someone takes a time out of their day to respond to me even if it wasn’t exactly what I was hoping for.

2 Likes

I’m assuming it’s the open drivers bc I just installed the nvidia build on endeavourOS and that’s the current nvidia recomendation. But I’m not sure - modinfo nvidia gives:

filename: /lib/modules/6.14.2-arch1-1/extramodules/nvidia.ko.zst
alias: char-major-195-*
version: 570.133.07
supported: external
license: NVIDIA
firmware: nvidia/570.133.07/gsp_tu10x.bin
firmware: nvidia/570.133.07/gsp_ga10x.bin

Similarly, nvidia-smi doesn’t indicate open anywhere. Would I be seeing nvidia-open in my system somewhere if it was the open drivers? Where do I look?

I’ve tried waking with the keyboard and a short press, it just seems totally unresponsive. The keyboard was working just fine with xfce on vanilla arch* with nouveau driver - the main reason I did endeavour install is they have an nvidia build and the default de is wayland based. I was hoping they maybe had ironed out the nvidia/wayland kinks for me :sweat_smile: Wayland seems sensible and inevitable. Perhaps it’s X for me for a while longer yet, or find my perfect kernel/driver match for wayland.

*edit: with the lts kernel

pacman -Qs nvidia
If you get anything with “nvidia-open” then you are using the open drivers if not you are using the propietary drivers. The following link will also be useful as it explains how to use the EndeavourOS specific “nvidia-install” tool.

Wow, thanks! I did have the proprietary drivers installed. I think this must have been the default as I would have selected open given the choice - maybe its an old version of nvidia-install on the installer as it selected open automatically when I ran it again. It made a noticeable difference in rendering, but I still have my sleep issue.

I’m honestly beginning to suspect the motherboard - I’ve had other mysterious hardware-related issues with different installs on it and it seems it has been known to have sleep-related linux bugs (though the issue there was immediately wake on sleep) I’ll see if their workaround fixes my issue.

My kick to lock screen solution is acceptable enough as I’ll get a dark screen so perhaps that will have to do while I wait for a motherboard with known linux support(or at least sensor support and no famous issues) to arrive. Or maybe I can just admit to myself i’m never really gonna use those cuda cores and get an amd gpu.

Thanks again for the help! At the end of the day, this is why I’m on Linux - Im unlikely to have dug into modules and the init process so deeply unless I had a reason to.

I actually just checked and it seems there were two enabled by default which were these two.
nvidia-resume.service nvidia-suspend.service
Without enabling those two suspsend/sleep doesn’t work for me, when I enable them suspend/sleep works for me and waking up does too.