You are not logged in.

#1 2024-09-30 11:52:00

jwierzbi
Member
Registered: 2018-02-24
Posts: 3

[SOLVED] Laptop not always suspending on lid close

I'm not sure this is the right place to ask or should I be going to the Framework forum?

I noticed an issue with my Framework 13 AMD 7840U recently. I have no idea if this was working before but now the laptop doesn't suspend every time I close the lid. Sometimes it happens but sometimes it does not.

I've captured the system log for logind (enabled debug messages with sudo systemctl log-level debug) from both a successful suspend and unsuccessful ones:

$ journalctl -f --unit=systemd-logind
Sep 30 17:03:31 perun systemd-logind[634]: Lid closed.
Sep 30 17:03:31 perun systemd-logind[634]: Suspending...
Sep 30 17:03:31 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTOREREMOVE=1, FDNAME=session-3-device-13-77)
Sep 30 17:03:31 perun systemd[1]: systemd-logind.service: Got explicit request to remove fd 153 (session-3-device-13-77), closing.
Sep 30 17:03:38 perun systemd-logind[634]: Lid opened.
Sep 30 17:03:38 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (WATCHDOG=1)
Sep 30 17:03:38 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTORE=1, FDNAME=session-3-device-13-77)
Sep 30 17:03:38 perun systemd[1]: systemd-logind.service: Trying to stash fd for dev=0:6/inode=907
Sep 30 17:03:38 perun systemd[1]: systemd-logind.service: Added fd 111 (session-3-device-13-77) to fd store.
Sep 30 17:03:38 perun systemd-logind[634]: Operation 'suspend' finished.
Sep 30 17:03:53 perun systemd-logind[634]: Lid closed.
Sep 30 17:03:53 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTOREREMOVE=1, FDNAME=session-3-device-13-77)
Sep 30 17:03:53 perun systemd[1]: systemd-logind.service: Got explicit request to remove fd 111 (session-3-device-13-77), closing.
Sep 30 17:04:00 perun systemd-logind[634]: Lid opened.
Sep 30 17:04:00 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTORE=1, FDNAME=session-3-device-13-77)
Sep 30 17:04:00 perun systemd[1]: systemd-logind.service: Trying to stash fd for dev=0:6/inode=907
Sep 30 17:04:00 perun systemd[1]: systemd-logind.service: Added fd 111 (session-3-device-13-77) to fd store.
Sep 30 17:04:09 perun systemd-logind[634]: Lid closed.
Sep 30 17:04:09 perun systemd-logind[634]: Suspending...
Sep 30 17:04:09 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTOREREMOVE=1, FDNAME=session-3-device-13-77)
Sep 30 17:04:09 perun systemd[1]: systemd-logind.service: Got explicit request to remove fd 111 (session-3-device-13-77), closing.
Sep 30 17:04:16 perun systemd-logind[634]: Lid opened.
Sep 30 17:04:16 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTORE=1, FDNAME=session-3-device-13-77)
Sep 30 17:04:16 perun systemd[1]: systemd-logind.service: Trying to stash fd for dev=0:6/inode=907
Sep 30 17:04:16 perun systemd[1]: systemd-logind.service: Added fd 151 (session-3-device-13-77) to fd store.
Sep 30 17:04:16 perun systemd-logind[634]: Operation 'suspend' finished.
Sep 30 17:04:20 perun systemd-logind[634]: Lid closed.
Sep 30 17:04:20 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTOREREMOVE=1, FDNAME=session-3-device-13-77)
Sep 30 17:04:20 perun systemd[1]: systemd-logind.service: Got explicit request to remove fd 151 (session-3-device-13-77), closing.
Sep 30 17:04:26 perun systemd-logind[634]: Lid opened.
Sep 30 17:04:26 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (WATCHDOG=1)
Sep 30 17:04:26 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTORE=1, FDNAME=session-3-device-13-77)
Sep 30 17:04:26 perun systemd[1]: systemd-logind.service: Trying to stash fd for dev=0:6/inode=907
Sep 30 17:04:26 perun systemd[1]: systemd-logind.service: Added fd 111 (session-3-device-13-77) to fd store.
Sep 30 17:04:30 perun systemd-logind[634]: Lid closed.
Sep 30 17:04:30 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTOREREMOVE=1, FDNAME=session-3-device-13-77)
Sep 30 17:04:30 perun systemd[1]: systemd-logind.service: Got explicit request to remove fd 111 (session-3-device-13-77), closing.
Sep 30 17:04:35 perun systemd-logind[634]: Lid opened.
Sep 30 17:04:35 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTORE=1, FDNAME=session-3-device-13-77)
Sep 30 17:04:35 perun systemd[1]: systemd-logind.service: Trying to stash fd for dev=0:6/inode=907
Sep 30 17:04:35 perun systemd[1]: systemd-logind.service: Added fd 111 (session-3-device-13-77) to fd store.
Sep 30 17:05:05 perun systemd-logind[634]: Lid closed.
Sep 30 17:05:05 perun systemd-logind[634]: Suspending...
Sep 30 17:05:05 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTOREREMOVE=1, FDNAME=session-3-device-13-77)
Sep 30 17:05:05 perun systemd[1]: systemd-logind.service: Got explicit request to remove fd 111 (session-3-device-13-77), closing.
Sep 30 17:05:13 perun systemd-logind[634]: Lid opened.
Sep 30 17:05:13 perun systemd[1]: systemd-logind.service: Got notification message from PID 634 (FDSTORE=1, FDNAME=session-3-device-13-77)
Sep 30 17:05:13 perun systemd[1]: systemd-logind.service: Trying to stash fd for dev=0:6/inode=907
Sep 30 17:05:13 perun systemd[1]: systemd-logind.service: Added fd 151 (session-3-device-13-77) to fd store.
Sep 30 17:05:13 perun systemd-logind[634]: Operation 'suspend' finished.

So there seems to be an issue when a lid is closed sometimes. The lid events are always detected but there appears to be a noticeable delay between two lid closes needed for the suspend to be issued. If the lid is closed shortly after (it's not actually that short, few seconds maybe up to a minute or two) opening it the suspend doesn't happen. Though I think I noticed at least once when the suspend didn't happen without a prior lid open. Hopefully, I'm doing a good enough job describing it but let me know please if any other details are necessary.

I've seen this post https://bbs.archlinux.org/viewtopic.php?id=205349 but the solution doesn't seem to work in my case. 

systemd-inhibit command shows below:

$ systemd-inhibit
WHO            UID USER PID COMM           WHAT  WHY                                       MODE
NetworkManager 0   root 631 NetworkManager sleep NetworkManager needs to turn off networks delay

1 inhibitors listed.

Does anyone have any idea why this might be happening? I'd appreciate any help.

Last edited by jwierzbi (2024-09-30 14:10:36)

Offline

#2 2024-09-30 12:11:19

jwierzbi
Member
Registered: 2018-02-24
Posts: 3

Re: [SOLVED] Laptop not always suspending on lid close

Hm, a moment right after I posted this I learned about HoldoffTimeoutSec which seems to be the reason why the laptop is not suspended for some time after it wakes up.

I swear though I saw it not suspending even after 30s but I can't reproduce it now so I guess I found my answer.

To whomever reads it, sorry for stupid question in the first place.

Offline

#3 2024-09-30 13:56:19

seth
Member
Registered: 2012-09-03
Posts: 57,187

Re: [SOLVED] Laptop not always suspending on lid close

so I guess I found my answer.

In case and please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB