You are not logged in.

#1 2024-02-24 09:36:30

Jaskir
Member
Registered: 2024-02-24
Posts: 4

[SOLVED] Laptop not sleeping/suspending despite journalctl lid events

Hello wonderful people, I am having an issue with Arch on my Asus Zenbook 15 (UM3504DA-DS76) where it won't put my laptop to sleep when I close my lid. It does seem to wake from sleep when I open the lid just fine however.

OS: Arch Linux x86_64
Kernel: 6.7.5-arch1-1
DE: Plasma 5.27.10
WM: KWin
CPU: AMD Ryzen 7 7735U with Radeon Graphics (16) @ 4.819GHz
GPU: AMD ATI Radeon 680M

When I close and open the lid, I get these logs from systemd with no errors of any sort.

Feb 24 01:20:51 Archir systemd-logind[902]: Lid closed.
Feb 24 01:20:51 Archir systemd-logind[902]: Lid opened.

I also have the following config lines set (uncommented) under [Login] in '/etc/systemd/logind.conf':

HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend

My '/etc/systemd/logind.conf.d' directory is empty so no config conflicts there. I can do 'systemctl suspend' and the laptop suspends just fine.

This is pretty much the last issue with my laptop, otherwise I have a perfectly working Arch Linux environment so any help from you folks is highly appreciated. Thank you in advance!

Last edited by Jaskir (2024-02-24 20:02:56)

Offline

#2 2024-02-24 20:00:33

Jaskir
Member
Registered: 2024-02-24
Posts: 4

Re: [SOLVED] Laptop not sleeping/suspending despite journalctl lid events

Well, turns out this was trivial with ACPID. For those that run into the same issue in the future, simply install ACPID. Then modify '/etc/acpi/handler.sh' and add 'systemctl suspend' under the case that handles lid open/close (case 3).

case "$3" in
    close)
        logger 'LID closed'
        systemctl suspend  # Add this line to suspend the laptop
        ;;
    open)
        logger 'LID opened'
        ;;
    *)
        logger "ACPI action undefined: $3"
        ;;
esac

Then 'systemctl restart acpid' and now the laptop should sleep when lid is closed. Of course you can define other behavior as well since that's the whole purpose of acpid.

Offline

#3 2024-02-25 10:32:17

Hellmann
Member
Registered: 2023-10-10
Posts: 11

Re: [SOLVED] Laptop not sleeping/suspending despite journalctl lid events

Hi,
I will try your approach. If it works it would be awesome, as the bug is very annoying and widely discussed in the lenovo forums and redhat bugtracker. It appears since kernel 6.7.x

Edit: Do you use the gnome session handler at the same time?

Last edited by Hellmann (2024-02-25 12:25:09)

Offline

#4 2024-02-25 14:16:16

seth
Member
Registered: 2012-09-03
Posts: 51,679

Re: [SOLVED] Laptop not sleeping/suspending despite journalctl lid events

Feb 24 01:20:51 Archir systemd-logind[902]: Lid closed.
Feb 24 01:20:51 Archir systemd-logind[902]: Lid opened.

Those have the very same timestamp…

Offline

#5 2024-02-26 10:27:39

Jaskir
Member
Registered: 2024-02-24
Posts: 4

Re: [SOLVED] Laptop not sleeping/suspending despite journalctl lid events

seth wrote:

Those have the very same timestamp…

I had been observing those logs for a while prior and despite waiting many seconds between lid open or close, nothing would work.

For the purpose of making this forum post I closed and opened my laptop immediately just to demonstrate that events are being registered and logged.

Offline

#6 2024-02-26 10:30:23

Jaskir
Member
Registered: 2024-02-24
Posts: 4

Re: [SOLVED] Laptop not sleeping/suspending despite journalctl lid events

Hellmann wrote:

Hi,
I will try your approach. If it works it would be awesome, as the bug is very annoying and widely discussed in the lenovo forums and redhat bugtracker. It appears since kernel 6.7.x

Edit: Do you use the gnome session handler at the same time?

I do not, I'm using LightDM currently.

Offline

Board footer

Powered by FluxBB