Keyboard backlight OSD missing when the toggle key is firmware-handled (e.g. Dell)
Summary
On laptops where the keyboard-backlight toggle key is handled by firmware (the EC), pressing it changes the backlight but no On-Screen Display (OSD) appears. This worked with the pre-Quattro swayosd OSD and regressed with the Quickshell OSD introduced in Quattro (4.0.0).
Steps to reproduce
- On a Dell laptop (keyboard-backlight device
dell::kbd_backlight, max brightness level 2). - Press the keyboard backlight toggle key (emits
XF86KbdLightOnOff).
Expected
An OSD overlay showing the keyboard-backlight level, like the volume/display OSDs.
Actual
The backlight toggles, but no OSD appears.
Root cause
The Quickshell keyboard-backlight OSD is driven purely by key events:
XF86KbdBrightnessUp/Down/OnOff → Hyprland bind (/usr/share/omarchy/default/hypr/bindings/media.lua) → omarchy-brightness-keyboard → omarchy-osd -i keyboard -p <n>.
On Dell (and likely other firmwares), the single keyboard-backlight key is consumed by the EC: the LED brightness changes in sysfs (/sys/class/leds/dell::kbd_backlight/brightness) but the XF86KbdLightOnOff event never reaches Hyprland, so the bound command — and therefore the OSD — never runs. There is no udev/inotify watcher on the backlight device, so the OSD only ever appears when an omarchy command explicitly summons it.
The old swayosd path apparently surfaced the OSD from the brightness change itself, which is why it worked pre-Quattro; Quattro's OSD has no equivalent hardware-event hook.
Suggested fix
Add a watcher (udev rule or an inotify loop) on /sys/class/leds/*kbd_backlight*/brightness that summons the OSD whenever the value changes, so firmware-handled toggles also show it. This mirrors how other DE/HUDs surface keyboard-backlight changes regardless of the input source.
Environment
- Omarchy: 4.0.0-1 (Quattro)
- Kernel: 7.1.8-arch1-3
- Device:
dell::kbd_backlight, max brightness 2 (levels 0/1/2 → 0/50/100%) omarchy debugis not available in this build, so no debug log URL is attached.
Workaround (user-space)
A sysfs watcher + user systemd service that calls omarchy-osd -i keyboard -p <pct> on change restores the OSD. Bindings can be rebound with --no-osd so the watcher is the single OSD source and there is no duplicate popup.
Follow-up with the working user-space fix and a correction to the suggested approach:
On this Dell, pressing the hardware key toggles the backlight and the sysfs
brightness value does change, but the change does not raise an inotify
MODIFY event (only a userspace brightnessctl write does). So a pure
inotifywait watcher is not enough — an inotify loop silently misses
firmware/EC-driven toggles.
The reliable approach is to poll /sys/class/leds/*kbd_backlight*/brightness
(e.g. every ~120 ms) and summon the OSD on any value change. That catches both
OS-driven and hardware-driven changes. A working user-space implementation:
~/.config/omarchy/kbd-backlight-osd.sh: poll loop that callsomarchy-osd -i keyboard -p <pct>when the brightness changes.~/.config/systemd/user/omarchy-kbd-osd.service: runs it as a user service (WantedBy=graphical-session.target); needsPATHto include/usr/share/omarchy/binandXDG_RUNTIME_DIRset, since the service env is minimal.- Bindings rebound with
omarchy-brightness-keyboard --no-osd ...so the watcher is the single OSD source (no duplicate popup).
So the recommended upstream fix is a poll-based (or sysfs_notify/udev change
based) watcher on the backlight device, not inotify.
Confirmed on a Dell Vostro 14 5410 with Omarchy 4.0.4-1 (dell::kbd_backlight, max brightness 2). The physical F5 key changes the LED level, but the stock keyboard OSD does not appear. The OSD itself works when called directly with omarchy-osd -i keyboard -p 50. A local user service that samples brightness every 150 ms and calls omarchy-osd on a change restores the popup; this was verified with the physical key.
There is a useful event-driven option on this Dell: /sys/class/leds/dell::kbd_backlight/brightness_hw_changed exists. I opened it, registered select.poll() for POLLPRI | POLLERR, and pressed F5. The poll returned immediately with brightness_hw_changed=2 and brightness=2. This detects the firmware-controlled change that never invokes Omarchy's Hyprland binding.
Could the first-party keyboard OSD listen to brightness_hw_changed when present, then read brightness and max_brightness to show the actual percentage? That would avoid periodic polling on drivers that provide this notification. A polling fallback could cover devices without the attribute. The existing command-driven OSD can continue handling software brightness changes.
This is separate from the stale restore-on-lock issue in #6667; it is specifically about restoring the missing OSD for firmware-handled keys. PR #8119 already demonstrates a brightness_hw_changed watcher for lock-state tracking, but does not emit the OSD for these key presses.
I read this against quattro and the cause is as described. On 4.x the keyboard-backlight OSD only appears when Omarchy itself changes the level. The XF86KbdBrightnessUp/Down and XF86KbdLightOnOff binds in default/hypr/bindings/media.lua run omarchy-brightness-keyboard, and that script calls omarchy-osd -i keyboard once it has written the new level. Nothing in the shell watches the LED itself: shell/services/BrightnessKeys.qml only handles the display backlight, and the lock screen only switches the keyboard off and back on. So a key that the EC handles without sending a key event never reaches anything that could show the OSD.
One thing in the report doesn't hold up: this isn't a regression in Omarchy's code. On 3.x (dev), omarchy-brightness-keyboard reached SwayOSD the same way, through the bind and omarchy-swayosd-kbd-brightness, and nothing ran SwayOSD's libinput backend. A key that never reached Hyprland would not have shown the OSD there either. I can't rule out SwayOSD's server doing something by itself, but nothing Omarchy set up would have.
The brightness_hw_changed observation in the second comment is the useful lead. The kernel notifies that attribute, not brightness, when firmware changes the LED, which explains why inotify on brightness stayed silent. A fix means adding a new watcher to the shell. It would need to choose whether to use that attribute or poll, decide what to do on hardware that lacks it, and avoid a second OSD on machines where the key also reaches the bind. That is a design choice for the maintainer, so I haven't opened a pull request. It also can't be tested on a VM, because a VM has no kbd_backlight LED that firmware changes. Whoever builds the fix will need one of you with the Dell to try it.
The second opinion did not run: the configured reviewer (Codex Medium) was reachable, but the day's review budget was used up. This is one model's reading of the source. It now waits on the maintainer to decide whether the shell should watch the LED. No reproduction was attempted.