System goes to sleep even when configured to shutdown

Running on Fedora 43 KDE

I have the system configured to shut down when the laptop lid is closed (on AC, on Battery, etc). However when I close the lid (checking the logs) systemd goes through the song of dance of suspending the system instead.

Why would that be the case?


This particular laptop had issues sleeping on Windows as well (a decade old laptop), which is the reason why shutdown is configured as a choice. The interesting thing with this accidental suspend is that on resume sddm only loads up a black screen.

The logs point out the following (split up the lines for readability)

sddm-helper-start-x11user
  "(EE) event0  - Power Button:
   client bug: event processing lagging behind by 1246ms,
   your system is too slow\n"

A few lines above

systemd-sleep Successfully thawed unit 'user.slice'.

This is not a complete log, and tangential to my actual issue “system doesn’t shut down on lid close as configured”; but maybe it provides context for some other issue.

hi, welcome.

it could be that linux is not getting access to your machines acpi features.

what is the output of

cat /sys/power/state

cat /sys/power/mem_sleep

cat /sys/power/disk

and do you have secure boot enabled in your bios?

Hello there!

$ cat /sys/power/state
freeze mem disk

$ cat /sys/power/mem_sleep
s2idle [deep]

$ cat /sys/power/disk
[platform] shutdown reboot suspend test_resume

Secure boot is disabled.

what happens if you run sudo systemctl hibernate

How important do you think it is for debugging?

My swap size is not enough for systemd to allow me to hibernate, and I’d like to avoid/postpone playing the resize the fs game with luks and btrfs partitions :grinning_face_with_smiling_eyes:

what does swapon say?

and how much ram do you have?

10 GB of RAM and 8 of swap.

Which is what the default Fedora 43 installation set up. Surprisingly. I think a better UX would have been to create a swap of the same size, though I know they at some point convenied to not have it unbounded.

edit: actually

                        Used  Priority
/dev/zram0 partition 8G 12k   100

zram is not permanent storage that can be used for hibernation.

for that you will need a swap file or partition on disk

what is happening is that hibernation is writing to zram and then shutting off the power to the ram modules… which then promptly forgets what was stored there.