GNOME Bugzilla – Bug 706040
power: keyboard brightness shows up uninvited
Last modified: 2013-09-21 15:25:02 UTC
testing current ostree in a vm, I get - no battery in the power panel (which is right) - no screen brightness slider (which may be ok, since this is a vm) - a keyboard brightness slider (that seems wrong, neither the host machine nor the vm has a keyboard backlight)
Created attachment 252331 [details] [review] power: Avoid warning with no keyboard backlight If there's no keyboard backlight interface in gnome-settings-daemon, hide the slider as well, rather than throw a warning.
Attachment 252331 [details] pushed as f7c5225 - power: Avoid warning with no keyboard backlight
I still have a keyboard backlight slider showing up uninvited on my thinkpad.
*** Bug 707558 has been marked as a duplicate of this bug. ***
I have no keyboard backlight either but gnome-settings-daemon has a Keyboard interface and the Brightness property is 0 rather than -1 so that might be a gnome-settings-daemon bug. dbus-send --session --dest=org.gnome.SettingsDaemon --type=method_call --print-reply /org/gnome/SettingsDaemon/Power org.freedesktop.DBus.Properties.Get string:'org.gnome.SettingsDaemon.Power.Keyboard' string:'Brightness' method return sender=:1.405 -> dest=:1.541 reply_serial=2 variant int32 0
Created attachment 254286 [details] [review] power: Default to the kbd backlight being unavailable The default value of the keyboard backlight should be -1, so that we don't advertise ourselves as having one until we got the info back from upower.
Review of attachment 254286 [details] [review]: I was tempted to write a patch like this one, but there is code in upower_kbd_toggle that plays with a value of -1 as well, and I'm not sure I understand what it is trying to d.
Review of attachment 254286 [details] [review]: This looks correct to me and works on a laptop without keyboard backlight
Created attachment 255133 [details] [review] power: Fix getting the keyboard brightness value -- This is also needed on the g-c-c side: 18:38 <@hadess> rtcm, on top of my gsd patch, or is that all that's needed? 18:39 < rtcm> hadess: nah, that's just something I noticed while testing now 18:39 < rtcm> that's g-c-c 18:39 <@hadess> rtcm, yeah, most likely correct... 18:39 <@hadess> a uint < 0, that's not going to happen As such I'm going to push it along with the patch here which in my testing makes the keyboard backlight widget in g-c-c invisible as it should.
Comment on attachment 255133 [details] [review] power: Fix getting the keyboard brightness value Attachment 255133 [details] pushed as 4b16aad - power: Fix getting the keyboard brightness value
Attachment 254286 [details] pushed as 33c8a87 - power: Default to the kbd backlight being unavailable
I'm still seeing the ghost slider in the power panel, with .92 of everything
(In reply to comment #12) > I'm still seeing the ghost slider in the power panel, with .92 of everything I can't reproduce that bug on the thinkpad. The debug output at the very least would be helpful.
Created attachment 255486 [details] gnome-control-center output
Created attachment 255487 [details] gnome-settings-daemon output
(gnome-control-center:18784): GLib-CRITICAL **: g_variant_get_uint32: assertion 'g_variant_is_of_type (value, G_VARIANT_TYPE_UINT32)' failed smells like Rui's patch in commit 4b16aad36cb80d2869d861b1f1e797fd128c852d: - brightness = g_variant_get_uint32 (result); + brightness = g_variant_get_int32 (result); Are you sure this is 3.9.92?
$ rpm -q gnome-settings-daemon control-center gnome-settings-daemon-3.9.92-1.fc20.x86_64 control-center-3.9.92-1.fc20.x86_64
Oh dang, ignore me - this was a jhbuild control-center, probably older