[RESPONDED] Laptop does not suspend if lid closed immediately after waking up without logging in

System Config:

  • Framework 13 AMD 7640U
  • Fedora 39 beta
  • BIOS 3.03

Steps to reproduce:

  1. Log in to Fedora
  2. Play a YouTube video with sound (Chrome)
  3. Suspend laptop by closing lid, observe video stops playing (sound stops)
  4. Wake laptop by opening lid, observe the user login screen but do not log in, video resumes playing in background (sound resumes)
  5. Close laptop, observe video continues playing (laptop does not enter suspend state, light from screen is still visible in a dark room if using translucent bezel)

Notes:

  1. this behaviour still occurs if not playing a video, it just is easier to tell the suspend state of the laptop if playing a video.
  2. This behaviour only occurs if the lid is closed before logging in.

Expected behaviour:

Laptop should enter suspend state after step 5.

Possibly related ticket:

Hi @gaben , are you on BIOS 3.03 yet?

Yes. I’ve updated my ticket

Systemd will delay suspends after booting in order to check for docks and external monitors. The laptop should eventually suspend after the lid is closed; it is just delayed. If you want to change the default behaviour, then go to

/etc/systemd/logind.conf

add:

HoldoffTimeoutSec=0

then:

sudo systemctl restart systemd-logind

(you will be logged out)

Refer to the man page: logind.conf(5) - Linux manual page

HoldoffTimeoutSec=
Specifies a period of time after system startup or system
resume in which systemd will hold off on reacting to lid
events. This is required for the system to properly detect
any hotplugged devices so systemd can ignore lid events if
external monitors, or docks, are connected. If set to 0,
systemd will always react immediately, possibly before the
kernel fully probed all hotplugged devices. This is safe, as
long as you do not care for systemd to account for devices
that have been plugged or unplugged while the system was off.
Defaults to 30s.

2 Likes

It looks like it is sleeping after 30 seconds of closing. I’ll do some more testing to confirm.

1 Like