[BUG] Lock screen stopped working when closing laptop lid on Latest Noctalia Shell
Submission checklist
- [x] I have searched existing issues and confirmed this is not a duplicate.
- [x] I am using the latest available version of Noctalia.
Bug description
The lock screen stopped popping up upon closing the lid on the latest Noctalia Shell.
Steps to reproduce
- Log into Niri using Noctalia Shell.
- Enable the lockscreen.
- Close the laptop lid.
- Open the lid again.
Expected behavior
The lockscreen pops up upon opening up the laptop lid.
Actual behavior
The lockscreen does not show up. The session can be used straight away.
Logs / error output
<details>
[irrelevant details omitted]
2026-06-22 15:40:41.967 [DBG] [clipboard] clipboard history size=352668 entries=5 latest_mime=text/plain
2026-06-22 15:41:24.892 [DBG] [system_bus] single event dispatch took 69.0ms
2026-06-22 15:41:24.892 [DBG] [main] poll source 19SystemBusPollSource dispatch took 69.1ms
2026-06-22 15:41:29.199 [INF] [app] system resumed; rechecking night light schedule
</details>
Noctalia version
50bb514a8e8f
Compositor
Niri
Distribution
Arch-based
Environment information
Installation: AUR
Laptop: Framework 16
GPU: Radeon 780M
Additional context
Can be worked around if swayidle is installed using swayidle before-sleep "noctalia msg session lock"
Same issue here on niri 26.04 (NixOS), reproducible. Workaround with swayidle -w before-sleep "noctalia msg session lock" works. Noctalia version: efb96e41.
you can also with niri in kdl config
switch-events {
lid-close {
spawn "noctalia" "msg" "session" "lock"
}
}
I use switch-events in Niri but it does not work reliably. I have noticed that when I open the lid, I will often see my desktop and then after sec or two my screen locks. If you have document open, someone could read potentially confidential information and device is completely usable before screen locks.
I have tried to look int this behaviour and apparently Niri's switch-events and systemd-logind do not work together but rather work independent of each other. Laptop will suspend directly when lid is closed, with or without 'switch-events' and occasionally before lock command can run.
Is it possible to make Noctalia idle to delay inhibitor lock from logind like Swaylock or Hypridle does? That would give time for lockscreen command to run.
I run NixOS and have installed Noctalia v5 via flake. Laptop is Framework 13 with Ryzen 7640U with Radeon 760M.
Hey there, I recently pushed a commit 794b116 that might help with it (works similar to hypridle etc). Would love some feedback @JustinWayland @NewSunH @dorjanbenic :)
After two days and many times opening and closing a laptop lid, I did not reproduce the issue again. Seems to be resolved.
+1 it was fixed with the recent beta
~~@rogervn can you give me a specific commit of when this is fixed? i have build Noctalia against cachix branch today (which is up to date with main) on NixOS but it did not take any effect. Have I missed any toggles?~~
EDIT: I restarted Noctalia and it works now, nvm
After repeated testing, I found that the issue has been resolved. Perhaps we can close the issue now.
@ItsLemmy you can close this one too