You are not logged in.

#1 2021-10-19 12:40:42

simonzack
Member
Registered: 2014-01-18
Posts: 22

System freezing on suspend

Hi everyone,

I have an issue that's been occuring for quite a long time now.

When I startup my computer, and suspend then, it works fine. It works fine the second time too.

However, if I use Xfce's Power Manager to suspend when I'm inactive for 15 minutes, it doesn't suspend.

What happens instead, is that the computer screen goes black, but the power button on my desktop case stays doesn't flash, meaning that the computer didn't suspend.

The screen turns on again after I press my keyboard a few times. When I login again, I have the following.

$ systemctl list-jobs
JOB  UNIT                    TYPE  STATE
9704 resume.service          start waiting
9700 systemd-suspend.service start running
9699 suspend.target          start waiting

3 jobs listed.

If now I run systemctl cancel, the computer screen turns black again, and I can login.

If I try to suspend now manually, by running systemctl suspend, then the same thing happens.

An interesting thing is that if I reboot my computer now, Linux runs it's shutdown process. But at the very end of the process, the computer doesn't shut off. Instead it goes into suspend mode.

After I press the power button, a line or 2 extra appears in the shutdown process, then the computer shuts down normally.

So it appears that as if something's blocking the computer wanting to suspend itself, right until shutdown.

I wonder if this has anything to do with Caffeine-ng that I installed, but nothing changes after closing this.

My computer is running Xfce, with the latest kernel 5.14.12.

Offline

#2 2021-10-20 13:39:02

simonzack
Member
Registered: 2014-01-18
Posts: 22

Re: System freezing on suspend

I suspect this is an Nvidia issue, as I have the kernel log:

Oct 20 16:57:24 arch kernel: Call Trace:
Oct 20 16:57:24 arch kernel:  nv_set_system_power_state+0x222/0x3c0 [nvidia 67677f75a3b1bb507c6f7ed64407d60c4475fd2f]
Oct 20 16:57:24 arch kernel:  nv_procfs_write_suspend+0x100/0x150 [nvidia 67677f75a3b1bb507c6f7ed64407d60c4475fd2f]
Oct 20 16:57:24 arch kernel:  proc_reg_write+0x52/0xa0
Oct 20 16:57:24 arch kernel:  vfs_write+0xb9/0x270
Oct 20 16:57:24 arch kernel:  ksys_write+0x67/0xe0
Oct 20 16:57:24 arch kernel:  do_syscall_64+0x59/0x80
Oct 20 16:57:24 arch kernel:  ? __audit_syscall_exit+0x24d/0x2a0
Oct 20 16:57:24 arch kernel:  ? syscall_exit_to_user_mode+0x23/0x40
Oct 20 16:57:24 arch kernel:  ? do_syscall_64+0x69/0x80
Oct 20 16:57:24 arch kernel:  ? do_syscall_64+0x69/0x80
Oct 20 16:57:24 arch kernel:  ? exc_page_fault+0x72/0x170
Oct 20 16:57:24 arch kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xae

Offline

#3 2021-10-20 14:42:13

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

Re: System freezing on suspend

Do you also use a screensaver on XFCE?
Is there a parallel windows installation? (Thoug I guess the ACPI table is messed up from the previous incident and that can sufficiently explain the shutdown failure)

Online

#4 2021-10-20 14:46:06

simonzack
Member
Registered: 2014-01-18
Posts: 22

Re: System freezing on suspend

seth wrote:

Do you also use a screensaver on XFCE?

No I don't. I just have xfce4-power-manager.

seth wrote:

Is there a parallel windows installation? (Thoug I guess the ACPI table is messed up from the previous incident and that can sufficiently explain the shutdown failure)

No, I've only ever installed Linux on this disk, and stopped using Windows some years ago.

Although when I googled "nv_set_system_power_state" just now, https://github.com/pop-os/nvidia-graphi … -779621132 does say:

So commenting out options nvidia NVreg_PreserveVideoMemoryAllocations=1 in /usr/lib/modprobe.d/nvidia-graphics-drivers.conf before rebooting fixed the problem on my end. Oddly enough, creating a new file with options nvidia NVreg_PreserveVideoMemoryAllocations=0 in /etc/modeprobe.d didn't override the value properly, you really have to comment out the option in /usr/lib.

I'll give this a try.

Last edited by simonzack (2021-10-20 14:47:29)

Offline

#5 2021-10-20 14:55:56

simonzack
Member
Registered: 2014-01-18
Posts: 22

Re: System freezing on suspend

Ah that won't work, as I just realized Arch Linux doesn't have that line in /usr/lib/modprobe.d/nvidia.conf.

Offline

#6 2021-10-20 15:10:48

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

Re: System freezing on suspend

Did you at any point establish https://download.nvidia.com/XFree86/Lin … ement.html ?

You could still try to force the value to 0 - make sure to rebuild the initramfs if you keep the nvidia modules there.

Online

#7 2021-10-20 15:38:45

simonzack
Member
Registered: 2014-01-18
Posts: 22

Re: System freezing on suspend

seth wrote:

Did you at any point establish https://download.nvidia.com/XFree86/Lin … ement.html ?

You could still try to force the value to 0 - make sure to rebuild the initramfs if you keep the nvidia modules there.

Not entirely sure what you mean, but I have in my /etc/modprobe.d/modprobe.conf:

options nvidia NVreg_PreserveVideoMemoryAllocations=0
options nvidia_drm modeset=1

I currently don't have nvidia-suspend.service enabled.

I have tried to enable that, but the result is even worse. My computer becomes totally unresponsive from keyboard/mouse after it goes to sleep. Have to hard reset when this happens.

When I had that service enabled, I don't have the relevant errors in https://wiki.archlinux.org/title/NVIDIA … om_suspend

The following errors appeared instead:

Oct 20 14:11:56 arch suspend[135210]: nvidia-suspend.service
Oct 20 14:11:56 arch logger[135210]: <13>Oct 20 14:11:56 suspend: nvidia-suspend.service
Oct 20 14:11:56 arch kernel: ------------[ cut here ]------------
Oct 20 14:11:56 arch kernel: WARNING: CPU: 12 PID: 135218 at /build/nvidia/src/nvidia/470.74/build/nvidia-drm/nvidia-drm-drv.c:574 nv_drm_master_set+0x22/0x30 [nvidia_drm]
...
Oct 20 14:11:56 arch kernel: Call Trace:
Oct 20 14:11:56 arch kernel:  drm_new_set_master+0x90/0x110 [drm f857b0e4059ed6ff5280225a019431efbfe50b41]
Oct 20 14:11:56 arch kernel:  drm_master_open+0x83/0xb0 [drm f857b0e4059ed6ff5280225a019431efbfe50b41]
Oct 20 14:11:56 arch kernel:  drm_open+0xf8/0x250 [drm f857b0e4059ed6ff5280225a019431efbfe50b41]
Oct 20 14:11:56 arch kernel:  drm_stub_open+0xa8/0x130 [drm f857b0e4059ed6ff5280225a019431efbfe50b41]
Oct 20 14:11:56 arch kernel:  chrdev_open+0xc8/0x260
Oct 20 14:11:56 arch kernel:  ? cdev_device_add+0x90/0x90
Oct 20 14:11:56 arch kernel:  do_dentry_open+0x149/0x360
Oct 20 14:11:56 arch kernel:  path_openat+0xb90/0x1010
Oct 20 14:11:56 arch kernel:  ? task_work_add+0x71/0x90
Oct 20 14:11:56 arch kernel:  do_filp_open+0xa5/0x150
Oct 20 14:11:56 arch kernel:  do_sys_openat2+0xb0/0x160
Oct 20 14:11:56 arch kernel:  __x64_sys_openat+0x53/0x90
Oct 20 14:11:56 arch kernel:  do_syscall_64+0x59/0x80
Oct 20 14:11:56 arch kernel:  ? handle_mm_fault+0xd5/0x2a0
Oct 20 14:11:56 arch kernel:  ? do_user_addr_fault+0x1f2/0x690
Oct 20 14:11:56 arch kernel:  ? exit_to_user_mode_prepare+0x117/0x170
Oct 20 14:11:56 arch kernel:  ? exc_page_fault+0x72/0x170
Oct 20 14:11:56 arch kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xae
...
Oct 20 14:15:28 arch kernel: INFO: task nvidia-modeset/:606 blocked for more than 122 seconds.
Oct 20 14:15:28 arch kernel:       Tainted: P        W IOE     5.14.12-arch1-1 #1
Oct 20 14:15:28 arch kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Oct 20 14:15:28 arch kernel: task:nvidia-modeset/ state:D stack:    0 pid:  606 ppid:     2 flags:0x00004000
Oct 20 14:15:28 arch kernel: Call Trace:
Oct 20 14:15:28 arch kernel:  __schedule+0x333/0x1530
Oct 20 14:15:28 arch kernel:  ? enqueue_task_fair+0x89/0x670
Oct 20 14:15:28 arch kernel:  schedule+0x59/0xc0
Oct 20 14:15:28 arch kernel:  rwsem_down_read_slowpath+0x384/0x3e0
Oct 20 14:15:28 arch kernel:  nvkms_kthread_q_callback+0x71/0x100 [nvidia_modeset 6e1a9872746ded0454168f70598e0fc39b077fa5]
Oct 20 14:15:28 arch kernel:  _main_loop+0x9b/0x150 [nvidia_modeset 6e1a9872746ded0454168f70598e0fc39b077fa5]
Oct 20 14:15:28 arch kernel:  ? nvkms_sema_up+0x10/0x10 [nvidia_modeset 6e1a9872746ded0454168f70598e0fc39b077fa5]
Oct 20 14:15:28 arch kernel:  kthread+0x12f/0x160
Oct 20 14:15:28 arch kernel:  ? set_kthread_struct+0x40/0x40
Oct 20 14:15:28 arch kernel:  ret_from_fork+0x1f/0x30
Oct 20 14:15:33 arch systemd[1]: Stopping User Manager for UID 105...

Last edited by simonzack (2021-10-20 15:47:27)

Offline

#8 2021-10-20 16:09:20

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

Re: System freezing on suspend

Not entirely sure what you mean

https://wiki.archlinux.org/title/NVIDIA#Early_loading

The service will require "NVreg_PreserveVideoMemoryAllocations=1", so don't try w/ the parameter set to "0" (or not set at all)

Online

#9 2021-10-20 16:12:18

simonzack
Member
Registered: 2014-01-18
Posts: 22

Re: System freezing on suspend

seth wrote:

The service will require "NVreg_PreserveVideoMemoryAllocations=1", so don't try w/ the parameter set to "0" (or not set at all)

When I had nvidia-suspend.service enabled before, I set the following to my /etc/modprobe.d/modprobe.conf per https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks:

options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/tmp-nvidia

So that shouldn't be in conflict.

Last edited by simonzack (2021-10-20 16:13:13)

Offline

Board footer

Powered by FluxBB