KDE + Wayland + Sleep, not better :-/

Hello Hello,

I’ve switched from x11 to Wayland, with an Nivida card …
No problem running the system, but, like x11, still have a lot of issue using Sleep/Hibernate.

In fact, it’s simple : IMPOSSIBLE to get back my desktop working when waking up from sleep…
Screen is frozen, greenish, garbage, and unusable. I’m always forced to switch to a TTY, and reboot…

in x11, I’ve got sometimes a black screen instead of wallpaper, sometimes everything fine.
So… Now, it’s worst.

I know Nvidia cards are still “problematics” but… If wayland is the future, there I’ve got a problem incomming :-/

Anybody has the same issues here ?
Any idea or solution ?
Thanks a lot !

And of course :
My inxi

https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks

Point 10.

Thanks, but … Whoops ! Totally forgot to say : already done :-/
Still having the same issues… Don’t know why.
Sorry, the problem is still present. :frowning:

Hello!

I have the same problem.

There doesn’t seem to be much information about this problem, even the Arch wiki says that the (possible) solution (https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend) might lack accuracy.
Also, or there’s too few people with this kind of problem, or nobody has found a true solution for this problem, and, if someone actually has one, they apparently haven’t shared it, or the problem is very hardware dependent (I seriously doubt this) or I don’t know what, but nothing points to something that actually solves the problem.

I personally tried that “solution” from the Arch wiki (and a few other things that didn’t work either), but it didn’t do anything (while the “solution” was active in my system at least).
The strange thing is that right after removing the configuration (I removed it because it apparently wasn’t doing anything anyway and I didn’t reboot the system after that), the “Sleep” function started “magically” “working” on Wayland (at least until now, this because I did that just a day ago and I haven’t rebooted the system since then)(I have put it to sleep twice until now), and I say “working” because the computer at least goes to sleep (before this, it just went to “sleep” and awoke itself immediately, making it impossible to put the thing to sleep).
I still have to deal with a totally freaking distorted interface after waking it up, but, at least I just have to logout and then login again and everything goes back to normal (better than nothing I guess).

I also tried these:

https://wiki.archlinux.org/title/Wayland#Requirements

but nothing seems to do anything.

There’s a pattern that I have noticed (as I been using my system with EOS since it exists), and that is that most of the time (at least until before a few months before this date) those functions worked just fine with “X11”, and they do work at least sporadically with Wayland (on my system at least, since a few months before today), then, when they don’t (not even with X11), it always happens after updating the Linux Kernel, and that makes me wonder if the solution has something to do with something in the Kernel itself, or at least with something connected to the kernel, also, considering that those functions sometimes work just fine (at least with X11), that some other times they kind of work and that other times they don’t work at all, that makes me wonder if maybe the “solution” suddenly “appears” there by “accident”, because they had something there that made those work and some other times they change that something or remove it and then it doesn’t work again.

In my case, those two functions haven’t worked as they should since like a couple of months ago, neither on X11 nor or Wayland.

I have an Nvidia GTX 1080 by the way.
I wonder if more recent models don’t have those issues. Can somebody tell me if that is the case?.
I have to say that at this point my system works just fine with Wayland (on KDE Plasma), but, even when the “Sleep” function works, after waking it up I am always greeted with a at least slightly distorted interface (usually it is totally distorted) and in the worst “days”, I do have to just turn the system off, because it doesn’t respond at all.

Does anybody else has this problem?
Does anybody have any other possible (viable) solutions?

I hope that this stuff gets a fix before X11 becomes obsolete.

Note: I guess you could try the “solution” I added and see if it works for you.

I had similar problems with KDE and Cinnamon. The only one that seems to work out of the box for me is Xfce - no additional Nvidia-specific settings.

Try creating:

## File: /etc/modprobe.d/nvidia-power-management.conf
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp

Thank for responding! :smiley:
Nope, that file doesn’t help when I try to put the computer to sleep, but it apparently fixes the distortion issue after the PC “wakes up” (which still happens immediately after putting it to sleep).

Update:
After seeing that the distortion was gone with the “nvidia-power-management.conf” file, I decided to also:

systemctl enable nvidia-suspend.service
systemctl enable nvidia-hibernate.service
systemctl enable nvidia-resume.service

And BOOM!!! after testing “Sleep” three times in a row, the system seems to work perfectly now.
Before, as i mentioned previously, the graphics were all distorted, and (something that I didn’t mention before) any apps that were opened before putting the PC to sleep, just crashed and got closed automatically (after unlocking my session, even when I couldn’t see a thing thanks to the distortion while on the log in screen) but now every single app that was opened before putting the PC to sleep, remains as it was before I put the PC to sleep.

So, to resume what I did to solve the issue on my PC:

  1. Created file: /etc/modprobe.d/nvidia-power-management.conf
  2. Added: options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp
    to the created file.
  3. enabled:

systemctl enable nvidia-suspend.service
systemctl enable nvidia-hibernate.service
systemctl enable nvidia-resume.service

and after that the sleep function worked just fine, even better than ever actually.

One question, after adding the modprobe file, do you need to reinstall the kernel? And I ask this because I did that, just in case, and then rebooted the system.

Thanks for your help! :grin:

Belt and braces, I ran reinstall-kernels, too, just in case :smiley:

Hello!
Update:

I think I got a little overexcited on my previous post, because the computer actually went to sleep every time that I put it to sleep and everything seemed to be working just fine, but today, after accumulating like six or seven times putting it to sleep, the computer went kinda nuts, it, once again, couldn’t go back to sleep, or hibernate (the solution to the distortion still works though), it, once again, just went to “sleep” and immediately woke up, and, once that happened, I decided to power it off, and it didn’t get completely powered off, the system shut down, but the hardware continued being powered on.
So, I am back…
Can anybody confirm if the same thing happens on their system?

I will continue trying stuff that could solve the issue and I will continue updating this issue (if I have at least more partially good news).

:smiling_face_with_tear:

Which kernel are you running? I find the LTS a lot better.

Try these, I got it to work:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.