Back to main page Send me a mail

Sony Programmable I/O Control Device Driver

Important news !

Mattia Dongili has taken over the maintenance of both sonypi and sony_acpi (renamed sony_laptop).

More information can be found at http://www.linux.it/~malattia/wiki/index.php/Sony_drivers.

The rest of this page is kept as is for reference only and may be outdated.

What is sonypi ?

The sonypi driver enables access to the Sony Programmable I/O Control Device which can be found in many Sony Vaio laptops.

Where I can download the driver ?

The driver was integrated in the official Linux kernel starting with the 2.4.7 kernel, and the latest version is always found in the latest kernel tree.

How can I configure the driver ?

Carefully read the file sonypi.txt which can be found in the Documentation directory of your kernel source tree.

A local copy of this file can be read here for the 2.6 kernels and here for the 2.4 kernels

How can I change the screen brightness, turn on bluetooth etc. ?

Download below spicctrl, the command line utility which talks to the sonypi driver and makes you able to do those things. You can build spicctrl as a RPM packages from the pristine sources as follows:

How can I intercept special keys (jogdial, capture button, Fn keys) ?

You have two ways of getting those events:

You can use a user space utility (like the downloadable below sonypid) which polls the sonypi driver for events and configure it to do the desired actions. There are several such daemons available, one of them is even integrated in KDE 3.

The second solution is to set the sonypi driver to use the Linux input subsystem (through the 'useinput' sonypi module parameter). This will create two input devices, one translating the jogdial events into mouse events, and another one giving key events for the special keys.

The first device can be simple used by the X server by configuring it to use a mouse connected on /dev/input/mice (like any USB mouse for example).

Unfortunately the second device is unusable without a special patched X server, which implements a Linux input based keyboard driver. The patch was written by the Gentoo people originally,, but I had to modify it to let the sonypi events be propagated to the user. You can get the modified patch here. Apply this patch, rebuild your X server, then configure it like this.

The driver does not work at all on my laptop, what can I do ?

Report back to me, we'll try to see what we can do.

I've also written another Sony driver, based on ACPI facilities, which may work for you. This driver is currently limited to getting/setting the screen brightness.

You can get a patch here. The patch also contains some documentation, read it.

If you don't want to patch your kernel, a standalone version is available here. Just extract the tarball and type make to build the module.


Download:
Filename Size Md5sum
sonypid-1.9.1.tar.bz2 10089 bytes d27cf0f34132f1b0b900bd0415a79181
spicctrl-1.9.tar.bz2 10917 bytes 775a1959c03e59830303b8320ca379d2

Stelian Pop
Last modified: Thu Mar 29 23:10:45 CEST 2007 Valid HTML 4.01!