Since the newest Linux Kernel (3.12) ships with Chromebook Pixel support, both touchscreen and touchpad all work fine, but the kernel doesn't include the keyboard backlight driver. So I picked the driver from https://github.com/brocktice/pixel_linux and made it standalone and easy to use.
- Google Chromebook Pixel, HP Chromebook 13 (G1/Chell), Toshiba Chromebook 2 (2015) (Gandof) or Dell Chromebook 13 (Lulu) with Linux installed.
- Build toolchains.
If we register the keyboard backlight device as backlight
to Linux system, Gnome will be confused with the LCD and Keyboard backlight. In the system setting panel, display brightness adjust will be operated on Keyboard Backlight.
So, we register it as leds
devices to system to make Gnome happy.
Clone the code.
If you want the keyboard backlight works like an backlight
then edit pixel_kb_backlight.c
#ifdef KB_BACKLIGHT
#define DEVICE_NAME "chromeos-keyboard-backlight"
#else
#define DEVICE_NAME "chromeos-keyboard-leds"
#endif
Make these changes and the driver will act as backlight
or leds
.
Build with:
make
You will get 3 drivers: chromeos_keyboard_bl.ko #backlight class driver chromeos_keyboard_leds.ko #leds class driver chromebook_kb_backlight.ko #keyboard backlight device driver
Now, you can load the drivers:
if you choose backlight
sudo insmod chromeos_keyboard_bl.ko
sudo insmod chromebook_kb_backlight.ko
if you choose leds
sudo insmod chromeos_keyboard_leds.ko
sudo insmod chromebook_kb_backlight.ko
OK, check whether the drivers loaded successfully:
if you choose backlight
ls /sys/class/backlight
if you choose leds
ls /sys/class/leds
If you can see keyboard_backlight
or chromeos::kbd_backlight
from ls
output, It works!
I have made a helper shell script to adjust the backlight level. You need to edit the script if you chose backlight
, to use the correct path.
# turn on the backlight
sudo ./keyboard_brightness.sh on
#turn off the backlight
sudo ./keyboard_brightness.sh off
#turn up
sudo ./keyboard_brightness.sh up
#turn down
sudo ./keyboard_brightness.sh down
I installed Ubuntu 13.10 with Linux kernel 3.12.0-031200-generic, so I do the following:
#copy our drivers to the kernel's modules dir
sudo cp chromeos_keyboard_leds.ko /lib/modules/3.12.0-031200-generic/
sudo cp chromebook_kb_backlight.ko /lib/modules/3.12.0-031200-generic/
#tell system we have new modules
sudo depmod -a
sudo modprobe module
then edit /etc/modules
and add two lines:
chromeos_keyboard_leds
chromebook_kb_backlight
Just reboot the laptop, the keyboard backlight driver will load automatically.