You are not logged in.
Due to a long-standing problem with a kernel module, I am stuck with kernel 6.7.9 (laptop keyboard not recognized with newer kernels).
After a recent full system upgrade, my laptop refuses to suspend. By that, I mean: if I issue the command "sudo systemctl suspend" from within a graphical session, the cursor freezes for a while, the screen does not blank, and after ~30 seconds everything is back to normal.
With newer kernels (e.g., 6.13.8), I was able to get the correct behavior.
In the system journal, I get this:
Freezing user space processes failed after 20.005 seconds (1 tasks refusing to freeze, wq_busy=0):
task:io state:S stack:0 pid:2172 tgid:2058 ppid:2046 flags:0x00024002
Call Trace:
<TASK>
? __schedule+0xca/0x1410
? schedule+0x32/0xd0
? get_signal+0x9ab/0xab0
? arch_do_signal_or_restart+0x3e/0x270
? exit_to_user_mode_prepare+0x18a/0x1f0
? syscall_exit_to_user_mode+0x1b/0x40
? do_syscall_64+0x70/0xe0
? do_syscall_64+0x70/0xe0
? do_syscall_64+0x70/0xe0
? syscall_exit_to_user_mode+0x22/0x40
? do_syscall_64+0x70/0xe0
? entry_SYSCALL_64_after_hwframe+0x6e/0x76
</TASK>
However, I don't know how to go one step further: which "task" refuses to freeze? Why? And how can I change that?
For full reference, here is the (relevant part of the) log with kernel 6.7.9 (suspend fails) and log with kernel 6.13.8 (suspend works). The excerpt code above starts on line 58 of the first log.
Last edited by raphix (2025-04-04 07:56:18)
configs files on github -- keep up the good work, arch devs
Offline
The journal links are flipped.
You could check the pid:2172 - looks like some bluetooth device (likely audio)
Although you're going for S3, see/try https://wiki.archlinux.org/title/Blueto … le_devices
Offline
First, thanks a lot for your time. And sorry for the mistake in swapping the log files on the links above (it's fixed, now).
I tried earlier with the bluetooth thing, but it did not work.
When I tried to track the culprit, "pid:2172 tgid:2058 ppid:2046", "pid 2172" yield nothing with "ps aux | grep 2172" (obviously updated with the right number when re-doing the experiment), and ppid yields "systemd --user", which is not very helpful, I guess.
I will try again this week-end, but if you have more ideas, I am open to them.
Last edited by raphix (2025-04-04 08:34:35)
configs files on github -- keep up the good work, arch devs
Offline
systemctl --user list-unit-files
One of them will show as filed?
Offline
I guess you meant "failed", right?
But, either way, no process/unit is listed as such…
$ systemctl --user list-unit-files | grep -i iled
$
Every other question on the subject "freezing user space processes failed" mentions Audio or Bluetooth, or sometimes a mount problem, but there are traces in the logs. Here, I don't see anything.
configs files on github -- keep up the good work, arch devs
Offline
Yes, sorry - typo.
Don't grep - it might be in french…
Audio or Bluetooth, or sometimes a mount problem, but there are traces in the logs. Here, I don't see anything.
I do…
=========================================================================
avril 03 13:58:42 intersect systemd[1]: Reached target Sleep.
avril 03 13:58:42 intersect systemd[1]: Starting System Suspend...
=========================================================================
avril 03 13:58:42 intersect systemd[1]: session-2.scope: Unit now frozen-by-parent.
avril 03 13:58:42 intersect systemd[1]: user.slice: Unit now frozen.
avril 03 13:58:42 intersect systemd[1]: user-1000.slice: Unit now frozen-by-parent.
avril 03 13:58:42 intersect systemd[1]: user@1000.service: Unit now frozen-by-parent.
avril 03 13:58:42 intersect systemd-sleep[3679]: Successfully froze unit 'user.slice'.
avril 03 13:58:42 intersect systemd-sleep[3679]: Performing sleep operation 'suspend'...
avril 03 13:58:42 intersect kernel: PM: suspend entry (deep)
avril 03 13:58:42 intersect wpa_supplicant[946]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
avril 03 13:58:42 intersect kernel: Filesystems sync: 0.007 seconds
avril 03 13:58:42 intersect wpa_supplicant[946]: wlp0s20f3: CTRL-EVENT-DSCP-POLICY clear_all
avril 03 13:58:42 intersect wpa_supplicant[946]: nl80211: deinit ifname=wlp0s20f3 disabled_11b_rates=0
=========================================================================
avril 03 13:58:42 intersect bluetoothd[885]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Connection reset by peer
avril 03 13:58:42 intersect bluetoothd[885]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 30:50:75:39:B0:95: Transport endpoint is not connected (107)
avril 03 13:58:42 intersect bluetoothd[885]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Connection reset by peer
avril 03 13:58:42 intersect bluetoothd[885]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 50:C2:ED:36:D0:90: Transport endpoint is not connected (107)
avril 03 13:59:02 intersect kernel: Freezing user space processes
avril 03 13:59:02 intersect kernel: Freezing user space processes failed after 20.005 seconds (1 tasks refusing to freeze, wq_busy=0):
avril 03 13:59:02 intersect kernel: task:io state:R running task stack:0 pid:2172 tgid:2058 ppid:2046 flags:0x00024002
=========================================================================
avril 03 13:59:02 intersect kernel: Call Trace:
avril 03 13:59:02 intersect kernel: <TASK>
avril 03 13:59:02 intersect kernel: ? __schedule+0x119/0x1410
avril 03 13:59:02 intersect kernel: ? schedule+0x32/0xd0
avril 03 13:59:02 intersect kernel: ? get_signal+0x9ab/0xab0
avril 03 13:59:02 intersect kernel: ? arch_do_signal_or_restart+0x3e/0x270
avril 03 13:59:02 intersect kernel: ? exit_to_user_mode_prepare+0x18a/0x1f0
avril 03 13:59:02 intersect kernel: ? syscall_exit_to_user_mode+0x1b/0x40
avril 03 13:59:02 intersect kernel: ? do_syscall_64+0x70/0xe0
avril 03 13:59:02 intersect kernel: ? do_syscall_64+0x70/0xe0
avril 03 13:59:02 intersect kernel: ? do_syscall_64+0x70/0xe0
avril 03 13:59:02 intersect kernel: ? syscall_exit_to_user_mode+0x22/0x40
avril 03 13:59:02 intersect kernel: ? do_syscall_64+0x70/0xe0
avril 03 13:59:02 intersect kernel: ? entry_SYSCALL_64_after_hwframe+0x6e/0x76
avril 03 13:59:02 intersect kernel: </TASK>
avril 03 13:59:02 intersect kernel: OOM killer enabled.
avril 03 13:59:02 intersect kernel: Restarting tasks ... done.
avril 03 13:59:02 intersect kernel: random: crng reseeded on system resumption
avril 03 13:59:02 intersect rtkit-daemon[2833]: The canary thread is apparently starving. Taking action.
avril 03 13:59:02 intersect rtkit-daemon[2833]: Demoting known real-time threads.
avril 03 13:59:02 intersect rtkit-daemon[2833]: Successfully demoted thread 2858 of process 2824.
avril 03 13:59:02 intersect rtkit-daemon[2833]: Successfully demoted thread 2824 of process 2824.
avril 03 13:59:02 intersect rtkit-daemon[2833]: Successfully demoted thread 2837 of process 2826.
avril 03 13:59:02 intersect rtkit-daemon[2833]: Successfully demoted thread 2826 of process 2826.
avril 03 13:59:02 intersect rtkit-daemon[2833]: Successfully demoted thread 2835 of process 2823.
avril 03 13:59:02 intersect rtkit-daemon[2833]: Successfully demoted thread 2823 of process 2823.
avril 03 13:59:02 intersect rtkit-daemon[2833]: Demoted 6 threads.
avril 03 13:59:02 intersect bluetoothd[885]: Controller resume with wake event 0x0
avril 03 13:59:02 intersect kernel: PM: suspend exit
avril 03 13:59:02 intersect kernel: PM: suspend entry (s2idle)
avril 03 13:59:02 intersect kernel: Filesystems sync: 0.015 seconds
=========================================================================
avril 03 13:59:02 intersect bluetoothd[885]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 30:50:75:39:B0:95: Connection reset by peer (104)
avril 03 13:59:02 intersect bluetoothd[885]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 50:C2:ED:36:D0:90: Connection reset by peer (104)
avril 03 13:59:22 intersect kernel: Freezing user space processes
avril 03 13:59:22 intersect kernel: Freezing user space processes failed after 20.005 seconds (1 tasks refusing to freeze, wq_busy=0):
avril 03 13:59:22 intersect kernel: task:io state:S stack:0 pid:2172 tgid:2058 ppid:2046 flags:0x00024002
=========================================================================
avril 03 13:59:22 intersect kernel: Call Trace:
avril 03 13:59:22 intersect kernel: <TASK>
avril 03 13:59:22 intersect kernel: ? __schedule+0xca/0x1410
avril 03 13:59:22 intersect kernel: ? schedule+0x32/0xd0
avril 03 13:59:22 intersect kernel: ? get_signal+0x9ab/0xab0
avril 03 13:59:22 intersect kernel: ? arch_do_signal_or_restart+0x3e/0x270
avril 03 13:59:22 intersect kernel: ? exit_to_user_mode_prepare+0x18a/0x1f0
avril 03 13:59:22 intersect kernel: ? syscall_exit_to_user_mode+0x1b/0x40
avril 03 13:59:22 intersect kernel: ? do_syscall_64+0x70/0xe0
avril 03 13:59:22 intersect kernel: ? do_syscall_64+0x70/0xe0
avril 03 13:59:22 intersect kernel: ? do_syscall_64+0x70/0xe0
avril 03 13:59:22 intersect kernel: ? syscall_exit_to_user_mode+0x22/0x40
avril 03 13:59:22 intersect kernel: ? do_syscall_64+0x70/0xe0
avril 03 13:59:22 intersect kernel: ? entry_SYSCALL_64_after_hwframe+0x6e/0x76
avril 03 13:59:22 intersect kernel: </TASK>
avril 03 13:59:22 intersect kernel: OOM killer enabled.
About the user session being frozen, see https://bbs.archlinux.org/viewtopic.php … 4#p2201174
Offline
Don't grep - it might be in french…
Fortunately, the output of "systemctl --user list-unit-files" was in English. But no "failed" appeared.
As for the log, I had googled the "Unable to get Hands-Free Voice gateway SDP record" message, which was said to be harmless (an old BT protocol negociation, if I am not wrong). Do you think it could be that? Either way, I tried your suggestion of creating a "/etc/systemd/system/bluetooth-disable-before-sleep.service" (as in the doc), but it did not change the result.
Here is a log after an unsuccessful suspend attempt with the service activated: http://0x0.st/8_Ho.txt
Is it more the "profiles/audio/avdtp.c:avdtp_connect_cb()" line?
What is your idea around audio/BT?
configs files on github -- keep up the good work, arch devs
Offline
If you can force this to happen, check/dump the process list *before* going to sleep (ps aux > /tmp/ps_before_sleep.txt) so you can (hopefully) see what that process was afterwards.
Maybe even use a sleep hook to dump the process list.
Have you tried to disable the user session freeze?
Offline