Sonypi
Sony Programmable I/O Control Device Driver
Imported from http://popies.net/sonypi/
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:
rpmbuild -tb spicctrl-X.Y.tar.bz2
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 (URL broken, the evdev driver is included in any recent Xorg), 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:
... Section "InputDevice" Identifier "sonypi keys" Driver "kbd" Option "Protocol" "evdev" Option "Dev Name" "Sony Vaio Keys" Option "XkbLayout" "fr" Option "XkbModel" "pc105" EndSection ... Section "ServerLayout" ... InputDevice "sonypi keys" "SendCoreEvents" ... EndSection
The driver does not work at all on my laptop, what can I do ?
Report back to Mattia Dongili, he'll try to see what he can do.
Stelian Pop has 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.
UPDATE: the driver is now called sony-laptop and is available in mainline kernels since 2.6.21-rc1, if you have problems with that driver report back to Mattia Dongili.
Downloads
| File | Size | Md5sum | |
|---|---|---|---|
| sonypid | http://popies.net/sonypi/sonypid-1.9.1.tar.bz2 | 10089 bytes | d27cf0f34132f1b0b900bd0415a79181 |
| spicctrl | http://popies.net/sonypi/spicctrl-1.9.tar.bz2 | 10917 bytes | 775a1959c03e59830303b8320ca379d2 |
This page was originally written by Stelian Pop and was slightly edited by Mattia Dongili.
Mattia Dongili 11:58, 12 March 2007 (CET)