Power page brightness slider controls a keyboard LED when there is no backlight #74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
How it was found: clicking through the
98be903build in a headless BOS live VM on 2026-10-13 (no /sys/class/backlight). Power & battery showed a Brightness slider at 0%.Confidence: high. In the VM, plain
brightnessctl(no args) picks the first device it finds, which wasDevice 'input1::numlock' of class 'leds': Current brightness: 0 (0%). src/src/commands/power.rsbrightness_device()/brightness_pct()parse that output without checking the class.Bug: on desktops, VMs and external-monitor-only setups, the screen brightness slider shows and drives a keyboard LED (numlock/capslock/kbd_backlight) instead of being hidden. "No controllable backlight found" never triggers. The 0% reading also looks like the screen is off.
Fix: use
brightnessctl --class=backlight(or-c backlight, and-l -mto list) for get, set and device detection. Return None when no backlight-class device exists so the Brightness row hides. Also check power_settings.rs hypridle dim commandsbrightnessctl -s set 10%, which have the same device choice.PR: #81
Verified on merge
283ba6b(PR #81): svelte-check 0/0, npm test, build, fmt, clippy -D warnings, cargo test 182 passed incl. only_backlight_class_is_a_screen and dim migration test. Reviewer confirmed brightnessctl -m format from upstream source. Live VM (no backlight) on the PR head: Brightness row hidden, existing dim timeout still read. Reviewer nit (set_brightness --device without --class) is non-blocking.