[Powerdevil] [Bug 360537] Keyboard Backlight endless loop when changed, only inside plasma session

Fuchs via KDE Bugzilla bugzilla_noreply at kde.org
Wed Mar 16 21:00:29 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=360537

--- Comment #9 from Fuchs <develop at fuchsnet.ch> ---
To get the OSD back, I created the following script (Adapt paths where needed,
should work in POSIX compliant shells) and bound it to XF86KbdLightOnOff.
Therefore now using the keyboard or the battery plasmoid slider (aside from
closing itself) works including displaying the OSD.

#!/bin/sh
# Get the maximum value
MAX=`/usr/bin/qdbus --system org.freedesktop.UPower
/org/freedesktop/UPower/KbdBacklight
org.freedesktop.UPower.KbdBacklight.GetMaxBrightness`
# Get the current value. Dbus currently (kernel 4.5) gives wrong values for
GetBrightness, so we fetch it via the proc interface
CUR=`grep status /proc/acpi/ibm/kbdlight | awk '{print $2}'`

# Calculate percentage
PER=$(($CUR * 100 / 2))

# Invoke OSD
/usr/bin/qdbus org.kde.plasmashell /org/kde/osdService
org.kde.osdService.keyboardBrightnessChanged $PER

exit 0

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Plasma-devel mailing list