You are not logged in.

#1 2023-07-16 03:04:53

to_you_bannana
Member
Registered: 2022-07-15
Posts: 52

SystemD does not resume after suspending for some "long" time

I cannot turn on the system once it has been suspended for some time, and I have to reboot it.

 
systemd[1]: Reached target Sleep.
systemd[1]: Starting NVIDIA system suspend actions...
suspend[156082]: nvidia-suspend.service
logger[156082]: <13>Jul 16 00:13:38 suspend: nvidia-suspend.service
kernel: snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 16
systemd[1]: nvidia-suspend.service: Deactivated successfully.
systemd[1]: Finished NVIDIA system suspend actions.
systemd[1]: Starting System Suspend...
systemd-sleep[156097]: Entering sleep state 'suspend'...
kernel: PM: suspend entry (deep)
~
~

UEFI/BIOS has stayed the same, don't have TPM
Kernel: 6.4.1-zen2-1-zen
CPU: AMD Ryzen 5 1500X (8) @ 3.800GHz
GPU: NVIDIA GeForce GTX 1070 Ti
X11
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=7 nvidia-drm.modeset=1 amd_iommu=on iommu=pt" (stayed the same)

Offline

#2 2023-07-16 04:53:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,119

Re: SystemD does not resume after suspending for some "long" time

https://download.nvidia.com/XFree86/Lin … ement.html

NVIDIA Linux kernel module needs to be loaded with the NVreg_PreserveVideoMemoryAllocations=1 module parameter

Do you?

By default, these files are created in /tmp, but this location can be changed with the TemporaryFilePath kernel module parameter, e.g. TemporaryFilePath=/run. The destination file system needs to support unnamed temporary files, and it needs to be large enough to accommodate all video memory copies for the duration of power management cycles.

Is it?

How long™ is long™ (on estimate)?
5m? 1h? 2d? 1w?

Is there a parallel windows installation?
Can you trigger this by suspending the system from the multi-user.target (no GUI running/started, you've plenty of free RAM and the GPU has virtually not been used at all)?

Offline

#3 2023-07-16 05:46:38

to_you_bannana
Member
Registered: 2022-07-15
Posts: 52

Re: SystemD does not resume after suspending for some "long" time

seth wrote:

https://download.nvidia.com/XFree86/Lin … ement.html

NVIDIA Linux kernel module needs to be loaded with the NVreg_PreserveVideoMemoryAllocations=1 module parameter

Do you?

By default, these files are created in /tmp, but this location can be changed with the TemporaryFilePath kernel module parameter, e.g. TemporaryFilePath=/run. The destination file system needs to support unnamed temporary files, and it needs to be large enough to accommodate all video memory copies for the duration of power management cycles.

Is it?

How long™ is long™ (on estimate)?
5m? 1h? 2d? 1w?

Is there a parallel windows installation?
Can you trigger this by suspending the system from the multi-user.target (no GUI running/started, you've plenty of free RAM and the GPU has virtually not been used at all)?

Ok, I have added the NVreg_PreserveVideoMemoryAllocations parameter, not really sure where to look to see if the Nvidia files are created in /tmp

Long is maybe around 4+ hours or so

Only arch linux is installed

Ill see if this can be triggered without GUI tonight

Offline

#4 2023-07-16 05:51:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,119

Re: SystemD does not resume after suspending for some "long" time

I have added the NVreg_PreserveVideoMemoryAllocations parameter

Where and how? If the answer isn't "kernel commandline" make sure to rebuild the initramfs if you added nvidia there.

not really sure where to look to see if the Nvidia files are created in /tmp

That's the default behavior, my concern was about the "needs to be large enough to accommodate all video memory copies", ie. you need enough free RAM when suspending.

Long is maybe around 4+ hours or so

Certainly sounds like the VRAM decay - what are the symptoms on resume?

Offline

#5 2023-07-16 06:41:36

to_you_bannana
Member
Registered: 2022-07-15
Posts: 52

Re: SystemD does not resume after suspending for some "long" time

seth wrote:

I have added the NVreg_PreserveVideoMemoryAllocations parameter

Where and how? If the answer isn't "kernel commandline" make sure to rebuild the initramfs if you added nvidia there.

not really sure where to look to see if the Nvidia files are created in /tmp

That's the default behavior, my concern was about the "needs to be large enough to accommodate all video memory copies", ie. you need enough free RAM when suspending.

Long is maybe around 4+ hours or so

Certainly sounds like the VRAM decay - what are the symptoms on resume?

I added it to /etc/modprobe.d/nvidia-power-management.conf as suggested by the arch wiki, already rebuilt initramfs

I have 64GB ram so thats not an issue

Not sure what you means by "on resume", it can't resume so I have to restart. Everythings normal after that, and normal when I resume from a short sleep

Offline

#6 2023-07-16 06:44:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,119

Re: SystemD does not resume after suspending for some "long" time

Does the system power up? Do the fans spin? Is there maybe some sound?
This kind of stuff - VRAM decay primarily leads to garbled textures ie. you don't see anything and the system might stall for a while, esp. w/ some major GL clients (compositor), but if the system just doesn't power up at all, that's unlikely the cause.

Offline

#7 2023-07-16 09:53:07

to_you_bannana
Member
Registered: 2022-07-15
Posts: 52

Re: SystemD does not resume after suspending for some "long" time

seth wrote:

Does the system power up? Do the fans spin? Is there maybe some sound?
This kind of stuff - VRAM decay primarily leads to garbled textures ie. you don't see anything and the system might stall for a while, esp. w/ some major GL clients (compositor), but if the system just doesn't power up at all, that's unlikely the cause.

Yup, the system powers up alright. Fans spin properly, and the components light up properly as well. I cannot find much about VRAM decay online though

Offline

#8 2023-07-16 11:03:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,119

Re: SystemD does not resume after suspending for some "long" time

The memory on the graphics card isn't properly powered/refreshed during the S3 and after some time becomes a mess.

Offline

#9 2023-07-16 14:34:56

to_you_bannana
Member
Registered: 2022-07-15
Posts: 52

Re: SystemD does not resume after suspending for some "long" time

seth wrote:

The memory on the graphics card isn't properly powered/refreshed during the S3 and after some time becomes a mess.

Ah, could you suggest some ways on approaching this issue then?

Offline

#10 2023-07-16 14:36:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,119

Re: SystemD does not resume after suspending for some "long" time

That's what https://download.nvidia.com/XFree86/Lin … ement.html is supposed to cover.
Did you reboot w/ the kernel parameter in place and/or test S3 from the multi-user.target?

Offline

#11 2023-08-12 01:51:39

to_you_bannana
Member
Registered: 2022-07-15
Posts: 52

Re: SystemD does not resume after suspending for some "long" time

seth wrote:

That's what https://download.nvidia.com/XFree86/Lin … ement.html is supposed to cover.
Did you reboot w/ the kernel parameter in place and/or test S3 from the multi-user.target?

Not sure what is meant by S3, but I executed

# systemctl isolate multi-user.target
# systemctl suspend

and I was able to resume from sleep normally

Offline

#12 2023-08-12 06:12:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,119

Re: SystemD does not resume after suspending for some "long" time

https://en.wikipedia.org/wiki/ACPI#Power_states

So, did you read and implement the link I posted?

Offline

Board footer

Powered by FluxBB