omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Keyboard backlight unexpectedly turns back on after idle wake or unlock

Open AnoopLamba opened this issue 2 months ago • 1 comments

What happened

When I manually turn the keyboard backlight off, Omarchy turns it back on after the idle screen saver is dismissed or the lock screen is unlocked. This is confusing because the user explicitly selected off.

Steps to reproduce

  1. On a laptop with a multi-level keyboard backlight, turn the keyboard backlight off using the keyboard shortcut.
  2. Let the Omarchy idle screen saver/lock activate, or otherwise start an idle cycle.
  3. Move the mouse/press a key to wake the session, or unlock it.
  4. The keyboard backlight turns on again without the user requesting it.

Expected behavior

An explicit user choice to turn the keyboard backlight off should remain off until the user changes it. Wake/unlock should not restore an earlier on-state over a later user choice.

Findings / suspected cause

The wake path unconditionally restores the previously saved keyboard brightness:

# /usr/share/omarchy/bin/omarchy-system-wake
omarchy-brightness-keyboard restore

The lock plugin turns the keyboard backlight off with:

# /usr/share/omarchy/shell/plugins/lock/Service.qml
omarchy-brightness-keyboard off

omarchy-brightness-keyboard off uses brightnessctl -s before setting brightness to zero, while the normal keyboard-backlight shortcut uses the cycle path and does not update that saved restore value. Consequently, a later omarchy-system-wake can restore the old on-state after the user has manually turned the backlight off.

The idle service calls the wake process when an idle cycle is cancelled, and the lock service calls it after unlock. The current brightnessctl restore state for this device is 1, confirming that an on-state is available to be restored.

System information

  • Omarchy: 4.0.3-1
  • Kernel: 7.2.3-arch1-3
  • Compositor: Hyprland 0.56.2
  • Hardware: Lenovo IdeaPad 330S-14IKB U (81F4)
  • BIOS: 7SCN21WW (2018-07-31)

The ideapad_laptop driver is loaded, the keyboard backlight device is detected, and there are no Hyprland configuration errors. The hardware supports multiple levels, although the generic sysfs interface currently reports only a binary 0/1 range.

AnoopLamba avatar Sep 17 '26 12:09 AnoopLamba

This is the same bug as #10767, which was opened earlier and is still open, so I'm closing this one as a duplicate.

Both reports describe the same thing. Changing the keyboard backlight by hand, including switching it off, doesn't update the level brightnessctl saved. Then omarchy-system-wake restores that old saved level when the screensaver is dismissed or the session is unlocked. Here is the mechanism, checked against quattro at 9480d1b6a:

  • cancelIdleCycle in shell/plugins/services/idle/Service.qml runs omarchy-system-wake for every idle cycle, including one that only showed the screensaver.
  • omarchy-system-wake always calls omarchy-brightness-keyboard restore (brightnessctl -r).
  • Only omarchy-brightness-keyboard off, run by the lock screen's blank, ever saves a level. up, down and cycle don't.
  • So when nothing was blanked in the cycle, wake brings back whatever the last lock-screen blank saved. Unlocking before the lock screen has blanked (it waits 5 seconds) does the same.

#10767 has the diagnosis and a second report from a ThinkPad, where the backlight key is handled by the firmware. Fixes for it are open as #10364, #10366 and #12502, and choosing between them is waiting on the maintainer. #10366 already says it fixes this issue too. Your report reaches the same cause by a different path (the turned-off light coming back on), and that case is covered in #10767.

Codex Medium was asked separately whether the two reports describe the same bug and agreed that they do. Nothing was run on a worker, because a worker VM has no keyboard backlight. If you think this is a different bug, say so here and it can be reopened.

omarchybot avatar Oct 12 '26 05:10 omarchybot