The system consist of two parts. The driver that enables reading the acceleration data and some sort of userspace software that does the actual parking of the harddrive heads, usually hdapsd.
The hdaps driver is part of the kernel but the driver maintainers actually recommend using the tp-smapi driver instead. So that’s what we’ll do.
Start by making sure you have the necessary tools installed
Luckily it’s in the package repository (universe)
this will fetch and install the tp-smapi-source package, unpack the source and then compile and install the kernel module.
Try loading it:
$ sudo modprobe hdaps
The kernel log should show something like this:
[ 1546.784125] tp_smapi 0.37 loading...
[ 1546.784406] tp_smapi successfully loaded (smapi_port=0xb2).
[ 1571.445942] hdaps: LENOVO ThinkPad T61 detected, setting orientation 1
[ 1571.446111] hdaps: initial mode latch is 0x05
[ 1571.446265] hdaps: setting ec_rate=250, filter_order=2
[ 1571.446493] hdaps: device successfully initialized.
[ 1571.446607] input: ThinkPad HDAPS joystick emulation as /devices/virtual/input/input13
[ 1571.469284] input: ThinkPad HDAPS accelerometer data as /devices/virtual/input/input14
[ 1571.505138] hdaps: driver successfully loaded.
For some reason some configuration for udev is missing. Fix this by running
Now for the userspace stuff. First let us test if APS is actually working.
After installation you can use
to verify that the sensors are working
package in Jaunty does not support the new smapi interface. I have created a package based on the latest revision of hdapsd. It also fixes a problem with the init-script.
With the stock init-script you get an error like this:
* Not starting hdapsd: /sys/block/hda/queue/protect does not exist, please read /usr/share/doc/hdapsd/README.Debian
This happens because the init-script actually checks for the APS interface in /sys (this is no longer supported).
Removing the call to
during startup fixes this.
hdapsd in Jaunty is old. There is a PPA with newer versions.
Add the PPA to your repository list
> deb http://ppa.launchpad.net/jonasped/ppa/ubuntu jaunty main
> deb-src http://ppa.launchpad.net/jonasped/ppa/ubuntu jaunty main
And add the PPA key
and then update the package list and install the package
$ sudo apt-get install hdapsd
Remember to edit
to match your system.