Bug 32742 - Keyboard backlight does not work on Toshiba Satellite M series laptops
Summary: Keyboard backlight does not work on Toshiba Satellite M series laptops
Status: ASSIGNED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: All Linux
: P1 low
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
URL: https://bugs.launchpad.net/ubuntu/+so...
Keywords:
Depends on: 59231
Blocks: 56331
  Show dependency tree
 
Reported: 2011-04-05 19:20 UTC by njin
Modified: 2023-11-24 16:35 UTC (History)
24 users (show)

See Also:
Kernel Version: 3.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
AcpiTables.txt (365.92 KB, text/plain)
2011-04-05 19:21 UTC, njin
Details
BootDmesg.txt (61.47 KB, text/plain)
2011-04-05 19:22 UTC, njin
Details
Device driver targeting specific features of the TOS1900 ACPI device. (35.00 KB, text/x-csrc)
2013-05-26 13:35 UTC, Isaac Lenton
Details
DSDT dat (70.76 KB, application/x-ns-proxy-autoconfig)
2015-08-04 18:26 UTC, Valerie Garrison
Details

Description njin 2011-04-05 19:20:01 UTC
Disabling ACPI causes the keyboard backlight to work perfectly. However, this has the unfortunate side effect of disabling monitor brightness control and suspend ability (and likely other things).
Comment 1 njin 2011-04-05 19:21:13 UTC
Created attachment 53582 [details]
AcpiTables.txt
Comment 2 njin 2011-04-05 19:22:20 UTC
Created attachment 53592 [details]
BootDmesg.txt
Comment 3 njin 2011-04-05 19:23:24 UTC
More log files in the linked Launchpad report.
Thanks
Fabio
Comment 4 Zhang Rui 2012-01-18 03:25:55 UTC
It's great that the kernel bugzilla is back.

Can you please verify if the problem still exists in the latest upstream kernel?
Comment 5 njin 2012-01-23 14:39:25 UTC
Hello, welcome back
Actually this is no more reproducible in this netbook, probably fixed in 3.0.0 series.
Thanks
Fabio
Comment 6 njin 2012-01-23 14:40:13 UTC
sorry, I close the wrong report, reopened
Comment 7 Matt White 2012-01-23 15:27:46 UTC
This is still an issue for me.
Comment 8 Dennis Sosnoski 2012-06-10 21:26:56 UTC
Issue for me, too, and judging from distro forums for many others as well.

The backlit keyboard was one of the main factors in choosing my laptop (Satellite P750D).
Comment 9 Zhang Rui 2012-11-13 08:51:01 UTC
(In reply to comment #6)
> sorry, I close the wrong report, reopened

what do you mean? the bug is fixed or not?

Matt and Dennis,
does "poking /sys/class/backlight" change the backlight for you?
Comment 10 Dennis Sosnoski 2012-11-14 18:38:03 UTC
I'll try that out and respond. Meanwhile, the bug is definitely not fixed. Here's some more details on the problem and a hardware workaround.

The keyboard backlight is initially on when you turn on the laptop (if enabled in BIOS), but if you have ACPI enabled it normally shuts off as soon as you start to boot into Linux (immediately after the GRUB boot screen).

However, you can make it work (at least I can, on my Satellite P750D) with some trickery. I replaced the harddrive that came with the system with an SSD containing my Linux installation (currently OpenSuse 12.2). If I restore the original harddrive and boot Windows, then turn off the laptop with the power switch (not going through Windows shutdown), switch back to my SSD and reboot into Linux, the keyboard backlight stays on (so does the Toshiba illumination light, but you can turn this off in the BIOS before booting into Linux without any problem). The backlight timeout works properly, too, so if you don't hit a key for the set timespan the light goes out until you do hit another key.

Once I've done this procedure the backlight continues to operate until I completely shut off power to the laptop (no battery or completely dead battery, no line power). If this happens I'm back to the original state.

I've seen reference to using Windows hibernate rather than a power-off for the same purpose. I'd originally tried that and found it worked, but wiped out my Linux installation once when restarting after the hibernate. Hard power off on Windows is safer.

I don't know why the abnormal Windows shutdown causes this to remain enabled in Linux, while the normal Windows shutdown does not. But it's nice to finally have a use for that Windows system I paid for as part of the laptop.
Comment 11 Zhang Rui 2012-11-21 01:42:21 UTC
Matthew,
do you know if the keyboard backlight is controlled via ACPI by toshiba_acpi driver?
Comment 12 Matt White 2012-12-02 00:40:14 UTC
How can I tell which driver is controlling the keyboard backlight for sure? I see this output in dmesg - does that mean it's using toshiba_acpi?

[   16.656362] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.19
Comment 13 Isaac Lenton 2013-02-13 14:17:40 UTC
I have been looking into this issue on another laptop in the P750 series.  On my laptop, the toshiba_acpi driver doesn't seem to cover Toshiba's back-light with the TOS1900 device, only the illumination LED [LEDO] (around the mouse).

From what I can gather about Toshiba's newer laptops, they include a keyboard back-light timer that will dim/turn off the keyboard back-light if no key is pressed for a while.  When a key is pressed again, the back-light will turn back on.  This feature on the TOS1900 device is separated from the illumination LED and writes to a different part of the embedded controller responsible for back-light and other useful features.

I wrote a little code segment that allowed me to set the appropriate bits using acpi_evaluate_object, this allowed me to 'turn on' the keyboard back-light and set the back-light time-out, these changes are visible in the system bios and work when windows is booted however the actual back-light does not turn on.

Offset (0x05),
HKEV,   1,        /* Unknown -- TOI1 = 0x1E (I haven't translated this yet) */
HKHS,   1,        /* Unknown -- TOI1 = 0x1E (I haven't translated this yet) */
    ,   1,
LEDO,   1,        /* Illumination LED (already handled by toshiba_acpi) */

...

Offset (0x35),
KBBM,   5,        /* Keyboard Backlight -- Mode (On, Timed or Off) */
    ,   2,        /* Alt. Keyboard Backlight  (Legacy, Not Used) */
KBBL,   1,        /* The bit I have a hunch about... */
KBBT,   6,        /* Keyboard Backlight -- Timer */


There is one other bit on the embedded controller that I currently have a hunch about [KBBL], but unfortunately there is no convenient method in the ACPI DSDT for my system.  I will continue working on this issue because the back-light is not the only feature on my TOS1900 device that is currently only fully available on windows (proper fan control, processor power save, ...).

Could you possibly upload your DSDT file, found at /sys/firmware/acpi/tables/DSDT, you may need sudo privileges to view.
Comment 14 Matt White 2013-02-16 17:45:07 UTC
This is fixed for me as of 3.5.0-18. Thanks to whomever deserves it!
Comment 15 Aaron Lu 2013-03-28 08:17:00 UTC
What's the status of this bug, anyone still has the problem?
Comment 16 Isaac Lenton 2013-03-29 01:54:49 UTC
Yep, still an issue on the P750.  I'm off working on other things at the moment so it will be a couple of months before I get back to trying to fix this problem.
Comment 17 Aaron Lu 2013-04-07 08:28:46 UTC
OK, thanks Isaac.
And since this bug doesn't belong to acpi/video module, I'll move it to platform-x86 category.
Comment 18 Isaac Lenton 2013-05-22 23:41:07 UTC
I just updated to the latest stable kernel in my distro.  Keyboard back-light now persists after boot, keyboard controls don't work (probably a distro issue not a kernel problem).

The command

su -c 'echo 0 > brightness'

for the illumination device now toggles both mouse illumination and button strip illumination (previously only mouse illumination).

I can't see a device for controlling keyboard back-light, I might have missed it but I will look into it.
Comment 19 Isaac Lenton 2013-05-26 13:35:46 UTC
Created attachment 102601 [details]
Device driver targeting specific features of the TOS1900 ACPI device.

The attached driver fixes many of the issues I have had with illumination and the keyboard back-light.  The driver is not finished and I don't know how well it will work on other machines, but for my purposes it does the job.  I can also provide a patch if needed.

If I get time I will probably continue work on this driver and the toshiba_acpi.c driver.  I'm not entirely sure where to go next, as I see it there are two options:

- Merge this driver with toshiba_acpi.c

- Make this driver device (TOS1900) specific and separate from toshiba_acpi.c

Both have there Pros and Cons, any suggestions?

PS: Word of note for using the driver, most options the driver controls can be changed in the BIOS however some options (fast_boot) may prevent access to the BIOS (not entirely sure why, need to look into this).
Comment 20 Marcelo Ruiz 2013-06-03 16:20:53 UTC
I just installed the kernel 3.9.3 and the keyboard backlight works...
Comment 21 Isaac Lenton 2013-06-03 23:29:44 UTC
Good to hear,

    - What model of Toshiba laptop are you using?
    - Do the function keys controlling keyboard back-light work?

Thanks.
Comment 22 Marcelo Ruiz 2013-06-04 03:40:37 UTC
It's my girlfriend's computer: Satellite M640-BT2N22. The backlight is set to auto in the BIOS, so while you type it turns on and then after 15 seconds it turns off. This was not working with kernel versions previous to 3.9.
I won't be able to put my hands on the laptop until the end of July, so I cannot conduct any tests (like changing the BIOS configuration to find out if Fn+Z actually works).
Comment 23 The Dyzaster 2014-02-21 11:57:53 UTC
I'm having this same issue as well, I haven't tried to disable ACPI and see if that works, i have a Toshiba P850 and i picked it specifically for this feature, hoping to get it working soon.
Comment 24 systemsonlineandready 2014-03-20 05:02:45 UTC
Keyboard backlight is still shut off for my Toshiba too, a Qosmio X770 with Arch Linux. Normal stuff as reported, it's on until I boot into Linux, then it's off and nothing can get it back on unless I reboot.
Comment 25 The Dyzaster 2014-04-10 00:22:05 UTC
Yea the issue is definitely kernel related, as it works with BIOS no problem. Like i said mines a Toshiba P850, if anyone knows of a way to fix it manually please let me know, I've been waiting about a year for an update so right now i just want it fixed lol. 

Thanks :D
Comment 26 The Dyzaster 2014-04-10 00:23:15 UTC
Oh, and my current kernel version is: linux-3.14-4-x86_64 Arch Linux (Literally just upgraded as I'm typing this, will post back if this one fixes it but its highly doubtful)
Comment 27 Azael Avalos 2014-08-08 15:26:32 UTC
Keyboard backlight support has been added since kernel version 3.15 (see commit 360f0f39d0c58432574655008ec8dd15e52e1e8d), try with kernel version 3.15 or above.

Cheers
Comment 28 The Dyzaster 2014-08-08 22:15:12 UTC
3.15.8-1-ARCH #1 SMP PREEMPT Fri Aug 1 08:51:42 CEST 2014 x86_64 GNU/Linux


Still not working...
Comment 29 Azael Avalos 2014-08-09 00:43:30 UTC
There are two files under the TOS1900:00 device in the sysfs tree, kbd_backlight_mode and kbd_backlight_timeout, 'tho the latter only appears when the backlight mode is set to Auto (mode 2).

Check the output of
cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode

It should give you either 1 or 2 (1 = FN-Z and 2 = Auto). If the output is 1, there should be an entry named "toshiba::kbd_backlight" under "/sys/class/leds",
if so, then do the following as root and see if your keyboard turns on/off.

To turn the keyboard LED on
echo "1" > /sys/class/leds/toshiba::kbd_backlight/brightness

To turn the keyboard LED off
echo "0" > /sys/class/leds/toshiba::kbd_backlight/brightness

Now if the output was 2, the keyboard backlight is set to auto, to set it to FN-Z, simply do the following as root and then restart your computer for the new mode to take effect.

echo "1" > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
Comment 30 The Dyzaster 2014-08-09 01:27:33 UTC
Under /sys/class/leds/ I have:

phy0-led@           toshiba::eco_mode@


When i enter:
echo "1" > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
It tells me permission denied, and when i cat that file, it comes back with "0", not 1 nor 2
Comment 31 The Dyzaster 2014-08-09 01:33:55 UTC
And when i try to do: echo "1" > /sys/class/leds/toshiba::kbd_backlight/brightness
It says: zsh: no such file or directory: /sys/class/leds/toshiba::kbd_backlight/brightness


As i said, the toshiba::kbd_backlight does not exist under the led directory, and the weird part about it is that i know for a fact i had that file before.... But i have not tried to work on it since i reported this bug, and i know that file existed back then.
Comment 32 Azael Avalos 2014-08-09 03:54:58 UTC
Please attach your full dmesg, dmidecode and DSDT (or acpidump) output, and lets hope the keyboard backlight method is exposed so I can take a look and see why is not working.
Comment 33 Noé Godinho 2014-08-09 15:22:04 UTC
My laptop is a qosmio x770 and it has ubuntu 14.04 64-bit and kernel 3.15.9-031509-generic.
When I do "cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode", the output is always 2, even after doing "echo "1" > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode" as root and restarting.
Also, the output is 2, only when I have the keyboard backlight set as "timer" on BIOS, if I have "on" or "off", the output is 0.
Nevertheless, the backlight is always off, since the moment I choose ubuntu on grub.
Comment 34 Marcelo Ruiz 2014-08-09 16:00:22 UTC
Hi, I have the same problem with my Toshiba Satellite m645.
Maybe my output would be useful too, so here it goes:

The structure of the leds folder is:

leds # ls
mmc0::  toshiba::eco_mode  toshiba::illumination

and toshiba::illumination contains:

toshiba::illumination # ls
brightness  device  max_brightness  power  subsystem  trigger  uevent

cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode gives me: 
0

The requested output follows:

dmesg output:     http://pastebin.com/A83Qtn3z

dmidecode output: http://pastebin.com/Aaxu2b2e

acpidump output:  http://pastebin.com/t4ALxWB6
Comment 35 Marcelo Ruiz 2014-08-09 16:03:09 UTC
Made a mistake in my previous comment. My Toshiba Satellite is M640-BT2N22
Comment 36 Marcelo Ruiz 2014-08-09 16:24:43 UTC
Funny, in my Toshiba Qosmio X500 with the kernel 3.16 the backlight keyboard is now working with Fn+Z. In this case the files exist and the outputs are as expected.
Comment 37 Noé Godinho 2014-08-09 17:20:04 UTC
Tried kernel 3.16.0-031600-generic and the problem persists.



I forgot to put the outputs, here they are:

dmesg: http://pastebin.com/LWCfeyFj

dmidecode: http://pastebin.com/6gPdjUWB

acpidump: http://pastebin.com/BuEEeJv8
          http://pastebin.com/DRXeKiqS
Comment 38 The Dyzaster 2014-08-09 20:01:35 UTC
ACPIDUMP: http://bpaste.net/show/584231/
Dmesg: http://bpaste.net/show/584232/
Dmidecode: http://bpaste.net/show/584235/

Those are my logs, i have tried FN+Z multiple times, (Thats what my keyboard shows it is) And I've tried adding the use of CTRL and ALT incase those are required due to BIOS settings (Though i know i don't need to do that with any other hotkeys anymore, i set it back to the correct way, but i just wanted to try) No luck though.I still don't know where my "toshiba::illumination" went, right now I'm trying to search my entire HDD to see if by chance it got moved by something, but i doubt there will be any results.
Comment 39 The Dyzaster 2014-08-09 20:02:41 UTC
Also, just to add on, i have a Toshiba P850, incase you didn't see that above.
Comment 40 Azael Avalos 2014-08-11 04:07:32 UTC
Get the modified toshiba_acpi and makefile from the following links and install it (make, sudo make install, make unload, make load), make sure you have gcc, make and kernel-sources installed.

http://pastebin.com/C12WjnyP
http://pastebin.com/Jv0YWma3

Once done the above, reboot and go into BIOS settings and check in which mode your keyboard is set (FN-Z or Auto) and write it down, boot into linux and type

dmesg | grep toshiba_acpi

and please provide the output of it, what I'm interested in are the Current, Default and Maximum values. Reboot and go into BIOS settings (again) and change the mode (if it was in Auto change it to FN-Z, or if it was in FN-Z change it to Auto), and again provide the output of

dmesg | grep toshiba_acpi

Sorry if it is a bit cumbersome.

Cheers
Comment 41 Marcelo Ruiz 2014-08-12 12:42:23 UTC
Can you tell me what I'm doing wrong? I have kernel 3.16 installed in this computer.

sudo apt-get install gcc, make, kernel-sources 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gcc,
E: Unable to locate package make,
E: Unable to locate package kernel-sources

then I downloaded the files you provided but I they don't work:

make
make: *** No targets specified and no makefile found.  Stop.

when hitting download from pastebinit, the downloaed files are:

makefile_for_toshiba_acpi.txt
toshiba_acpi.c.c

Thanks!
Comment 42 Azael Avalos 2014-08-12 15:38:21 UTC
@Marcelo
I don't know the exact names of the packages of your Linux distribution, but googling a bit, read the following page:

https://help.ubuntu.com/community/Kernel/Compile/

As for the files, do the following:

mv makefile_for_toshiba_acpi.txt Makefile
mv toshiba_acpi.c.c toshiba_acpi.c

Then do what I asked.

The keyboard backlight method changed a bit and there seems to be 3 modes of operation on this new method, FN-Z, Auto and some other method unknown to me, but I have a hunch that it might be "disabled", 'tho I need confirmation, as I don't have such hardware to test.
Comment 43 Marcelo Ruiz 2014-08-12 16:19:54 UTC
@Azael

Thanks for the resources. Here is the output for the 3 available settings in the BIOS:

1 - Keyboard Backlight Control Mode = TIMER

dmesg | grep toshiba_acpi

[    7.516473] toshiba_acpi: module verification failed: signature and/or  required key missing - tainting kernel
[    7.516782] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[    7.531500] toshiba_acpi: Current value: 0xf0002
[    7.531505] toshiba_acpi: Maximum value: 0x3c001atoshiba_acpi: Default value: 0xf0002


2 - Keyboard Backlight Control Mode = ON

dmesg | grep toshiba_acpi

[    7.260179] toshiba_acpi: module verification failed: signature and/or  required key missing - tainting kernel
[    7.260486] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[    7.272396] toshiba_acpi: Current value: 0xf0008
[    7.272398] toshiba_acpi: Maximum value: 0x3c001atoshiba_acpi: Default value: 0xf0002


3 - Keyboard Backlight Control Mode = OFF

dmesg | grep toshiba_acpi

[    7.067505] toshiba_acpi: module verification failed: signature and/or  required key missing - tainting kernel
[    7.067830] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[    7.085631] toshiba_acpi: Current value: 0xf0010
[    7.085636] toshiba_acpi: Maximum value: 0x3c001atoshiba_acpi: Default value: 0xf0002


Let me know if you need anything else. I'm more than happy to help
Comment 44 Azael Avalos 2014-08-12 17:01:40 UTC
@Marcelo
Thanks for the provided info, please download the file in the following link and test if it works for you (replace the previous one).

http://pastebin.com/kHNA90A7

The file has been changed to accept the new level (disabled), to change modes do the following as root:

Auto (or TIMER)
echo 2 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode

FN-Z (or ON)
echo 1 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode

Disabled (or OFF)
echo 0 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode

A reboot might be needed after each change 'tho I'm not sure on this new implementation.

When you are in FN-Z (or ON) mode, check the existence of "/sys/class/leds/toshiba::kbd_backlight" folder and test the following as root:

Keyboard Backlight OFF
echo 0 > /sys/class/leds/toshiba::kbd_backlight/brightness

Keyboard Backlight ON
echo 1 > /sys/class/leds/toshiba::kbd_backlight/brightness

Thanks
Comment 45 Marcelo Ruiz 2014-08-12 18:37:59 UTC
@Azael

Unfortunately is not working. I replaced the file (compiled everything again), made a reboot, selected ON in the BIOS and could not find "/sys/class/leds/toshiba::kbd_backlight"

The contents of "/sys/class/leds" folder is the same as before:

/sys/class/leds$ ls
mmc0::  toshiba::eco_mode  toshiba::illumination

Also, I tried the commands to switch the different modes, and it seems only mode 2 (Auto-Timer) is accepted:

# echo 2 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
# echo 1 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
bash: echo: write error: Input/output error
# echo 0 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
bash: echo: write error: Input/output error
# echo 2 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
# echo 0 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
bash: echo: write error: Input/output error
# echo 1 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
bash: echo: write error: Input/output error
Comment 46 Azael Avalos 2014-08-12 19:42:18 UTC
@Marcelo
Download the file from the same link provided and try again, I just added some prints to see where and/or why its failing, and also please provide me with the output of "dmesg | grep toshiba_acpi" once you tried changing mode.
Comment 47 Marcelo Ruiz 2014-08-12 20:12:53 UTC
@Azael

I'm getting an error during the make process:

 make
make -C /lib/modules/3.16.0-031600-generic/build SUBDIRS=/home/erin/Downloads/Toshiba_ACPI modules
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-031600-generic'
  CC [M]  /home/erin/Downloads/Toshiba_ACPI/toshiba_acpi.o
In file included from include/linux/kernel.h:13:0,
                 from /home/erin/Downloads/Toshiba_ACPI/toshiba_acpi.c:44:
/home/erin/Downloads/Toshiba_ACPI/toshiba_acpi.c: In function ‘toshiba_kbd_bl_mode_store’:
/home/erin/Downloads/Toshiba_ACPI/toshiba_acpi.c:1318:35: error: ‘struct device’ has no member named ‘kbd_mode’
  pr_info("Changed mode: 0x%x", dev->kbd_mode);
                                   ^
include/linux/printk.h:244:34: note: in definition of macro ‘pr_info’
  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                  ^
make[2]: *** [/home/erin/Downloads/Toshiba_ACPI/toshiba_acpi.o] Error 1
make[1]: *** [_module_/home/erin/Downloads/Toshiba_ACPI] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.16.0-031600-generic'
make: *** [toshiba_acpi.ko] Error 2
Comment 48 Azael Avalos 2014-08-12 20:18:30 UTC
@Marcelo
Sorry for that, fixed now, please try downloading the file again
Comment 49 Marcelo Ruiz 2014-08-12 20:26:32 UTC
@Azael

No errors during make now. Requested output follows:


erin-satellite leds # echo 2 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode

erin-satellite leds # dmesg | grep toshiba_acpi
[    6.642478] toshiba_acpi: module verification failed: signature and/or  required key missing - tainting kernel
[    6.642774] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[  227.338893] toshiba_acpi: ACPI call to set KBD backlight status failed
[  251.630672] toshiba_acpi: ACPI call to set KBD backlight status failed
[  276.247712] toshiba_acpi: ACPI call to set KBD backlight status failed
[  279.178756] toshiba_acpi: ACPI call to set KBD backlight status failed
[ 2241.231048] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[ 2241.242745] toshiba_acpi: Current type: 2
[ 2241.242749] toshiba_acpi: Current mode: 0x0toshiba_acpi: Current timeout: 15
[ 2296.515737] toshiba_acpi: Desired mode: 2toshiba_acpi: Mode value: 0xf0002
[ 2296.519105] toshiba_acpi: Changed mode: 0x2


erin-satellite leds # echo 1 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
bash: echo: write error: Input/output error

erin-satellite leds # dmesg | grep toshiba_acpi
[    6.642478] toshiba_acpi: module verification failed: signature and/or  required key missing - tainting kernel
[    6.642774] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[  227.338893] toshiba_acpi: ACPI call to set KBD backlight status failed
[  251.630672] toshiba_acpi: ACPI call to set KBD backlight status failed
[  276.247712] toshiba_acpi: ACPI call to set KBD backlight status failed
[  279.178756] toshiba_acpi: ACPI call to set KBD backlight status failed
[ 2241.231048] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[ 2241.242745] toshiba_acpi: Current type: 2
[ 2241.242749] toshiba_acpi: Current mode: 0x0toshiba_acpi: Current timeout: 15
[ 2296.515737] toshiba_acpi: Desired mode: 2toshiba_acpi: Mode value: 0xf0002
[ 2296.519105] toshiba_acpi: Changed mode: 0x2toshiba_acpi: Desired mode: 1
[ 2325.507867] toshiba_acpi: Mode value: 0xf000a<3>[ 2325.509131] toshiba_acpi: ACPI call to set KBD backlight status failed


erin-satellite leds # echo 0 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
bash: echo: write error: Input/output error

erin-satellite leds # dmesg | grep toshiba_acpi
[    6.642478] toshiba_acpi: module verification failed: signature and/or  required key missing - tainting kernel
[    6.642774] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[  227.338893] toshiba_acpi: ACPI call to set KBD backlight status failed
[  251.630672] toshiba_acpi: ACPI call to set KBD backlight status failed
[  276.247712] toshiba_acpi: ACPI call to set KBD backlight status failed
[  279.178756] toshiba_acpi: ACPI call to set KBD backlight status failed
[ 2241.231048] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[ 2241.242745] toshiba_acpi: Current type: 2
[ 2241.242749] toshiba_acpi: Current mode: 0x0toshiba_acpi: Current timeout: 15
[ 2296.515737] toshiba_acpi: Desired mode: 2toshiba_acpi: Mode value: 0xf0002
[ 2296.519105] toshiba_acpi: Changed mode: 0x2toshiba_acpi: Desired mode: 1
[ 2325.507867] toshiba_acpi: Mode value: 0xf000a<3>[ 2325.509131] toshiba_acpi: ACPI call to set KBD backlight status failed
[ 2335.934986] toshiba_acpi: Desired mode: 0
[ 2335.934991] toshiba_acpi: Mode value: 0xf001a<3>[ 2335.937399] toshiba_acpi: ACPI call to set KBD backlight status failed
Comment 50 Marcelo Ruiz 2014-08-12 20:39:57 UTC
@Azael

I don't know if this is still relevant, but still there is no "/sys/class/leds/toshiba::kbd_backlight" directory:

/sys/class/leds$ ls
mmc0::  toshiba::eco_mode  toshiba::illumination
Comment 51 Azael Avalos 2014-08-12 20:59:52 UTC
@Marcelo
On every mode change, please reboot and check if it is working, what I mean is this:

echo 2 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
dmesg | grep toshiba_acpi > mode_2
reboot

We are now on Mode 2 (Auto or TIMER)
cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_timeout
echo 16 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_timeout
echo 1 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
dmesg | grep toshiba_acpi > mode_1
reboot

We are now on Mode 1 (FN-Z or ON)
cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
echo 0 > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
dmesg | grep toshiba_acpi > mode_0
reboot

We are now on Mode 0 (Disabled)
cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
dmesg | grep toshiba_acpi > mode_4

Place the output of those files on pastebin, so we don't bury this thread with a bunch of logs.

Cheers
Comment 52 Marcelo Ruiz 2014-08-12 21:38:35 UTC
@Azael

Ok, I followed the instructions to the letter. It seems the mode never changes in the BIOS, and there are missing files/folders.

Here is the combined output: http://pastebin.com/GKfPy4x4

Marcelo.
Comment 53 Azael Avalos 2014-08-12 22:01:51 UTC
@Marcelo
Please download the file again from the same link, I just made some changes to it and please try again (I must have had a brainfart or somethig...).

Cheers
Comment 54 Marcelo Ruiz 2014-08-12 22:27:57 UTC
@Azael

Things look much better now... here is the output: http://pastebin.com/YqMcRDPu

Thanks!
Comment 55 Azael Avalos 2014-08-12 22:38:10 UTC
@Marcelo
Its nice to see it working. Now give it a spin and test everything.
In mode 2 (Auto or TIMER), try changing timeout values with the following and check for errors:

echo "number" > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_timeout


And in mode 1, check the existence of "/sys/class/leds/toshiba::kbd_backlight" and try turning the led on/off with:

On
echo "1" > /sys/class/leds/toshiba::kbd_backlight/brightness

Off
echo "0" > /sys/class/leds/toshiba::kbd_backlight/brightness

Cheers
Comment 56 Marcelo Ruiz 2014-08-12 23:26:18 UTC
@Azael

Well, we are getting closer, although the backlight never turns on in Mode 2 (timer).
In Mode 1, now  "/sys/class/leds/toshiba::kbd_backlight" exists, but it also never actually turns on nor change to 1.

Here is the output: http://pastebin.com/bL6fRKNe

Thanks
Comment 57 Noé Godinho 2014-08-12 23:54:35 UTC
@Azael

Hi, I tried to install the updated toshiba_acpi.c with the respective makefile and I have the same problem as Marcelo, but with a little difference in the output of "dmesg | grep toshiba_acpi".
It also appears "[  731.189641] toshiba_acpi: Illumination device not available"

My laptop is a qosmio x770 with ubuntu 14.04 64-bit and kernel 3.16.


Thanks.
Comment 58 Azael Avalos 2014-08-13 00:11:34 UTC
@Marcelo
Please provide the output of "dmesg | grep toshiba_acpi" while on mode 1 after trying to change the led on/off.

@Noé
That message only indicates that the illumination device does not exist on your laptop and has nothing to do with keyboard backlight, that LED is used on some models with illuminated touch buttons.

Cheers
Comment 59 Noé Godinho 2014-08-13 00:14:26 UTC
@Azael

My laptop has those illuminated leds, for wi-fi switch, volume, pause/play and others. And they work just as fine on windows.

Still, the keyboard backlight just don't work yet, after I tried all 3 modes.
Comment 60 Marcelo Ruiz 2014-08-13 00:24:45 UTC
@Azael

This is the requested output: http://pastebin.com/m314DNrD
Comment 61 Azael Avalos 2014-08-13 00:59:36 UTC
@Marcelo, Noé
Download the file again and change into mode 1 and 2 and try toggling the keyboard led on/off, and post the results please.

Cheers
Comment 62 Noé Godinho 2014-08-13 01:23:20 UTC
@Azael

Output: http://pastebin.com/pHWmQkH8

Now it doesn't appear the led warning, but the backlight still not works.

Thanks.
Comment 63 Noé Godinho 2014-08-13 01:31:02 UTC
@Azael

I forgot to tell you before, but when I'm installing the makefile, it shows this warning but it doesn't give an error and it continues the installation.

"Can't read private key
  DEPMOD  3.16.0-031600-generic"
Comment 64 Azael Avalos 2014-08-13 02:14:17 UTC
@Marcelo, Noé
Googling a bit I found some documentation about the keyboard backlight operation modes. On the page I found it says that the ON or mode 1, the keyboard backlight is supposed to stay lit all the time and on OFF or mode 0 the keyboard backlight is supposed to remain turned off.

Now the questions are, whenever you change into mode 0 (or OFF), the keyboard backlight is off?
And whenever in mode 1 (or ON) does the keyboard backlight is on?

That is because the method for controlling the keyboard backlight led checks for mode 0x04, but due to BIOS checks, that will never happens as it only accepts modes 0x02, 0x08 and 0x10. Which I'm yielding to the conclusion that you can't control the keyboard led on these models, just cycle through the different modes.

Cheers
Comment 65 Noé Godinho 2014-08-13 02:23:06 UTC
@Azael

My problem is having the keyboard backlight and the illumination led always off since the moment I boot Ubuntu on grub. The only thing it's on is the led from the touchpad, but that has always been lit, even without this patch.

I changed to all 3 modes and the backlight is always off, so I don't see what could be the problem, since it's changes the backlight options on BIOS when I change them on Ubuntu.
Comment 66 Azael Avalos 2014-08-13 02:39:42 UTC
@Noé
So not even at mode 2 (or Timer) turns on whenever you press some keys?
Comment 67 Noé Godinho 2014-08-13 02:44:44 UTC
@Azael

Unfortunately no. The exactly moment I click on enter to start Ubuntu on grub, both keyboard backlight and leds turn off and never turn on again, do what I do.

I have this problem since I bought it 2 and a half years ago and nothing solved it. On windows, everything works properly.

And in the outputs, the brightness is stuck at 0, even if I change the value to 1.
Comment 68 Marcelo Ruiz 2014-08-13 16:48:28 UTC
@Azael

The problem is as Noé describes. As soon as the kernel loads from grub, then no matter what you do, the keyboard backlight remains off. This is the case regardless of the BIOS mode you use and what method you use to set the mode (command line or changing the mode in the BIOS menu at boot time). 
It is clear that there is something in the boot sequence that turns off the ability to backlight the keyboard. I am wondering if we would need to add an acpi command at the grub boot menu to make it work...
Comment 69 Azael Avalos 2014-08-13 17:10:48 UTC
@Marcelo, Noé
Might as well try adding the following to grub and see if something changes

Windows 8
acpi_osi="Windows 2013"

Windows 7
acpi_osi="Windows 2009"

The keyboard led cannot be controlled via user-space due to BIOS checks, so I think it is being controlled by the BIOS, EC or other device internally.
Comment 70 The Dyzaster 2014-08-13 18:44:43 UTC
So i got the two configured scripts you had me run, they went through fine, after a reboot with BIOS set to "On" I got:

http://pastebin.com/m6KKw1Vw

I'm about to try with it set on Timer/Auto next, see if maybe that makes any difference.
Comment 71 Noé Godinho 2014-08-13 19:37:17 UTC
@Azael

Tried both and none of them worked.

After that, I tried shutting down Windows by the power button (I tried this method a few times, but the behavior is always the same), and the backlight only stays on during a few restarts or until I turn on and then turn off Windows normally. I compared the outputs and they were always the same, except when the mode 1 (or ON) is used the output of
"cat /sys/class/leds/toshiba\:\:kbd_backlight/brightness" is 255 instead of 0.

Also, when the mode 2 (or TIMER) is used, the moment I turn on the computer, the backlight starts off instead of on, like normally.
Comment 72 Azael Avalos 2014-08-13 19:51:28 UTC
@Noé
Check for BIOS updates on the Toshiba support website and install them (if available).

@The Dyzaster
Thanks for the info, but I don't need any more logs, the functionality is already implemented. The problem now resides in the "hardware" (or firmware...?) not working.

Cheers
Comment 73 Noé Godinho 2014-08-13 20:02:38 UTC
@Azael

I have the last BIOS firmware, updated it like 1 year ago and they never did another update.
Comment 74 The Dyzaster 2014-08-13 22:38:58 UTC
Well it works when im using Linux Mint, Windows, and in the BIOS, its once it leaves the BIOS it turns off, timer works as well, so i know its not a hardware issue, though it could be that the software doesn't have support.... But thats really it.
Comment 75 Marcelo Ruiz 2014-08-14 13:49:33 UTC
@Azael

I tried the acpi_osi="Windows 2009" (this computer came with Windows 7 preinstalled) and it seems the brightness of the keyboard can never be set to 1, at least the output is always 0:

erin-satellite erin # cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/kbd_backlight_mode
1
erin-satellite erin # cat /sys/class/leds/toshiba::kbd_backlight/brightness
0
erin-satellite erin # echo 1 > /sys/class/leds/toshiba::kbd_backlight/brightness
erin-satellite erin # cat /sys/class/leds/toshiba::kbd_backlight/brightness
0
erin-satellite erin # dmesg | grep toshiba_acpi
[    6.876870] toshiba_acpi: module verification failed: signature and/or  required key missing - tainting kernel
[    6.877271] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20
[    6.890254] toshiba_acpi: Current type: 2
[    6.890256] toshiba_acpi: Current mode: 1
[    6.890257] toshiba_acpi: Current timeout: 10
Comment 76 regwz 2014-08-20 21:13:45 UTC
@Azael
> 
> http://pastebin.com/kHNA90A7
> 

This probably has nothing to do with this bug, but it seems to me that there's a bug on line 1315:

time = time | toshiba->kbd_mode;

This is trying to set an old kbd_mode. Shouldn't it be

time = time | mode;

instead?

(If this is not the case and I misunderstood this function, please ignore this post.)
Comment 77 Azael Avalos 2014-08-20 22:53:43 UTC
(In reply to regwz from comment #76)
> This probably has nothing to do with this bug, but it seems to me that
> there's a bug on line 1315:
> 
> time = time | toshiba->kbd_mode;
> 
> This is trying to set an old kbd_mode. Shouldn't it be
> 
> time = time | mode;
> 
> instead?
> 
Nope, to change modes on that type of backlight interface (which on the modified file is beign recognized as type 1) you set the time to the same mode, and to change the timeout you set it to the other mode, eg.:

FN-Z -> time = time | 0x02;
AUTO -> time = time | 0x01;

Where as in the new one (type 2) it is set like you say. It changed quite a bit, and what concerns me is that the keyboard led is not being triggered by the firmware (or EC?), so perhaps there's an extra call we should make to enable it.


> (If this is not the case and I misunderstood this function, please ignore
> this post.)
And don't worry about it, there are no documents for it available, so your only resort is the DSDT and the Windows drivers ;-)

Cheers
Comment 78 Marcelo Ruiz 2014-08-20 23:29:47 UTC
@Azael

I noticed you mentioned the DSDT file and the windows drivers. Do you need any file from my Windows 7 install to investigate this problem any further?
Comment 79 Marcelo Ruiz 2014-08-20 23:39:33 UTC
@Azael

I also noticed that they're weird things going on with the Fn+Z implementation on Kernel 3.16 on my Toshiba Qosmio X500: if is set to off, it will turn itself on after a few minutes.
I created a bug for this: https://bugzilla.kernel.org/show_bug.cgi?id=82921
Comment 80 John Smith 2015-08-03 17:51:02 UTC
Been googling anything related to keyboard backlight for several weeks for now.
Every road leads here. 
Nothing I've tried so far didn't help. Qosmio X-770 here. Every acpi button works fine except Fn-Z. 
Any progress in this? Any workarounds? Anything?
Comment 81 Azael Avalos 2015-08-03 18:02:36 UTC
(In reply to John Smith from comment #80)
> Been googling anything related to keyboard backlight for several weeks for
> now.
> Every road leads here. 
> Nothing I've tried so far didn't help. Qosmio X-770 here. Every acpi button
> works fine except Fn-Z. 
> Any progress in this? Any workarounds? Anything?

Please try a recent kernel (or at your option, a recent toshiba_acpi file), once installed, provide me w/ the output of:

ls /sys/devices/LNXSYSTM:00/LNXSYBUS:00/XXX/

Note: Replace XXX w/ TOS620Y:00 (where Y can be 0, 7 or 8) or TOS1900:00

And also the output of:

dmesg | grep toshiba_acpi
Comment 82 John Smith 2015-08-03 18:43:16 UTC
(In reply to Azael Avalos from comment #81)
> (In reply to John Smith from comment #80)
> > Been googling anything related to keyboard backlight for several weeks for
> > now.
> > Every road leads here. 
> > Nothing I've tried so far didn't help. Qosmio X-770 here. Every acpi button
> > works fine except Fn-Z. 
> > Any progress in this? Any workarounds? Anything?
> 
> Please try a recent kernel (or at your option, a recent toshiba_acpi file),
> once installed, provide me w/ the output of:
> 
> ls /sys/devices/LNXSYSTM:00/LNXSYBUS:00/XXX/
> 
> Note: Replace XXX w/ TOS620Y:00 (where Y can be 0, 7 or 8) or TOS1900:00
> 
> And also the output of:
> 
> dmesg | grep toshiba_acpi

ls /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00
-r--r--r-- 1 root root 4096 авг.   3 21:33 available_kbd_modes
lrwxrwxrwx 1 root root    0 авг.   3 21:33 driver -> ../../../../bus/acpi/drivers/Toshiba ACPI driver
-r--r--r-- 1 root root 4096 авг.   3 21:33 hid
-rw-r--r-- 1 root root 4096 авг.   3 21:33 kbd_backlight_mode
-r--r--r-- 1 root root 4096 авг.   3 21:33 kbd_type
drwxr-xr-x 4 root root    0 авг.   3 21:33 leds
-r--r--r-- 1 root root 4096 авг.   3 21:33 modalias
-r--r--r-- 1 root root 4096 авг.   3 21:33 path
lrwxrwxrwx 1 root root    0 авг.   3 21:33 physical_node -> ../../../platform/TOS1900:00
-r--r--r-- 1 root root 4096 авг.   3 21:33 position
drwxr-xr-x 2 root root    0 авг.   3 21:33 power
-r--r--r-- 1 root root 4096 авг.   3 21:33 status
lrwxrwxrwx 1 root root    0 авг.   3 21:33 subsystem -> ../../../../bus/acpi
-rw-r--r-- 1 root root 4096 авг.   3 21:33 touchpad
-rw-r--r-- 1 root root 4096 авг.   3 21:33 uevent


dmesg|grep toshiba_acpi
[   16.931819] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.20

cat available_kbd_modes 
2 8 10

cat kbd_backlight_mode 
8
Comment 83 Azael Avalos 2015-08-03 18:57:10 UTC
Alright, your KBD backlight is supported, ans is a type 2 keyboard with three modes of operation.

0x2 -> TIMER (turns ON and OFF automatically)
0x8 -> ON (always ON)
0x10 -> OFF (always OFF)

Try changing the operation mode (as root):

echo "0x2" > kbd_backlight_mode

If it does not change the mode to TIMER, check on dmesg for any errors.

You might want to check the sysfs-driver-toshiba_acpi file located in Documentation/ABI/testing/ from the kernel source (or online) for more details about what each entry under the sysfs filesystem do, and the available options.
Comment 84 John Smith 2015-08-03 19:28:24 UTC
(In reply to Azael Avalos from comment #83)
> Alright, your KBD backlight is supported, ans is a type 2 keyboard with
> three modes of operation.
> 
> 0x2 -> TIMER (turns ON and OFF automatically)
> 0x8 -> ON (always ON)
> 0x10 -> OFF (always OFF)
> 
> Try changing the operation mode (as root):
> 
> echo "0x2" > kbd_backlight_mode
> 
> If it does not change the mode to TIMER, check on dmesg for any errors.
> 
> You might want to check the sysfs-driver-toshiba_acpi file located in
> Documentation/ABI/testing/ from the kernel source (or online) for more
> details about what each entry under the sysfs filesystem do, and the
> available options.

I tried that already, tried it again just now (from root user):
The result is:
bash: kbd_backlight_mode: Permission denied

The value in the file is 02 (always ON), but my keyboard is not lit. The illumination switches off when OS starts and never turns on again. I tried turning acpi off but the system failed to start.
When I boot into Windows everything works.
Comment 85 Azael Avalos 2015-08-03 19:42:47 UTC
(In reply to John Smith from comment #84)
> I tried that already, tried it again just now (from root user):
> The result is:
> bash: kbd_backlight_mode: Permission denied

That last sentence means it couldn't do anything, so the actual value didn't changed.

> 
> The value in the file is 02 (always ON), but my keyboard is not lit. The
> illumination switches off when OS starts and never turns on again. I tried
> turning acpi off but the system failed to start.
> When I boot into Windows everything works.

Interesting, your laptop clearly has support for it, but somehow it is getting "deactivated", please attach your DSDT (or ACPI dump) so I can take a look.

From the driver's perspective, there's nothing wrong, as everything is detected accordingly, lets see if something comes out of your DSDT.


Cheers
Azael
Comment 86 John Smith 2015-08-03 20:14:09 UTC
(In reply to Azael Avalos from comment #85)
> (In reply to John Smith from comment #84)
> > I tried that already, tried it again just now (from root user):
> > The result is:
> > bash: kbd_backlight_mode: Permission denied
> 
> That last sentence means it couldn't do anything, so the actual value didn't
> changed.

LOL, I gathered.

> 
> > 
> > The value in the file is 02 (always ON), but my keyboard is not lit. The
> > illumination switches off when OS starts and never turns on again. I tried
> > turning acpi off but the system failed to start.
> > When I boot into Windows everything works.
> 
> Interesting, your laptop clearly has support for it, but somehow it is
> getting "deactivated", please attach your DSDT (or ACPI dump) so I can take
> a look.
> 
> From the driver's perspective, there's nothing wrong, as everything is
> detected accordingly, lets see if something comes out of your DSDT.
> 

I did:
cat /sys/firmware/acpi/tables/DSDT >dsdt.dat

Here's a dsdt.dat file:
https://drive.google.com/file/d/0Bw1NfnShf2XlYnN3d1FTN3lhczQ/view?usp=sharing

If I did it wrong, please, tell me how to do it properly, I'm not all that familiar with this topic.
Comment 87 Azael Avalos 2015-08-03 20:59:24 UTC
Thanks for the file.

A quick check through the DSDT for OSYS, and there are some checks at the EC for Windows, might as well try booting with:

acpi_osi="Windows 2009"

And see if something changes, maybe some ACPI expert from around here can come up w/ a different idea (and/or solution).
Comment 88 John Smith 2015-08-03 21:34:59 UTC
edited: 
/etc/default/grub

changed:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=\"Windows 2009\""

ran:
sudo update-grub

rebooted. No effect. Anything else I can try?
Comment 89 John Smith 2015-08-03 21:42:12 UTC
upd: as it appears, now I have permissions to write values to kbd_backlight_mode.  I tried 0x2, 0x8, 0x10, but it doesn't react on Fn+Z with any of these values.
Comment 90 Azael Avalos 2015-08-03 21:52:49 UTC
(In reply to John Smith from comment #89)
> upd: as it appears, now I have permissions to write values to
> kbd_backlight_mode.  I tried 0x2, 0x8, 0x10, but it doesn't react on Fn+Z
> with any of these values.

Well, that's something now :-)

The driver does not react to FN-Z, it simply gets the press and reports a KEY_KBDILLUMTOGGLE to userspace, however, it never creates a LED device as the BIOS does not allows to control the LED directly (as in the type 1 keyboards), it only allows control over the mentioned parameters to kbd_backlight_mode.

Does the KBD backlight gets lit now or not? What I mean is, can you control it via command line?
Comment 91 John Smith 2015-08-03 21:56:32 UTC
Ehm, as I said, I tried 
sudo echo "0x2" > kbd_backlight_mode
sudo echo "0x8" > kbd_backlight_mode
sudo echo "0x10" > kbd_backlight_mode

the value changes in the file, but the keyboard remains dark.
Comment 92 Valerie Garrison 2015-08-04 13:44:00 UTC
Running various linux distros and have tried the steps discussed here, I can also make changes to kbd_backlight_mode but keyboard illumination doesn't occur.

Same scenario as Azael Avalos but running different OS (Linux Mint 17.2 Cinnamon)

No significant differences from the output discussed above, adding comment as another impacted user.
Comment 93 Azael Avalos 2015-08-04 15:26:41 UTC
(In reply to Valerie Garrison from comment #92)
> Running various linux distros and have tried the steps discussed here, I can
> also make changes to kbd_backlight_mode but keyboard illumination doesn't
> occur.
> 
> Same scenario as Azael Avalos but running different OS (Linux Mint 17.2
> Cinnamon)
> 
> No significant differences from the output discussed above, adding comment
> as another impacted user.

Please upload your DSDT, the more I have for comparison the better.

I'm currently digging on John's DSDT code to see if the parameters changed or if there's something wrong w/ the code.
Comment 94 Valerie Garrison 2015-08-04 18:26:33 UTC
Created attachment 184281 [details]
DSDT dat
Comment 95 The Dyzaster 2015-08-05 20:59:29 UTC
So I just saw that more people are having problems, read through, and saw that some people have found possible solutions. 

I'm still having issues on my Toshiba P850 with kernel:
4.1.4-1-ARCH #1 SMP PREEMPT Mon Aug 3 21:30:37 UTC 2015 x86_64 GNU/Linux

Heres what i have:                                                 

dmesg | grep toshiba_acpi                                                   
[   78.228923] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.21
[   78.239321] toshiba_acpi: ECO led not installed
[   78.245064] toshiba_acpi: USB Rapid Charge not supported


I attempted to follow those pastbin articles above in attempt to install the makefile for that edited toshiba_acpi, however, it would not install. This is the error i got: 

make -C /lib/modules/4.1.4-1-ARCH/build SUBDIRS=/home/photizo/Downloads/acpi modules
make[1]: Entering directory '/usr/lib/modules/4.1.4-1-ARCH/build'
make[2]: *** No rule to make target '/home/photizo/Downloads/acpi/toshiba_acpi.c', needed by '/home/photizo/Downloads/acpi/toshiba_acpi.o'.  Stop.
Makefile:1383: recipe for target '_module_/home/photizo/Downloads/acpi' failed
make[1]: *** [_module_/home/photizo/Downloads/acpi] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.1.4-1-ARCH/build'
Makefile:71: recipe for target 'toshiba_acpi.ko' failed
make: *** [toshiba_acpi.ko] Error 2
Comment 96 Azael Avalos 2015-08-06 17:24:27 UTC
I checked the DSDTs provided to me, at I haven't found anything in the driver (toshiba_acpi) code that is doing wrong, the only difference I've found is the AML code uses a mas of 0x3f, but the end result is the same as the actual code.

That kept me wondering if the problem resides somewhere else in the drivers code.

Can you guys please blacklist the toshiba_acpi module and check if the KBD backlight works or not? Just make sure you have it in either ON or TIMER.

If it does, then we might be able to tail where the problem resides in the driver code, but if it doesn't, then the problem resides somewhere else.
Comment 97 John Smith 2015-08-06 19:21:02 UTC
Added:
blacklist toshiba_acpi to /etc/modprobe.d/blacklist.conf

rebooted. Checked that BIOS keyboard setting is ON
Still nothing after reboot.
Comment 98 John Smith 2015-08-17 07:53:14 UTC
Tried writing to drivers_platform_x86@kernel-bugs.osdl.org but no such address exist ;( I suppose, since this bug has been lasting since 2011 there's little chance it will be fixed any time soon.
Comment 99 Azael Avalos 2015-08-17 15:42:32 UTC
(In reply to John Smith from comment #98)
> Tried writing to drivers_platform_x86@kernel-bugs.osdl.org but no such
> address exist ;( I suppose, since this bug has been lasting since 2011
> there's little chance it will be fixed any time soon.

Well, AFAICT this is not an issue within the driver, but somewhere else, and since I don't have/own hardware to test, it would be very difficult for me to try to do so...

Some users have reported that in previous versions of the kernel, the issue does not exist, you might as well try with previous versions until you find a kernel that does work and run git bisect to find the offending commit, however, this process will be very time consuming.

As a sort of last resort, check that you have installed the latest BIOS from Toshiba.


Cheers
Azael
Comment 100 The Dyzaster 2015-11-22 10:14:14 UTC
Hey, just wanted to update that i Installed Arch Linux fresh, and i noticed that the Install Disk does actually work with my LED keys, and though on a daily basis it fails to work on my install of Arch, it WILL however work if i boot into Windows (I duel boot) And reboot, OR power off, and then boo up Linux. As we speak my LED keyboard for my Toshiba Satellite P850 is working, its just, i don't understand why it is, and why it doesn't before?
Comment 101 odb.dev 2016-04-19 07:52:37 UTC
Still not working, despite dmesg indicating that it is supported:

dmesg | grep toshiba_acpi
toshiba_acpi: Toshiba Laptop ACPI Extras version 0.23
toshiba_acpi: Supported laptop features: hotkeys illumination keyboard-backlight touchpad eco-led accelerometer-axes usb-sleep-charge usb-sleep-music

Currently using Linx Mint 17.2 with kernel 4.4.0.18.

Keyboard backlighting has never worked for me with any Linux distribution using any kernel. Five years and counting.
Comment 102 Smola 2016-06-25 00:54:06 UTC
Toshiba Satelite P770-111. FN+Z is doing nothing, and other FN combinations work. Echoing to kbd_backlight_mode is doing nothing. Various combinations in BIOS with backlight did nothing. Did not play with ACPI. Fedora 23 KDE, kernel 4.5.7. If somenone needs me to try something, please tell.
Comment 103 Azael Avalos 2016-06-28 19:18:14 UTC
Hi guys,


Lets give it another try to this issue, get the tar.gz archive from the following link, extract it somewhere, compile, install it and load it.

https://goo.gl/X8Cu6Q

Once done that, try changing the kbd_backlight_mode value once again and send me the output of:

dmesg | grep toshiba_acpi

To me email (coproscefalo AT gmail DOT com) so we don't clutter this b with even more logs from different people, in the mail please let me know which laptop model you are using.

(In reply to phil_prod_part from comment #101)
Please send me your DSDT with the logs if you can please.


(In reply to Smola from comment #102)
Please send me your DSDT with the logs if you can please.


This time, I added a bunch of prints to the driver, also the KBD led is always registered, so please also try to poke the status ad send me the output of dmesg (as stated above).


Cheers
Azael
Comment 104 odb.dev 2016-07-21 21:15:17 UTC
I just made an interesting discovery on my Toshiba Satellite P750.

I completely wiped my Windows 7 installation, and then installed Linux Mint 18 Mate (based on Ubuntu 16.04) on a separate partition, and immediately the keyboard backlight started working in Linux. It was permanently 'on', and I couldn't switch it off, but to me this is better than no keyboard backlight at all.

This situation persisted even after I reinstalled Windows 7, including after installing updates and multiple reboots - right up to the point where I allowed Windows Update to install new drivers. After that, the keyboard backlight no longer works in Linux.

So what are these Windows drivers doing that prevents the keyboard backlighting from working in Linux?
Comment 105 Marcelo Ruiz 2016-08-10 23:42:32 UTC
Sent e-mail with info.

I can change the keyboard modes, but I get this message in dmesg: 

toshiba_acpi: KBD backlight led is write-protected

Marcelo.
Comment 106 mail2mg 2016-10-24 23:21:23 UTC
I have the same issue on a Toshiba Satellite Z30-B-100 with kernel 4.4.0-45-generic. Today I found out, that I was able to switch keyboard backlight modes via the command

# sudo tee /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS6208:00/kbd_backlight_mode <<< $NUMBER

whereas $NUMBER is 2, 8 or 16.

(Ref. goes to: https://wiki.archlinux.org/index.php/Toshiba_Portege_Z30-A#Keyboard_Backlight_control ).

I wrote a little switching script, put that into /usr/local/bin and made it executable. Then I gave myself the permission to sudo-execute the script without typing in a password (this can be done via 'sudoers' and 'visudo'). Finally I assigned a keybord-shortcut to sudo-executing the script.

It still feels ugly to do such stuff, but it actually works pretty well: No difference from a functioning system now.
Comment 107 Azael Avalos 2016-10-27 18:21:11 UTC
(In reply to mail2mg from comment #106)
> I have the same issue on a Toshiba Satellite Z30-B-100 with kernel
> 4.4.0-45-generic. Today I found out, that I was able to switch keyboard
> backlight modes via the command
> 
> # sudo tee
> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS6208:00/kbd_backlight_mode <<<
> $NUMBER
> 
> whereas $NUMBER is 2, 8 or 16.
> 
> (Ref. goes to:
> https://wiki.archlinux.org/index.php/Toshiba_Portege_Z30-
> A#Keyboard_Backlight_control ).
> 
> I wrote a little switching script, put that into /usr/local/bin and made it
> executable. Then I gave myself the permission to sudo-execute the script
> without typing in a password (this can be done via 'sudoers' and 'visudo').
> Finally I assigned a keybord-shortcut to sudo-executing the script.
> 
> It still feels ugly to do such stuff, but it actually works pretty well: No
> difference from a functioning system now.

The driver itself detects the hotkey correctly and pass its value to the input subsystem, the problem you have is the keys limitation of the X server, however, you can listen to events via (ge)netlink from a small daemon, prog, etc. and act accordingly.

Take a look at the kernel documentation file (Documentation/ABI/testing/sysfs-driver-toshiba_acpi), it lists all the sysfs files, purpose and accepted values.
Comment 108 OSMANLI 2017-07-23 01:05:52 UTC
Here is the trick to make the keyboard backlight work on your Toshiba laptop. This is not something I found out. The solution was posted at https://askubuntu.com/questions/223305/backlit-keyboard-on-toshiba-satellite-p755-s5184-doesnt-work-in-ubuntu-12-04/306560#306560 by Twengg Rich.

If you don’t have a dual boot (Windows and Linux), but only have Linux, installed on your Toshiba laptop, this will work. And you’re good to go.

Here is the problem. If you have a dual boot system, C: booting to Windows, D: booting to Linux. The trick still works with Linux “as long as you don’t boot up to Windows”. Once you boot up to Windows again, the trick gets undone. Meaning, you have to do the trick again as explained at  https://askubuntu.com/questions/223305/backlit-keyboard-on-toshiba-satellite-p755-s5184-doesnt-work-in-ubuntu-12-04/306560#306560 by Twengg Rich. And you will have your keyboard backlight working again on your Linux. Needless to say, when you have dual boot system, this is not convenient or practical.

The problem with the Toshiba backlight has to do with the Toshiba Bios(period) Otherwise, why would it work on Linux, all of a sudden, without doing anything in Linux? When yo do the trick, something must have reset the Bios. If you can find a permanent or practical solution from this “lead”, please go ahead and run with it.
Comment 109 odb.dev 2017-07-23 21:09:56 UTC
(In reply to OSMANLI from comment #108)
> Here is the trick to make the keyboard backlight work on your Toshiba
> laptop. This is not something I found out. The solution was posted at
> https://askubuntu.com/questions/223305/backlit-keyboard-on-toshiba-satellite-
> p755-s5184-doesnt-work-in-ubuntu-12-04/306560#306560 by Twengg Rich.
> 
> If you don’t have a dual boot (Windows and Linux), but only have Linux,
> installed on your Toshiba laptop, this will work. And you’re good to go.
> 
> Here is the problem. If you have a dual boot system, C: booting to Windows,
> D: booting to Linux. The trick still works with Linux “as long as you don’t
> boot up to Windows”. Once you boot up to Windows again, the trick gets
> undone. Meaning, you have to do the trick again as explained at 
> https://askubuntu.com/questions/223305/backlit-keyboard-on-toshiba-satellite-
> p755-s5184-doesnt-work-in-ubuntu-12-04/306560#306560 by Twengg Rich. And you
> will have your keyboard backlight working again on your Linux. Needless to
> say, when you have dual boot system, this is not convenient or practical.
> 
> The problem with the Toshiba backlight has to do with the Toshiba
> Bios(period) Otherwise, why would it work on Linux, all of a sudden, without
> doing anything in Linux? When yo do the trick, something must have reset the
> Bios. If you can find a permanent or practical solution from this “lead”,
> please go ahead and run with it.

I can confirm this works on a Toshiba P750. It is a dual-boot Linux / Windows 7 machine that almost never boots Windows, so this is an acceptable work-around. If it becomes necessary to boot Windows again, I will simply repeat the above procedure before booting Linux.

It does seem that the BIOS actively disables keyboard backlighting in a manner that cripples it for non-Windows operating systems.
Comment 110 PioTao 2020-01-26 23:56:51 UTC
(In reply to odb.dev from comment #109)
> (In reply to OSMANLI from comment #108)


> [...] windows 7 [...]
> I can confirm this works on a Toshiba P750. It is a dual-boot Linux /


This do not work for Toshiba Satellite A-665-3DV, and I have never had working keyboard backlight. However, as many before me stated, kbd_backlight work in BIOS. Launching the laptop from windoze install disk (tested 7 x64 and 10 x64) did not work because as soon as the setup loaded, keyboard backlight went off, and it cannot be enabled again. It seems that on this laptop keyboard backlight work only in BIOS.


Keyboard backlighting works ONLY when I put acpi=off to kernel load command. And then I have only 1 CPU with 1 thread, which really sucks. This whole problem drives me crazy during all those years, and I wonder what the heck is wrong, and what hidden shit is loaded in windoze/bios/whatever when it works. This is really shame that Toshiba did not provide any Linux support :(


Laptop specs (noACPI): CPU: Single Core Intel Core i7 Q 740 (-MCP-) speed: 1729 MHz Kernel: 5.3.0-26-generic x86_64


Please advice, because now we have kernel 5+ and this problem STILL is not solved, at least for 665-3DV model.


BTW, I have all proper files in leds (when not using noacpi), I can set kdb_mode, etc. The only fail is I can not set the brightness to anything - it is constantly 0 no matter what. I've read the whole thread here and I tried everything, and nothing worked. This is MAD!
Comment 111 John 2020-05-11 21:51:40 UTC
(In reply to PioTao from comment #110)
> (In reply to odb.dev from comment #109)
> > (In reply to OSMANLI from comment #108)
> 
> 
> > [...] windows 7 [...]
> > I can confirm this works on a Toshiba P750. It is a dual-boot Linux /
> 
> 
> This do not work for Toshiba Satellite A-665-3DV, and I have never had
> working keyboard backlight. However, as many before me stated, kbd_backlight
> work in BIOS. Launching the laptop from windoze install disk (tested 7 x64
> and 10 x64) did not work because as soon as the setup loaded, keyboard
> backlight went off, and it cannot be enabled again. It seems that on this
> laptop keyboard backlight work only in BIOS.
> 
> 
> Keyboard backlighting works ONLY when I put acpi=off to kernel load command.
> And then I have only 1 CPU with 1 thread, which really sucks. This whole
> problem drives me crazy during all those years, and I wonder what the heck
> is wrong, and what hidden shit is loaded in windoze/bios/whatever when it
> works. This is really shame that Toshiba did not provide any Linux support :(
> 
> 
> Laptop specs (noACPI): CPU: Single Core Intel Core i7 Q 740 (-MCP-) speed:
> 1729 MHz Kernel: 5.3.0-26-generic x86_64
> 
> 
> Please advice, because now we have kernel 5+ and this problem STILL is not
> solved, at least for 665-3DV model.
> 
> 
> BTW, I have all proper files in leds (when not using noacpi), I can set
> kdb_mode, etc. The only fail is I can not set the brightness to anything -
> it is constantly 0 no matter what. I've read the whole thread here and I
> tried everything, and nothing worked. This is MAD!

i have the same problem kb backlight on my Toshiba P850 but until now no permanent fix
this is bios problem, we need to reprogram the bios
Comment 112 J 2020-05-30 22:20:02 UTC
I can confirm that the workaround proposed in Comment 106 works on my Toshiba Portege R30-A with kernel 5.4.0-33-generic.

As root user within /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS6208:00:

echo 2 > kbd_backlight_mode   # on with timer
echo 8 > kbd_backlight_mode   # always on
echo 16 > kbd_backlight_mode  # off

Now I just need to figure out how to reprogram the Fn+z key to modify those values.
Comment 113 ramdolpix 2020-09-20 17:05:29 UTC
Hello.
I fixed that with a little script.
Tested on Toshiba Tecra Z40-A(Kubuntu 20.04)

Create TosKBD.sh file and put this into file:
------------

#!/bin/bash

kbd_state=$(</sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS6208:00/kbd_backlight_mode)

if [[ "$kbd_state" -eq "16" ]]; then
	echo 8 >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS6208:00/kbd_backlight_mode
	echo KBDLight ON
elif [[ "$kbd_state" -eq "8" ]]; then
	echo 2 >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS6208:00/kbd_backlight_mode
	echo KBDLight TIMER
elif [[ "$kbd_state" -eq "2" ]]; then
	echo 16 >> /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS6208:00/kbd_backlight_mode
	echo KBDLight OFF
fi


-------------
Save it.

Then copy this file to /bin folder with "cp" command

sudo cp TosKBD.sh /bin/TosKBD

and make it executable

sudo chown u+x /bin/TosKBD

Next step,you have to edit "sudoers" file,that you can run this script without asking password

sudo nano /etc/sudoers

add this line:

<yourusername> ALL=NOPASSWD:/bin/TosKBD

and save file

And now you have to open keyboard shortcut settings in your system.
I'm using kubuntu and in settings i have to open Workspace-Shortcuts-Custom shortcuts.
Then add custom shortcut.
In command line write:

sudo TosKBD

and set keyboard shortcut FN+Z(or different key shortcut)
Save it and try it.

I know its not good solution,but it works.
If someone know better solution please write here.
Comment 114 Adolfo 2020-10-04 00:00:13 UTC
 I confirm that the trick suggested on comment 108 also works for Satellite M645.
Actually I just did it booting to the windows recovery, inside recovery I turned backlit on, and then rebooted. After this, Linux (opensuse 15.2 kernel 5.3-18) started with keyboard lighting ON.  The FN+Z, however does not work. Interestingly, when the keyboard lights do not work, the FN+Z key is perfectly recognized, and the keyboard lights where detected by KDE within Battery and Brightness (with no visible effects when changed), now no longer detected.

So, after starting with the trick of comment 108, I can use the trick of comment 112 to change backlit modes (in my case the corresponding folder is
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00.

I hope this helps to track out the underlying problem.
Comment 115 Christian 2020-12-29 20:18:06 UTC
Hi

Wow, very long time. I can confirm that kernel 5.8.0 from ubuntu also not work.
The Trick will work on Toshiba P750, but FN-Y never worked under Linux
I can boot with LED On, but can't change the state.
Comment 116 cado007 2022-08-13 03:10:04 UTC
I have the same issue with a Satellite M645 and the trick from: https://bugzilla.kernel.org/show_bug.cgi?id=32742#c108 worked.

Since I'm in dual boot with Windows 10 to activate the keyboard with the trick instead of booting with a Win CD I just begin to boot in Windows and shutdown the computer by holding the power button as soon the boot begin and right after I boot in Linux and it work.

It's not really elegant but it work.

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