SL Driver on Ubuntu

From ThinkWiki
Revision as of 19:42, 28 April 2009 by Chessbone (Talk | contribs) (added loose how-to for how to install the sl500 driver)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SL Driver on Ubuntu

This page describes one way to get SL500 hotkeys and brightness working with Ubuntu, via Alexandre Rostovtsev's driver. Hopefully it will save you time.

System Specs

  • Ubuntu version: 9.04
  • kernel: 2.6.29.2-ultimate
  • Lenovo SL500 Thinkpad

Note: I had first tried installing the driver with the 2.6.28-11 kernel and had problems. It only worked when I changed to the more recent kernel.

General Steps

This is a loose description intended only as a general guide. As with any changes you make to your system, make backups as you go.

1. make sure that you have the linux headers or source for your kernel. Headers or source should be in /usr/src. For me, I have /usr/src/linux-2.6.29.

2. download Alexandre's driver from here: http://github.com/tetromino/lenovo-sl-laptop/tree/master and unpack it.

3. run 'make' to make the loadable kernel object for the driver. Note: I had to slightly modify the makefile and my /usr/src folder. I had to add 'PWD := $(shell pwd)' to the beginning of the makefile, and then I had to make /usr/src/linux be a symbolic link to /usr/src/linux-2.6.29.

4. test the module by inserting via insmod e.g. 'sudo insmod lenovo-sl-laptop.ko' The module should load with no errors. Check via 'dmesg' for more details.

5. If the module was loaded successfully, configure ubuntu to load the module on start-up, as follows:

a. move the module to /lib/modules/`uname -r`/volatile.  (this is the directory for custom modules for your current kernel)
b. Run depmod to generate a new module dependency
c. create a file /etc/modprobe.d/lenovo-sl-laptop.conf which just has one line: 'options lenovo-sl-laptop control_backlight=1'  (this tells modprobe to load the module with backlight control enabled)
d. edit the /etc/modules file and add the line 'lenovo-sl-laptop' to the end

6. edit the /boot/grub/menu.lst file by adding 'acpi_backlight=vendor' as a kernel option to your kernel line. For example, my kernel line looks like this: 'kernel /boot/vmlinuz-2.6.29.2-ultimate root=UUID=72cac052-0f0c-401c-baf3-629866143b33 ro splash acpi_backlight=vendor'

7. Re-boot. If all went well, you should be able to use the SL500's hot keys and control brightness.

Much thanks to Alexandre and Zhang Rui for their work in making the SL500 linux-friendly!