Suspend to RAM not working

Hi,

I have the problem that suspend to RAM does not work anymore. It uses to work, but now it doesnt. I’ll tested it with the linux-lts kernal (6.6.x) and against the latest. I cannot tell when it used to work or on which kernal, sadly.

The symptom is that after pressing the power button on the desktop PC I have blank screens on both of my monitors. No errors are shown, no terminal is visible. No mouse, etc.
I’ve tried waiting it out for 15 minutes but nothing changes.
I did NOT try to ssh into the machine, since I dont have the sshd running. I did not try to check if the machine is pingable when in this state.

Specs

                   ./sssso-                 -------------
                 `:osssssss+-               OS: EndeavourOS x86_64
               `:+sssssssssso/.             Host: MS-7D31 (1.0)
             `-/ossssssssssssso/.           Kernel: Linux 6.6.44-3-lts
         `-:/+sssssssssssssssssso+/.        Packages: 1429 (pacman), 5 (flatpak)
       `.://osssssssssssssssssssso++-       Shell: bash 5.2.32
  `:////ssssssssssssssssssssssssssso+++.    DE: KDE Plasma 6.1.4
`-////+ssssssssssssssssssssssssssso++++-    WM: KWin (X11)
                                            CPU: 12th Gen Intel(R) Core(TM) i7-12700K (20) @ 5,10 GHz
                                            GPU: NVIDIA GeForce RTX 3080 Lite Hash Rate [Discrete]
                                            Memory: 3,21 GiB / 62,59 GiB (5%)
                                            Swap: Disabled
                                            Locale: en_GB.UTF-8

I’ve read through https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation and it says that systemctl suspend should work right out of the box. That was the command I last used. (Normally I simply open the task menu and select “Sleep”)

cat /sys/power/mem_sleep
s2idle [deep]

Any help would be great as I dont want to leave that PC running all the time, or reboot fully.

(Running all the time has also a side issue, but thats for another time perhaps ^^)

Thanks!

Point 10:

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

Not guaranteed, seems a bit hit and miss on the mainline kernel, but should get ironed out :crossed_fingers:

Hi, sorry for the late response.

I tried

GRUB_CMDLINE_LINUX_DEFAULT='nvidia.NVreg_PreserveVideoMemoryAllocations=1'

and without nvidia. but both times it didnt work. Tried mainline and lts kernel.

Any idea?

Try creating:

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

My tmpfs is smaller than the card’s video memory, so I needed to point it to my nvme.

Yup, that helped. Although I named my file simply nvidia.conf

cat /etc/modprobe.d/nvidia.conf

options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp

Thanks!

Although, sometimes my second monitor looks very distorted, like it went back to 8bit or something.

That is, after the wakup from sleep.

Is there something I can do about that?

// edit

Its fixable by setting the resolution of the faulty monitor to something else and then back to the normal resolution. Maybe I can script that, that does it for me after waking up from sleep (with systemd?).

Sorry, no access to a monitor, but yes, systemd

https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Sleep_hooks

Looking at my notes, versus the current Arch Wiki, things have changed, that was the source where I got the conf file, it is no longer mentioned hmmmm :smiley:

Mh. So far it worked once, then all the other times I had to hardreset. Meh. :frowning:
Maybe im running a program which interferes with that?

Have you activated REISUB? Other than that, no ideas, I find it a bit + miss.

kernel.sysrq=1' | sudo tee /etc/sysctl.d/99-reisub.conf

Reboot, then hold alt printscr REISUB release alt.

I dont know what this means? Do I hold a key while booting / waking up? No.

No, it can get you out of lock ups (mostly!), doesn’t always work.

Ah, i see.

This works for now:

systemctl list-unit-files | grep nvidia
nvidia-hibernate.service                     disabled        disabled
nvidia-persistenced.service                  disabled        disabled
nvidia-powerd.service                        disabled        disabled
nvidia-resume.service                        enabled         disabled
nvidia-suspend.service                       enabled         disabled
cat /etc/modprobe.d/nvidia.conf
options nvidia_drm modeset=1
options nvidia_drm fbdev=1
options nvidia NVreg_EnableGpuFirmware=0
options nvidia Nvreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_TemporaryFilePath=/var/tmp
cat /proc/cmdline
BOOT_IMAGE=/@/boot/vmlinuz-linux-lts root=UUID=317d6071-2258-4318-b5a9-b1291713852a rw rootflags=subvol=@ nowatchdog nvme_load=YES loglevel=3 split_lock_detect=off
cat /usr/lib/systemd/system/systemd-suspend.service.d/nvidia.conf
[Service]
Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
cat /usr/lib/systemd/system/systemd-homed.service.d/nvidia.conf
[Service]
Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false

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