Bug 191731

Summary: Keyboard backlight on Dell E7470 not adjustable from /sys entry
Product: Drivers Reporter: Bas Zoetekouw (bas)
Component: Platform_x86Assignee: drivers_platform_x86 (drivers_platform_x86)
Status: NEW ---    
Severity: normal CC: arcadiy, nunojpg
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.9.0 Subsystem:
Regression: No Bisected commit-id:

Description Bas Zoetekouw 2017-01-02 14:41:09 UTC
On my new Dell E7470, the keyboard backlight driver doesn't seem to work correctly.  I can contral the backlight using the keyboard (Fn+F10), but the /sys interface seems to be malfunctioning:
  
The dell_laptop driver does provide entries in /sys (in /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight).  Reading from the "brighness" entry there works fine (and the entry returned corresponds with reality), but writing to "brightness" has no, or incorrect effects:


╰─▶ cat brightness 
0

╰─▶ echo -n 1 > brightness 

╰─▶ cat brightness        
2

╰─▶ echo 0 > brightness 

╰─▶ cat brightness 
2

╰─▶ echo -n 0 > brightness 

╰─▶ cat brightness 
2


In addition, there is a warning (error?) in dmesg for each write to "brightness":

[26628.114977] dell_laptop: Setting old previous keyboard state failed
Comment 1 Bas Zoetekouw 2017-01-02 14:42:13 UTC
Oh, and for completeness sake:

╭╴root@regan:dell-laptop/leds/dell::kbd_backlight                                                    
╰─▶ ls -la
total 0
drwxr-xr-x 3 root root    0 jan  1 21:24 ./
drwxr-xr-x 3 root root    0 jan  1 21:24 ../
-rw-r--r-- 1 root root 4,0K jan  2 15:39 brightness
lrwxrwxrwx 1 root root    0 jan  2 15:41 device -> ../../../dell-laptop/
-r--r--r-- 1 root root 4,0K jan  2 11:38 max_brightness
drwxr-xr-x 2 root root    0 jan  2 15:33 power/
-rw-r--r-- 1 root root 4,0K jan  2 15:33 start_triggers
-rw-r--r-- 1 root root 4,0K jan  2 15:33 stop_timeout
lrwxrwxrwx 1 root root    0 jan  2 11:02 subsystem -> ../../../../../class/leds/
-rw-r--r-- 1 root root 4,0K jan  2 15:33 trigger
-rw-r--r-- 1 root root 4,0K jan  1 21:24 uevent

╭╴root@regan:dell-laptop/leds/dell::kbd_backlight                                                   
╰─▶ cat max_brightness 
2
Comment 2 Arcadiy Ivanov 2017-03-30 16:59:31 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1436686

leds dell::kbd_backlight: Setting an LED's brightness failed (-6) on Dell Precision 7510/0M91XC and 4.10.5-200

[    5.536399] dell_laptop: Setting old previous keyboard state failed
[    5.536434] leds dell::kbd_backlight: Setting an LED's brightness failed (-6)
[   16.228184] dell_laptop: Setting old previous keyboard state failed
[   16.228189] leds dell::kbd_backlight: Setting an LED's brightness failed (-6)
[  519.918079] dell_laptop: Setting old previous keyboard state failed
[  519.918085] leds dell::kbd_backlight: Setting an LED's brightness failed (-6)
[  549.868267] dell_laptop: Setting old previous keyboard state failed
[  549.868271] leds dell::kbd_backlight: Setting an LED's brightness failed (-6)
Comment 3 Arcadiy Ivanov 2017-04-23 04:58:31 UTC
https://github.com/torvalds/linux/pull/407
Comment 4 Arcadiy Ivanov 2017-04-23 20:35:07 UTC
This will be fixed in https://patchwork.kernel.org/patch/9695271/
Comment 5 Arcadiy Ivanov 2017-05-06 10:41:28 UTC
This has now been fixed in master: https://github.com/torvalds/linux/commit/9216e0dcb5533a999d544d0af8661118e0588e1d