SDDM autologin permanently aborts on boot when laptop lid is closed (race with systemd-suspend / UnitAllocationFailed)
System details
- Omarchy Version: 4.5.0-3
- Kernel: 7.2.15-1-omarchy x86_64
- Hyprland: 0.56.2
- Hardware: ASUS Zenbook 14 UM3406KA (AMD Ryzen AI 7 350 w/ Radeon 860M)
- Session Manager: SDDM with uwsm (
omarchy.desktop)
What's wrong?
When an Omarchy laptop boots with the lid closed (e.g., connected to power or docked, or powered on just before lid close), systemd-logind immediately initiates a suspend action (HandleLidSwitch=suspend), freezing user.slice.
At the exact same time, SDDM attempts its configured autologin (/etc/sddm.conf.d/autologin.conf with omarchy.desktop / uwsm). Because user.slice is frozen, PAM and systemd reject the session allocation (io.systemd.Login.UnitAllocationFailed).
sddm-helper exits with error code 1, and SDDM permanently aborts autologin. When the user subsequently opens the lid, the desktop session is not running, leaving the user with a dead screen / stranded outside Hyprland until they switch to a TTY to manually rescue the session.
Steps to Reproduce
- Enable autologin (default in Omarchy).
- Power on laptop with the lid closed (or close the lid immediately after pressing power).
- Wait ~15–30 seconds for the boot sequence.
- Open the lid.
- Notice that Hyprland did not start and SDDM autologin failed.
Expected Behavior
Either:
systemd-logindholdoff prevents immediate sleep during cold boot until SDDM and session lock/inhibitors settle, or- SDDM autologin waits for or recovers from a boot-time suspend attempt rather than permanently abandoning autologin on
UnitAllocationFailed.
Diagnostic Logs
From journalctl -b:
systemd-logind[999]: Watching system buttons on /dev/input/event0 (Lid Switch)
systemd-logind[999]: Suspending...
systemd[1]: Starting System Suspend...
systemd[1]: user.slice: Unit now frozen.
systemd-sleep[1110]: Successfully froze unit 'user.slice'.
systemd-sleep[1110]: Performing sleep operation 'suspend'...
sddm[1108]: Reading from "/usr/local/share/wayland-sessions/omarchy.desktop"
sddm[1108]: Session "/usr/local/share/wayland-sessions/omarchy.desktop" selected, command: "uwsm start -g -1 -e -D Hyprland hyprland.desktop" for VT 1
sddm-helper[1121]: pam_unix(sddm-autologin:session): session opened for user viktor(uid=1000) by viktor(uid=0)
sddm-helper[1121]: pam_systemd(sddm-autologin:session): Varlink call io.systemd.Login.CreateSession failed: io.systemd.Login.UnitAllocationFailed
systemd[1]: Cannot start frozen unit User Slice of UID 1000.
systemd[1]: Dependency failed for User Runtime Directory /run/user/1000.
systemd[1]: Dependency failed for User Manager for UID 1000.
systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'.
sddm-helper[1121]: [PAM] Closing session
sddm-helper[1121]: pam_unix(sddm-autologin:session): session closed for user viktor
sddm[1108]: Auth: sddm-helper exited with 1
# System resumed when lid was opened 50s later:
systemd-logind[999]: Lid opened.
# Autologin never retries, desktop remains dead.
I read the report and supplied journal excerpt, but have not reproduced the boot failure or confirmed its cause. GPT-6 in Codex (effort setting not exposed) was the only reviewer; the separate classification model returned no classification, so the classification remains unsettled. This is waiting on maintainer review before further automated diagnosis.