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 734074 - Keyboard backlight set at max at startup
Keyboard backlight set at max at startup
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-31 20:15 UTC by openoliv
Modified: 2014-09-04 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: '0' keyboard backlight is a valid value (1.20 KB, patch)
2014-09-04 11:15 UTC, Bastien Nocera
committed Details | Review

Description openoliv 2014-07-31 20:15:10 UTC
Hi,

when starting up Gnome the keyboard backlight is set at max intensity.
Which is an issue for me :
- it wastes battery from the start
- it means that gnome doesn't remember the previous settings, which it does for the screen  backlight, so it should be possible to do it for the keybaord backlight too I guess...

I tried to make it turned off at start using some udev, systemd and autostart scripts but it didn't work (https://bbs.archlinux.org/viewtopic.php?id=184187)

It looks like a bug ?

If you need details, plz tell me.

Regards,
Olivier
Comment 1 q8311692 2014-08-14 12:26:25 UTC
I can confirm this on Fedora 20 with COPR repo for gnome 3.14 enabled.

There seems to be the same or a similar bug:

https://bugzilla.gnome.org/show_bug.cgi?id=688705
Comment 2 q8311692 2014-08-14 12:27:16 UTC
IMO default behaviour should always be a sane value, like a keyboard backlight at 0, not the maximum value.
Comment 3 Bastien Nocera 2014-08-14 17:27:45 UTC
systemd's systemd-backlight service is the one remembering the backlight level when shutting down, and restoring it on boot up. GNOME doesn't do that.
Comment 4 openoliv 2014-09-03 14:46:58 UTC
Hi Bastien,

any idea what I should do ?

I tried to play with systemd but without success... Should I continue on this way or should post a bug somewhere (systemd ?) ?

Regards
Comment 5 Bastien Nocera 2014-09-03 16:03:48 UTC
(In reply to comment #4)
> Hi Bastien,
> 
> any idea what I should do ?
> 
> I tried to play with systemd but without success... Should I continue on this
> way or should post a bug somewhere (systemd ?) ?

What does "play with systemd" mean?

If systemd is installed correctly and a new enough version, you can check that it's saving files in /var/lib/systemd/backlight/ one of which should be for your keyboard backlight.

If it doesn't save any files there, file a bug against systemd. If it's saving and restoring the value correctly but the backlight is still at the max on startup, then it might be a bug in gnome-settings-daemon.
Comment 6 openoliv 2014-09-04 08:41:37 UTC
Some system info:
# systemctl --version
systemd 216
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN 

# gdm --version
GDM 3.12.2

# uname -a
Linux azerty 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux

Here are the files :

/var/lib/systemd/backlight/pci-0000:00:02.0:backlight:intel_backlight
::::::::::::::
4296

/var/lib/systemd/backlight/platform-asus-nb-wmi:backlight:asus-nb-wmi
::::::::::::::
100

/var/lib/systemd/backlight/platform-asus-nb-wmi:leds:asus::kbd_backlight
::::::::::::::
0


So I notice :
1) something so obvious that I missed it : the display backlight is always at max when booting. systemd doesn't save the current level when I quit. systemd issue ?

2) systemd saves the current keyboard backlight level when It quit. But when I start again it's still at max. gnome-settings_daemon issue ?
Comment 7 Bastien Nocera 2014-09-04 11:15:22 UTC
Sigh, was too quick saying it wasn't a gnome-settings-daemon bug:
https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/power/gsd-power-manager.c#n1893

       /* set brightness to max if not currently set so is something
         * sensible */
        if (manager->priv->kbd_brightness_now <= 0) {
Comment 8 Bastien Nocera 2014-09-04 11:15:40 UTC
Created attachment 285347 [details] [review]
power: '0' keyboard backlight is a valid value

It's not the screen where you can't see anything if the backlight isn't
on, it's a keyboard.

Make sure to only reset the keyboard backlight to the maximum when
there's an error reading that value.
Comment 9 Bastien Nocera 2014-09-04 11:17:55 UTC
Fixed in 3.8, 3.10, 3.12 and master for 3.14

Attachment 285347 [details] pushed as c311de7 - power: '0' keyboard backlight is a valid value