After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706040 - power: keyboard brightness shows up uninvited
power: keyboard brightness shows up uninvited
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Power
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
Control-Center Maintainers
3.10
: 707558 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-08-15 00:51 UTC by Matthias Clasen
Modified: 2013-09-21 15:25 UTC
See Also:
GNOME target: 3.10
GNOME version: ---


Attachments
power: Avoid warning with no keyboard backlight (1.19 KB, patch)
2013-08-20 02:30 UTC, Bastien Nocera
committed Details | Review
power: Default to the kbd backlight being unavailable (1.60 KB, patch)
2013-09-06 17:11 UTC, Bastien Nocera
committed Details | Review
power: Fix getting the keyboard brightness value (806 bytes, patch)
2013-09-17 19:21 UTC, Rui Matos
committed Details | Review
gnome-control-center output (2.06 KB, text/plain)
2013-09-21 14:56 UTC, Matthias Clasen
  Details
gnome-settings-daemon output (51.66 KB, text/plain)
2013-09-21 14:57 UTC, Matthias Clasen
  Details

Description Matthias Clasen 2013-08-15 00:51:39 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)
Comment 1 Bastien Nocera 2013-08-20 02:30:31 UTC
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.
Comment 2 Bastien Nocera 2013-08-20 02:40:44 UTC
Attachment 252331 [details] pushed as f7c5225 - power: Avoid warning with no keyboard backlight
Comment 3 Matthias Clasen 2013-09-06 01:59:30 UTC
I still have a keyboard backlight slider showing up uninvited on my thinkpad.
Comment 4 Bastien Nocera 2013-09-06 05:16:16 UTC
*** Bug 707558 has been marked as a duplicate of this bug. ***
Comment 5 Sebastian Keller 2013-09-06 16:26:09 UTC
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
Comment 6 Bastien Nocera 2013-09-06 17:11:12 UTC
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.
Comment 7 Matthias Clasen 2013-09-08 15:57:07 UTC
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.
Comment 8 Rui Matos 2013-09-17 16:59:57 UTC
Review of attachment 254286 [details] [review]:

This looks correct to me and works on a laptop without keyboard backlight
Comment 9 Rui Matos 2013-09-17 19:21:01 UTC
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 10 Rui Matos 2013-09-17 19:23:24 UTC
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
Comment 11 Rui Matos 2013-09-17 19:26:20 UTC
Attachment 254286 [details] pushed as 33c8a87 - power: Default to the kbd backlight being unavailable
Comment 12 Matthias Clasen 2013-09-21 01:03:26 UTC
I'm still seeing the ghost slider in the power panel, with .92 of everything
Comment 13 Bastien Nocera 2013-09-21 10:46:45 UTC
(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.
Comment 14 Matthias Clasen 2013-09-21 14:56:41 UTC
Created attachment 255486 [details]
gnome-control-center output
Comment 15 Matthias Clasen 2013-09-21 14:57:08 UTC
Created attachment 255487 [details]
gnome-settings-daemon output
Comment 16 Bastien Nocera 2013-09-21 15:04:43 UTC
(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?
Comment 17 Matthias Clasen 2013-09-21 15:15:44 UTC
$ 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
Comment 18 Matthias Clasen 2013-09-21 15:25:02 UTC
Oh dang, ignore me - this was a jhbuild control-center, probably older