Bug 1348156 - lenovo x240 gets keyboard backlight on automatically [NEEDINFO]
Summary: lenovo x240 gets keyboard backlight on automatically
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-20 10:06 UTC by Dalibor Pospíšil
Modified: 2020-07-17 17:52 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
fedora: needinfo? (kernel-maint)


Attachments (Terms of Use)

Description Dalibor Pospíšil 2016-06-20 10:06:32 UTC
Description of problem:
Starting kernel-core-4.5.5-201.fc23.x86_64 or so mate-power-manager turns keyboard backlight on at startup and after resume from suspend. It looks like new kernel enables access to some features which were not available before. After uninstalling mate-power-manager the stops to happen.

Version-Release number of selected component (if applicable):
mate-power-manager-1.12.1-1.fc23.x86_64

How reproducible:
100%

Steps to Reproduce:
1. have kernel kernel-core-4.5.5-201.fc23.x86_64 or newer
2. login to MATE session / resume to MATE from suspend

Actual results:
keyboard backlight is turned on

Expected results:
keyboard backlight stays untouched

Comment 1 Wolfgang Ulbrich 2016-06-20 10:57:28 UTC
Unfortunately i do not have a keyboard with backlight for reproducing.
But there are some gsettings keys for kbd-backlight.
org.mate.power-manager
[rave@mother ~]$ gsettings list-keys org.mate.power-manager
<cut>
kbd-brightness-on-ac
kbd-brightness-dim-by-on-idle
kbd-brightness-dim-by-on-battery
kbd-backlight-battery-reduce
<cut>

Maybe it helps to play arround with them.

And with a older kernel this does not happen?

Comment 2 Dalibor Pospíšil 2016-06-20 12:00:52 UTC
(In reply to Wolfgang Ulbrich from comment #1)
> Unfortunately i do not have a keyboard with backlight for reproducing.
> But there are some gsettings keys for kbd-backlight.
> org.mate.power-manager
> [rave@mother ~]$ gsettings list-keys org.mate.power-manager
> <cut>
> kbd-brightness-on-ac
> kbd-brightness-dim-by-on-idle
> kbd-brightness-dim-by-on-battery
> kbd-backlight-battery-reduce
> <cut>
how should I set those values to instruct power manager not to touch it?
> 
> Maybe it helps to play arround with them.
> 
> And with a older kernel this does not happen?
with kernel kernel-core-4.4.10-200.fc22.x86_64 it does not happen

Comment 3 Wolfgang Ulbrich 2016-06-20 12:21:51 UTC
Try those settings disable keyboard brightness.

[rave@mother ~]$ gsettings get org.mate.power-manager kbd-brightness-dim-by-on-battery
0
[rave@mother ~]$ gsettings get org.mate.power-manager kbd-brightness-dim-by-on-idle
0
[rave@mother ~]$ gsettings get org.mate.power-manager kbd-brightness-on-ac
0

Use 'gsettings set ......' or dconf-editor.

In dconf-editor you see a description what every key does.

Comment 4 Dalibor Pospíšil 2016-06-20 13:01:27 UTC
(In reply to Wolfgang Ulbrich from comment #3)
> Try those settings disable keyboard brightness.
> 
> [rave@mother ~]$ gsettings get org.mate.power-manager
> kbd-brightness-dim-by-on-battery
> 0
> [rave@mother ~]$ gsettings get org.mate.power-manager
> kbd-brightness-dim-by-on-idle
> 0
> [rave@mother ~]$ gsettings get org.mate.power-manager kbd-brightness-on-ac
> 0
with all those values set to 0 the backlight still turns on after login

Comment 5 Wolfgang Ulbrich 2016-06-20 13:20:52 UTC
Ok, we need help from kernel devs.

Comment 6 Wolfgang Ulbrich 2016-06-20 13:22:29 UTC
Dear kernel devs,
can you please point us to the change in kernel which causes the issue?
And are adjustments needed for mate-power-manager?

Comment 7 gingerling 2016-06-27 13:14:50 UTC
I have this, when my screen brightness dims and my laptop starts to go into sleep mode, even if I catch it an hit a key to keep it away, the backlight comes on. Drives me mad at night lol.

Comment 8 Joonas Kylmälä 2016-07-09 14:20:46 UTC
I'm running kernel 4.6.3-300.fc24.x86_64 on Fedora 24 and keyboard backlight turned on after sleep automatically for me, too (it was disabled before going to sleep). That happened yesterday and today I'm not able to reproduce the issue anymore (I will try still for a while so maybe it would happen again). However, if I have enabled keyboard backlight before going to sleep it won't be turned on after I resume from the sleep. So looks like there is some problem with saving and restoring the keyboard backlight's state.

My system is Lenovo ThinkPad x260 and I'm running the Gnome desktop environment. Maybe thinkpad_acpi kernel module might have something to do with this problem? At least for me the module handles the keyboard backlight.

There has been similar issues in Ubuntu: <https://bugs.launchpad.net/dell-sputnik/+bug/1510344>. Looks like they solved the problem with some system daemon: <https://code.launchpad.net/~3v1n0/unity-settings-daemon/kbd-brightness-update>.

Comment 9 Christian Dersch 2016-07-10 10:43:27 UTC
Same here, X230 and T450s, KDE Plasma. Started with kernel 4.5.x, was fine before.

Comment 10 Wolfgang Ulbrich 2016-07-11 08:08:46 UTC
I will try to backport the fix for g-s-d or u-s-d mentioned in launchpad report.
Not sure if that will be easy as mate-power-manager use glib-dbus and not GDbus.

Comment 11 Joonas Kylmälä 2016-07-11 18:59:32 UTC
For me, x260 thinkpad, changing the line in gsd-power-manger.c to
         if (manager->priv->kbd_brightness_now < 0) {                            
didn't fix the problem.

Comment 12 Joonas Kylmälä 2016-07-11 19:03:43 UTC
So the bug in my case is not in that particular piece of code because it sets the kb backlight to max and for me it sets it to 1 (my kb backlight is in scale of 0-2). It sets it to 1 nevertheless if it's before going to sleep 0 or 2.

Comment 13 Wolfgang Ulbrich 2016-07-11 21:44:39 UTC
(In reply to Joonas Kylmälä from comment #11)
> For me, x260 thinkpad, changing the line in gsd-power-manger.c to
>          if (manager->priv->kbd_brightness_now < 0) {                       
> 
> didn't fix the problem.

So, you're using gnome?

Comment 14 Joonas Kylmälä 2016-07-12 06:26:00 UTC
Wolfgang, yes I am using gnome. And the patch "if (manager->priv->kbd_brightness_now < 0)" is already in the the repo.

Comment 15 Wolfgang Ulbrich 2016-07-12 06:45:46 UTC
Ok, than it is is a distro wide problem as it happens with all DEs.
So, it would be nice if some of the kernel folk can look into it.

Comment 16 Joonas Kylmälä 2016-08-13 18:59:16 UTC
The kernel commit (in 4.7) afcedebc6a094224973534f43b396bbbf33fe44e (thinkpad_acpi: save kbdlight state on suspend and restore it on resume) might solve this problem. I have not tested this patch on Fedora so I don't know. On Debian GNU/Linux this didn't fix the problem in case of x260. If I have time I will try some rawhide fedora kernel and see if the kb backlight resume works there. Also, it might be useful to ask the author on which devices the patch makes the kb backlight resume work.


Note You need to log in before you can comment on or make changes to this bug.