Bug 464751 - GUI not compatible with multiple kbd_backlight's
Summary: GUI not compatible with multiple kbd_backlight's
Status: RESOLVED UPSTREAM
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Natalie Clarius
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-24 17:34 UTC by Werner Sembach [TUXEDO]
Modified: 2023-08-14 18:50 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Werner Sembach [TUXEDO] 2023-01-24 17:34:39 UTC
SUMMARY
When using the keyboard backlight brightness slider in the kcm or the tray menu, only one arbitrary selected /sys/class/leds/*kbd_backlight* entry is controlled. Propably not the intended one when there are multiples.


STEPS TO REPRODUCE
1. have more then one /sys/class/leds/*kbd_backlight* entry (e.g. a keyboard with a left, center, and right control zone)
2. slide the settings slider

OBSERVED RESULT
only one of the kbd_backlight is altered

EXPECTED RESULT
all kbd_backlight are adjustet or there is a way to select which oen should be adjusted

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kernel 5.15, Plasma 5.26.5

ADDITIONAL INFORMATION
I'm currently implementing a /sys/class/leds driver for a per key rgb and a 3 zone rgb keyboard

On the 3 zone keyboard, druing boot the kbd_backlight device is set to 50%, but the slider in the tray controls kbd_backlight_2 after boot (the driver resisters kbd_backlight, kbd_backlight_1, kbd_backlight_2)

On the per key keyboard there is kbd_backlight - kbd_backlight_125 (some are not connected to physical leds and are just reserved in the rgb controller, however i resiter them anyway for future proofing)
Here the slider controlls kbd_backlight_59 (did not pay attention if any kbd_backlight is set to 50% after boot, but can look that up if relevant)
Comment 1 ratijas 2023-02-01 08:14:52 UTC
heh, not only keyboard backlights.  It can't handle multiple screen with backlights either! I know that because I had to rewrite DDCUtils app to control my external monitor's brightness through app, and not via a DDC driver built into powerdevil/Plasma — otherwise I'd lose GUI access to control laptop's built-in screen brightness. (but this is a topic for a separate bug report)
Comment 2 Nicolas Fella 2023-06-12 13:27:06 UTC
Plasma doesn't control the keyboard backlight via sysfs directly, we go through the UPower DBus interface: https://upower.freedesktop.org/docs/KbdBacklight.html

That has no notion of different devices afaik. I'd say the proper first thing to do would be to fix upower to apply the changes it gets from the DBus interface to all relevant devices.

If we have a good story for actually exposing multiple controls in the UI we then can think about how to achieve that, either by fixing the UPower interface to support multiple devices or bypassing that entirely
Comment 3 Werner Sembach [TUXEDO] 2023-06-14 12:59:08 UTC
opened a bug over at the upower bugtracker: https://gitlab.freedesktop.org/upower/upower/-/issues/237
Comment 4 Natalie Clarius 2023-08-14 18:26:00 UTC
I submitted a merge request to upower: https://gitlab.freedesktop.org/upower/upower/-/merge_requests/203
Comment 5 Nate Graham 2023-08-14 18:45:48 UTC
Nice!
Comment 6 Werner Sembach [TUXEDO] 2023-08-14 18:50:24 UTC
Nice! From me too ^^