Summary: | No OSD shown when adjusting the keyboard backlight using keyboard keys that cycle through brightness levels rather than explicitly raising or lowering brightness | ||
---|---|---|---|
Product: | [Plasma] Powerdevil | Reporter: | George Vassilev <george.vassilev91> |
Component: | general | Assignee: | Natalie Clarius <natalie_clarius> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | aspotashev, bob.mt.wya, natalie_clarius, nate, plasma-bugs, riyadul2000, thenerdiestguy, wse |
Priority: | NOR | ||
Version: | 5.23.5 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=415462 | ||
Latest Commit: | https://invent.kde.org/plasma/powerdevil/-/commit/3d0a12cc7bc4b788ec012db1120c41e42b443425 | Version Fixed In: | 6.0 |
Sentry Crash Report: |
Description
George Vassilev
2019-04-22 23:10:27 UTC
*** Bug 435416 has been marked as a duplicate of this bug. *** If I comment out `operation.silent = plasmoid.expanded;` in the applet code, then I see the OSD as expected when I change the slider in the applet. So it looks like the issue is that when manipulating the keyboard brightness using the keyboard shortcut, either `silent` is being inappropriately set, or else the OSD triggering code isn't used at all. Moving to Powerdevil since the applet isn't doing anything wrong here. The bug here seems to be that KeyboardBrightnessControl::increaseKeyboardBrightness() and KeyboardBrightnessControl::decreaseKeyboardBrightness() aren't getting called when the keyboard brightness is triggered from the keyboard itself. But this does work for screen brightness. Maybe something not getting hooked up correctly. I see the problem. The actions' default shortcuts are Qt::Key_KeyboardBrightnessUp and Qt::Key_KeyboardBrightnessDown. But many keyboards don't send those key events when you change the brightness. For example, the increasingly common paradigm of using Fn+Space to cycle through brightness levels will not cause either of those key events to be emitted. There is the Qt::Key_KeyboardLightOnOff key, but that doesn't seen to be bound to the "cycle through brightness levels" feature that Fn+Space implements. I guess that's for backlit keyboard with only one brightness level and a single key that toggles between on and off. So it looks we will need to either manually handle those key events, or else add a new key definition to Qt that gets emitted when you cycle through keyboard brightness levels, and then handle that here in Powerdevil. *** Bug 450128 has been marked as a duplicate of this bug. *** *** Bug 470453 has been marked as a duplicate of this bug. *** Thanks for adding me to the loop. I would apprechiate a proper keyboard backlight cycle key implementation. Just last week I probed the lkml for feedback and interest: https://lore.kernel.org/all/20230530110550.18289-1-wse@tuxedocomputers.com/ I don't know how Qt keycodes map to linux kernel keycodes, because currently there are only 3 keycodes for backlight control in the kernel: Up, Down, and Toggle. As we have quite a collection of different keyboard backlight, I'm able to provide testing and design feedback, so let me know when there is a prototype. @George Vassilev: Die you have a cat /sys/class/leds/*kbd_backlight/brightness_hw_changed entry with the driver installed? ('*' = wildcard, maybe something like asus::kbd_backlight or asus:white:kbd_backlight or white:kbd_backlight) A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/210 Git commit ae21f465adc72c84cee22ffd887a081dbe5019b9 by Natalie Clarius. Committed on 16/08/2023 at 06:18. Pushed by nclarius into branch 'kbd-backlight-hw-changed'. show OSD when keyboard backlight changed through hardware Show the brightness OSD when upower signals that the keyboard backlight changed through hardware, eg a firmware-handled shortcut, for which so far no OSD was shown. FIXED-IN: 6.0 M +10 -3 daemon/backends/upower/powerdevilupowerbackend.cpp M +1 -1 daemon/backends/upower/powerdevilupowerbackend.h M +6 -1 daemon/powerdevilbackendinterface.cpp M +1 -1 daemon/powerdevilbackendinterface.h https://invent.kde.org/plasma/powerdevil/-/commit/ae21f465adc72c84cee22ffd887a081dbe5019b9 Ignore the above message, the fix has not landed, I just pushed to the wrong branch name Sorry for the confusion! Git commit 3d0a12cc7bc4b788ec012db1120c41e42b443425 by Natalie Clarius. Committed on 16/08/2023 at 06:26. Pushed by ngraham into branch 'master'. show OSD when keyboard backlight changed through hardware Show the brightness OSD when upower signals that the keyboard backlight changed through hardware, eg a firmware-handled shortcut, for which so far no OSD was shown. FIXED-IN: 6.0 M +8 -3 daemon/backends/upower/powerdevilupowerbackend.cpp M +1 -1 daemon/backends/upower/powerdevilupowerbackend.h M +6 -1 daemon/powerdevilbackendinterface.cpp M +1 -1 daemon/powerdevilbackendinterface.h https://invent.kde.org/plasma/powerdevil/-/commit/3d0a12cc7bc4b788ec012db1120c41e42b443425 |