You are not logged in.

#1 2014-09-02 19:05:59

altschuler
Member
Registered: 2014-09-02
Posts: 4

Controlling keyboard backlight timeout on Dell XPS 13

I have a Dell XPS 13 Developer edition (the one that comes with Ubuntu). The keyboard backlight dims after about a minute of keyboard inactivity (no key presses). I'd like to extend this timeout or even make it permanent.

I've looked across the internet and thought I came close when I looked in /sys/devices/platform/dell-laptop and /sys/class/leds/phy0-led, but nothing worked so far.

A way of setting the backlight through the command line would probably suffice, as I could just create a script to bump up the light every once in a while.

Note that I can control the light via Fn+F6, and it turns on automatically when I press a key on the built-in keyboard.

Thanks in advance!

Offline

#2 2014-09-02 22:41:32

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Controlling keyboard backlight timeout on Dell XPS 13

altschuler wrote:

Note that I can control the light via Fn+F6, and it turns on automatically when I press a key on the built-in keyboard.

 Then you could use something like this:

while :; do
 xdotool key shift;
 sleep 55;
done;

Have you tried xset to control the light? Check dmesg or journalctl just after it dims/switches off.

Offline

#3 2014-09-03 05:57:08

altschuler
Member
Registered: 2014-09-02
Posts: 4

Re: Controlling keyboard backlight timeout on Dell XPS 13

I see nothing related to it in either dmesg og journalctl (tried as root as regular user). For some reason the Fn+F6 combination isn't recognized by xev (like the volume function keys are), so I have no idea what key id it is.

Is it possible that it is simply a hardwired configuration from Dell that can't be changed?

Offline

#4 2014-09-03 09:45:45

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Controlling keyboard backlight timeout on Dell XPS 13

It might be a non-standard signal Fn+F6 is sending through the keyboards controller. You should be able to find technical documentation on the keyboard[s controller], it should be mentioned there. You could also monitor events with 'udevadm monitor -kp', but I doubt it will be registered. Maybe it is worth the time to take a look at pyalienfx, the lights might be handled in a similar way. So I assume, my suggestion does not work for you? I would 'find /sys/{class,devices} -type f' before and after lights were switched off, and compare them.

Offline

#5 2015-02-05 11:32:30

altschuler
Member
Registered: 2014-09-02
Posts: 4

Re: Controlling keyboard backlight timeout on Dell XPS 13

I got this solved by using libsmbios.

There was a bug in /usr/share/smbios-utils/cli.py so I had to wrap the sys.stdout.write(c) call on line 111 in a try/except.

Then I got all the bios tokens listed using

sudo smbios-token-ctl -d

and found that the Keyboard Illumination token had id 0x01e2.

Finally I was able to set the backlight permanently on with

sudo smbios-token-ctl -i 0x01e2 --set-string true

Silence, at last.

Thanks to http://xps13-9333.appspot.com

Offline

#6 2015-07-19 23:26:32

jpb1linux
Member
Registered: 2015-07-19
Posts: 1

Re: Controlling keyboard backlight timeout on Dell XPS 13

Would you please post exactly how you wrapped sys.stdout.write(c) call on line 111 in a try/except. Thanks.

Offline

#7 2015-10-13 15:30:55

rjs02
Member
Registered: 2015-10-13
Posts: 7

Re: Controlling keyboard backlight timeout on Dell XPS 13

jpb1linux wrote:

Would you please post exactly how you wrapped sys.stdout.write(c) call on line 111 in a try/except. Thanks.

From line 111 in /usr/share/smbios-utils/cli.py, change:

sys.stdout.write(c)
chars_printed = chars_printed + 1
if chars_printed > line_len:
    sys.stdout.write("\n")
    chars_printed=index
    sys.stdout.write(" "*indent)

To:

try :
    sys.stdout.write(c)
except :
    pass
chars_printed = chars_printed + 1
if chars_printed > line_len:
    sys.stdout.write("\n")
    chars_printed=index
    sys.stdout.write(" "*indent)

However, I am using an XPS 13 9343 (not the developer edition) and I do not have a token for Keyboard Illumination (On). All I have is 0x01e1 - Keyboard Illumination (Off).

Last edited by rjs02 (2015-10-13 16:28:58)

Offline

Board footer

Powered by FluxBB