You are not logged in.

#1 2024-07-07 19:05:57

saronno
Member
Registered: 2009-10-02
Posts: 218

Nvidia and systemd .... I can't resume properly.

I already see this thread:
https://bbs.archlinux.org/viewtopic.php?id=296954

... and tried the solution at #9 (drop-in) ... but this doesn't solved the issue.

I also tried to downgrade to a 255 version of systemd but nothing.

http://0x0.st/XBxN.txt

Last edited by saronno (2024-07-07 19:14:49)

Offline

#2 2024-07-07 19:32:28

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

Because it's like top-posting.
Why not?
Please don't use -r with journalctl.

Jul 07 14:07:05 kanon systemd-sleep[23620]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).

drop-in applies

Jul 07 14:07:30 kanon systemd[1]: Stopped target Suspend.

you wake up

Jul 07 14:08:26 kanon login[24907]: ROOT LOGIN ON tty2

log in as root on tty2

Jul 07 14:13:45 kanon systemd-journald[415]: Journal stopped
-- Boot 6d4e6e6ed37b47e6ba0dc47a5389c249 --

and reboot

https://bbs.archlinux.org/viewtopic.php?id=57855 - what does "I can't resume properly." mean?
Do you https://wiki.archlinux.org/title/NVIDIA … er_suspend ?
What make you think this has anything to do w/ systemd (notably since you tried to downgrade to 255 w/o any impact)?

Offline

#3 2024-07-07 20:54:31

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

I removed the drop-in (made the things even worse since I can't do anything after resume and have to do an hard shutdown).

After this I made a boot, then suspend the system and resume ..... since I have only the mouse pointer I go to tty, save journalctl -b and then reboot.
This is the log.
http://0x0.st/XBYb.txt

Can't resume properly means I got a black screen, the mouse pointer (I can control it) but can do anything else ... the only choice is to go to tty (CTRL+ALT+F3), login and reboot.

I thought systemd was involved since they have some problems with nvidia proprietary driver (I have a rtx 3060 in my system) after the systemd update.
https://gitlab.archlinux.org/archlinux/ … -/issues/9

About preserving video memory .... I have 12GB of video memory ... Ok, I have 48GB of ram on my system but I wonder if It could cause some problem in certain situations (like I have a lot of ram already used) ... and I wonder also why video ram can't persist during sleep as normal ram does.

Last edited by saronno (2024-07-07 21:04:30)

Offline

#4 2024-07-07 21:06:21

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

I got a black screen, the mouse pointer (I can control it) but can do anything else

Same if you *dis*able the compositor?
https://wiki.archlinux.org/title/Xfwm#Composite_manager (nb. the examples there show how to enable it)
If yes, what about some screensaver/locker process?

ps aux | grep xfce4 # are the xfce4 processes still running at this point?

About preserving video memory .... I have 12GB of video memory ... Ok, I have 48GB of ram on my system but I wonder if It could cause some problem in certain situations (like I have a lot of ram already used) ...

You first and foremost need to enable that feature and then you can also direct the storage away from tmpfs.

Offline

#5 2024-07-07 22:04:10

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

Compositor was not enable

xfce ....
http://0x0.st/XBYg.txt

About video memory preservation ... can I use zram to save the video memory in compressed system memory?

Offline

#6 2024-07-08 06:06:59

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

You cannot effectively use zram and zswap together and I'd borderline expect the VRAM to be (stored) compressed anyway.
But so far you didn't have the feature enabled *at all*

If it's not the compositor, it' gonna be the screensaver/locker - https://wiki.archlinux.org/title/Xfce#Lock_the_screen

Offline

#7 2024-07-08 08:40:38

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

Ok, thanks about zram.

Now, this is becoming interesting .... now (I activated the nvidia video memory preservation) I get random situations: sometimes it resume properly, sometime I get black screen as before, sometime resume fail completely and pc reboot itself without intervation.

These are two logs, one from resume-ok, one from resume-blackscreen.

This is ok:
http://0x0.st/XBlo.txt

This lead to Black Screen (with controllable mouse pointer):
http://0x0.st/XBlX.txt

Last edited by saronno (2024-07-08 09:25:45)

Offline

#8 2024-07-08 13:32:12

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

The general problem is a texture corruption/invalidation - have you tried to simply kill the screensaver process?

Edit: the kernel parameter is wrong, "NVreg_PreserveVideoMemoryAllocations=1" should be "nvidia.NVreg_PreserveVideoMemoryAllocations=1"

Last edited by seth (2024-07-08 13:34:17)

Offline

#9 2024-07-08 13:52:09

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

seth wrote:

The general problem is a texture corruption/invalidation - have you tried to simply kill the screensaver process?

Edit: the kernel parameter is wrong, "NVreg_PreserveVideoMemoryAllocations=1" should be "nvidia.NVreg_PreserveVideoMemoryAllocations=1"

I do not have screensaver or locker active. But I found out I have a composition active in xfce windows manager option ...

https://imgur.com/23tZFct.png

Could it be the problem? I use it mainly because of  plank dockabr.

Offline

#10 2024-07-08 15:08:30

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

It was the first thing I asked about…

seth wrote:

Same if you *dis*able the compositor?
https://wiki.archlinux.org/title/Xfwm#Composite_manager (nb. the examples there show how to enable it)

So see whether that's the cause (it mostl likely is) and then whether fixing the VRAM preservation helps with that (again, in dobut just don't use a tmpfs storage)

An alternative mitigation could be to use sleep hooks to disable and re-enable the compositor around the S3

Offline

#11 2024-07-09 10:10:52

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

seth wrote:

It was the first thing I asked about…

seth wrote:

Same if you *dis*able the compositor?
https://wiki.archlinux.org/title/Xfwm#Composite_manager (nb. the examples there show how to enable it)

So see whether that's the cause (it mostl likely is) and then whether fixing the VRAM preservation helps with that (again, in dobut just don't use a tmpfs storage)

An alternative mitigation could be to use sleep hooks to disable and re-enable the compositor around the S3

I disabled composition but I got even weirder behaviour ... sometimes blackscreen with mouse pointer, sometimes I have the desktop but everything freeze after a while.

Honestly, it sound like a video memory corruption after waking up to me. I will create a dedicated partition for saving the video memory. Since not always there is much space left of main partition, I wonder if sometimes, it can't simply save the video memory correctly.

Last edited by saronno (2024-07-09 11:10:56)

Offline

#12 2024-07-09 11:55:54

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

What is "everything" and "a while" (5s, 5m or 5h)?
Can you still SIGTERM (default kill) the "frozen" process?

Absent a compositor I'm not so sure about VRAM decay - you should consider https://wiki.archlinux.org/title/Solid_ … leshooting and running memtest86+ over night or the weekend or you're hitting errors…

Offline

#13 2024-07-09 12:11:30

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

seth wrote:

What is "everything" and "a while" (5s, 5m or 5h)?
Can you still SIGTERM (default kill) the "frozen" process?

Absent a compositor I'm not so sure about VRAM decay - you should consider https://wiki.archlinux.org/title/Solid_ … leshooting and running memtest86+ over night or the weekend or you're hitting errors…

Everything means literally everything ... I can't do anything (move the pointer, go to tty, nothing ... I can only force an hard shutdown). This happens 2-3 seconds after desktop comes back (for 2-3 second I can move the pointer and do whatever I want).
But, as I said, it's random ... it's not always the same.

I will run a memory test tonight.

Offline

#14 2024-07-09 12:55:04

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

There's still https://bbs.archlinux.org/viewtopic.php … 2#p2181442 - it's not clear whether that has been fixed w/ the 555xx drivers which otoh have displayed issues w/ output control (but you'd not see anything including a mouse cursor in that particular case)

A completely black screen with the mouse cursor visible but the xfce desktop/panel processes etc. all running is beyond weird unless there's an active compositor or screenlocker (because in that case the compositor or locker would render black, no mystery there)

Offline

#15 2024-07-09 18:57:22

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

Since I create a dedicated partition for save the video memory I have complete 3 cycles suspend-resume successfully. Let's see if this is consistence in the next few days ...

Offline

#16 2024-07-10 08:42:26

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

Mmmm ... it seems I still have problems after resume.

What about this?

[  +0.018555] ACPI: PM: Waking up from system sleep state S3
[  +0.004775] pci 0000:00:05.0: disabled boot interrupts on device [8086:2f28]
[  +0.000045] pcieport 0000:00:1c.0: pciehp: Slot(0): Card present
[  +0.000284] xhci_hcd 0000:00:14.0: xHC error in resume, USBSTS 0x411, Reinit
[  +0.000003] usb usb5: root hub lost power or was reset
[  +0.000005] usb usb6: root hub lost power or was reset
[  +0.000000] usb usb3: root hub lost power or was reset
[  +0.000004] usb usb4: root hub lost power or was reset
[  +0.000000] usb usb1: root hub lost power or was reset
[  +0.000020] xhci_hcd 0000:05:00.0: xHC error in resume, USBSTS 0x401, Reinit
[  +0.000008] usb usb7: root hub lost power or was reset
[  +0.000003] usb usb8: root hub lost power or was reset
[  +0.000023] usb usb2: root hub lost power or was reset

and this ..

[  +0.310053] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[  +0.006458] sd 1:0:0:0: [sda] Starting disk
[  +0.006462] ata2.00: configured for UDMA/133
[  +0.021795] usb 3-10: usbfs: process 1938 (pcscd) did not claim interface 0 before use
[  +1.066268] SQUASHFS error: Failed to read block 0x3728110: -5
[  +0.000016] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000010] SQUASHFS error: Unable to read inode 0x1f4c14c8
[  +0.000018] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000010] SQUASHFS error: Unable to read inode 0x1f4c14e8
[  +0.000964] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000013] SQUASHFS error: Unable to read inode 0x1f4c1550
[  +0.000016] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000010] SQUASHFS error: Unable to read inode 0x1f4c1570
[  +0.000012] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000010] SQUASHFS error: Unable to read inode 0x1f4c1c7f
[  +0.000012] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000009] SQUASHFS error: Unable to read inode 0x1f4c1ce7
[  +0.000013] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000009] SQUASHFS error: Unable to read inode 0x1f4c1de8
[  +0.000015] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000009] SQUASHFS error: Unable to read inode 0x1f4c1e74
[  +0.000013] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000009] SQUASHFS error: Unable to read inode 0x1f4c1e94
[  +0.000013] SQUASHFS error: Unable to read metadata cache entry [372810e]
[  +0.000010] SQUASHFS error: Unable to read inode 0x1f4c1efc
[  +0.000085] SQUASHFS error: Failed to read block 0x3729394: -5
[  +0.000010] SQUASHFS error: Unable to read metadata cache entry [3729392]
[  +0.000009] SQUASHFS error: Unable to read inode 0x31d0168f
[  +0.000014] SQUASHFS error: Unable to read metadata cache entry [3729392]
[  +0.000010] SQUASHFS error: Unable to read inode 0x31d01e4b
[  +0.000027] SQUASHFS error: Failed to read block 0x3729cce: -5
[  +0.000009] SQUASHFS error: Unable to read metadata cache entry [3729ccc]
[  +0.000009] SQUASHFS error: Unable to read inode 0x3b0a098f
[  +0.967934] kauditd_printk_skb: 8 callbacks suppressed

I have zswap active on my system .. I imagine squashfs is about that ...

loop0                                                                     0   100% /var/lib/snapd/snap/core18/1932
                                                                                   /var/lib/snapd/snap/core18/1932
loop1                                                                     0   100% /var/lib/snapd/snap/core18/1944
                                                                                   /var/lib/snapd/snap/core18/1944
loop2                                                                     0   100% /var/lib/snapd/snap/gtk-common-themes/1506
                                                                                   /var/lib/snapd/snap/gtk-common-themes/1506
loop3                                                                     0   100% /var/lib/snapd/snap/gnome-3-28-1804/145
                                                                                   /var/lib/snapd/snap/gnome-3-28-1804/145
loop4                                                                     0   100% /var/lib/snapd/snap/gtk-common-themes/1514
                                                                                   /var/lib/snapd/snap/gtk-common-themes/1514
loop5                                                                     0   100% /var/lib/snapd/snap/snapd/10492
                                                                                   /var/lib/snapd/snap/snapd/10492
loop6                                                                     0   100% /var/lib/snapd/snap/snapd/9721
                                                                                   /var/lib/snapd/snap/snapd/9721
sda                                                                                
└─sda1      ext4   1.0         da031cf6-47e2-429d-9da4-99dbd43c7a70    332G    59% /mnt/oldroot
sr0                                                                                
zram0                                                                              [SWAP]
zram1                                                                              [SWAP]
zram2                                                                              [SWAP]
zram3                                                                              [SWAP]
zram4                                                                              
zram5                                                                              
nvme0n1                                                                            
├─nvme0n1p1 vfat   FAT32       21DD-2EE3                             256.4M    14% /boot/efi
├─nvme0n1p2 ext4   1.0         ea7e711e-6b30-4214-9285-c5b2bfa27254    3.3G    89% /var/lib/snapd/snap
│                                                                                  /
├─nvme0n1p3 ext4   1.0         23ae11ac-e107-4ed7-9361-4c655fb6271b   45.2G    71% /mnt/oldroot/home/saronno/Downloads/stable-diffusion
├─nvme0n1p4 ext4   1.0         e5eaf3d4-5c51-4b79-a625-13ed6f329745   13.6G    71% /home/saronno/virtualbox
└─nvme0n1p5 ext4   1.0         43ef5fc7-2fc8-4de1-b326-05f69f787384   15.2G     0% /videomemory

Last edited by saronno (2024-07-10 08:55:35)

Offline

#17 2024-07-10 19:17:51

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

I suspect you re-enabled the compositor?

The usb hubs reset after the power cut, that won't explain a black screen, but maybe if your input doesn't work.
If anything https://wiki.archlinux.org/title/Solid_ … leshooting

I imagine squashfs is about that

Did you post the journal incl. those errors?

Friendly reminder:

seth wrote:

You cannot effectively use zram and zswap together

if you want to use the zram devices, disable zswap.

Offline

#18 2024-07-10 20:22:18

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

seth wrote:

I suspect you re-enabled the compositor?

Yes, I did because i didn't see any result without it. Plank was much better with it. I  will disable it if it was the cause but it didn't seem so.

I imagine squashfs is about that

Did you post the journal incl. those errors?

I saw them on dmesg output.

This is journalctl -b output ...

http://0x0.st/XMeJ.txt

you an see them at ...

Jul 10 09:40:08 kanon kernel: SQUASHFS error: Failed to read block 0x3728110: -5
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c14c8
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c14e8
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c1550
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c1570
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c1c7f
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c1ce7
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c1de8
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c1e74
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c1e94
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [372810e]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x1f4c1efc
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Failed to read block 0x3729394: -5
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [3729392]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x31d0168f
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [3729392]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x31d01e4b
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Failed to read block 0x3729cce: -5
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read metadata cache entry [3729ccc]
Jul 10 09:40:08 kanon kernel: SQUASHFS error: Unable to read inode 0x3b0a098f

if you want to use the zram devices, disable zswap.

I am thinking about disabling everything ... this installation is very old, I use zram because years ago I have 8gb of ram and then 16gb. Today I have 48gb of ram installed .... probably I don't need this swap on compressed ram anymore.

Last edited by saronno (2024-07-11 09:29:41)

Offline

#19 2024-07-15 09:27:35

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

I disabled zram, zswap (kernel line) .... I still have this "SQUASHFS error" during resume ....  I can't understand.

# lsblk -f
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0                                                                     0   100% /var/lib/snapd/snap/core18/1932
                                                                                   /var/lib/snapd/snap/core18/1932
loop1                                                                     0   100% /var/lib/snapd/snap/core18/1944
                                                                                   /var/lib/snapd/snap/core18/1944
loop2                                                                     0   100% /var/lib/snapd/snap/gnome-3-28-1804/145
                                                                                   /var/lib/snapd/snap/gnome-3-28-1804/145
loop3                                                                     0   100% /var/lib/snapd/snap/gtk-common-themes/1506
                                                                                   /var/lib/snapd/snap/gtk-common-themes/1506
loop4                                                                     0   100% /var/lib/snapd/snap/gtk-common-themes/1514
                                                                                   /var/lib/snapd/snap/gtk-common-themes/1514
loop5                                                                     0   100% /var/lib/snapd/snap/snapd/10492
                                                                                   /var/lib/snapd/snap/snapd/10492
loop6                                                                     0   100% /var/lib/snapd/snap/snapd/9721
                                                                                   /var/lib/snapd/snap/snapd/9721
sda                                                                                
└─sda1      ext4   1.0         da031cf6-47e2-429d-9da4-99dbd43c7a70  330.3G    59% /mnt/oldroot
sr0                                                                                
nvme0n1                                                                            
├─nvme0n1p1 vfat   FAT32       21DD-2EE3                             256.4M    14% /boot/efi
├─nvme0n1p2 ext4   1.0         ea7e711e-6b30-4214-9285-c5b2bfa27254    4.7G    87% /var/lib/snapd/snap
│                                                                                  /
├─nvme0n1p3 ext4   1.0         23ae11ac-e107-4ed7-9361-4c655fb6271b   37.2G    75% /mnt/oldroot/home/saronno/Downloads
├─nvme0n1p4 ext4   1.0         e5eaf3d4-5c51-4b79-a625-13ed6f329745   13.6G    71% /home/saronno/virtualbox
└─nvme0n1p5 ext4   1.0         43ef5fc7-2fc8-4de1-b326-05f69f787384   15.2G     0% /videomemory

Last edited by saronno (2024-07-15 09:29:37)

Offline

#20 2024-07-15 15:35:45

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

squashfs loads around the snap loop devices, so I'd look there.

As for the original problem, I'd try to add sleep hooks to disable and re-enable the compositor around the S3 and see whether the problem still ever emerges.
https://wiki.archlinux.org/title/Power_ … stem-sleep

You btw. have networkd and networkmanager enabled concurrently, disable one (probably networkd)

Offline

#21 2024-07-15 17:50:23

saronno
Member
Registered: 2009-10-02
Posts: 218

Re: Nvidia and systemd .... I can't resume properly.

Networkd has now been disabled.

I will give a try to sleep hooks .... anyway it will take some time to understand because it keeps having a random behaviour (sometimes it resume fines, sometimes it's a mess).

Offline

#22 2024-07-15 20:36:37

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

If it's VRAM decay, longer sleeps have a much higher chance of causing this.

Offline

#23 2024-07-21 18:02:23

NotYourAlejandro
Member
Registered: 2024-07-21
Posts: 5

Re: Nvidia and systemd .... I can't resume properly.

I found a solution that worked for me on a reddit thread, but here are my notes on this.

---

# References
Reddit thread link: https://www.reddit.com/r/archlinux/comm … are_button
Debian mail thread solution link: https://www.mail-archive.com/debian-bug … 74773.html

# Cause
(pulled from Debian mail thread)
> The behavior of `systemd-sleep` and `systemd-homed` has been updated to freeze user sessions when entering the various sleep modes or when locking a homed-managed home area. This is known to cause issues with the proprietary NVIDIA drivers. Packagers of the NVIDIA proprietary drivers may want to add drop-in configuration files that set `SYSTEMD_SLEEP_FREEZE_USER_SESSION=false` for `systemd-suspend.service` and related services, and `SYSTEMD_HOME_LOCK_FREEZE_SESSION=false` for `systemd-homed.service`.

# Solution
Create file: `/usr/lib/systemd/system/systemd-suspend.service.d/nvidia.conf`
```
[Service]
Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSION=false"
```

Create file: `/usr/lib/systemd/system/systemd-homed.service.d/nvidia.conf`
```
[Service]
Environment="SYSTEMD_HOME_LOCK_FREEZE_SESSION=false"
```

Additionally, ensure these boot parameters are present.
- `nvidia-drm.modeset=1`
- `nvidia.NVreg_PreserveVideoMemoryAllocations=1`

Offline

#24 2024-07-21 20:27:56

seth
Member
Registered: 2012-09-03
Posts: 61,632

Re: Nvidia and systemd .... I can't resume properly.

How exactly is that different from the status quo ante?
http://0x0.st/XMeJ.txt has those parameters and

Jul 10 03:09:17 kanon systemd-sleep[33625]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).

Offline

#25 2024-07-21 21:05:56

NotYourAlejandro
Member
Registered: 2024-07-21
Posts: 5

Re: Nvidia and systemd .... I can't resume properly.

Yup, this person does already have those kernel paramters there, so that can be ignored.

However, the two "nvidia.conf" files should override the environment variable mentioned by the log entry you mentioned (SYSTEMD_SLEEP_FREEZE_USER_SESSIONS). While it isn't a perfect solution as I'm sure there's some reason why it is the way it is, it should allow systemd to actually freeze the userspace applications instead of printing a log message.
https://github.com/systemd/systemd/blob … ep/sleep.c (lines 604-616)

This is just something that's worked for me, and since I myself haven't found it anywhere else yet after years of searching, I figured I'd at least drop it here.

Offline

Board footer

Powered by FluxBB