HDAPS guide / TP-Smapi guide

This is a guide to get hdaps and tp-smapi work on Lenovo laptops. The guide is written for Ubuntu. During the last couple of version of Ubuntu it has become a lot easier to get hdaps and tp-smapi to work.

Follow below steps to setup tp-smapi and hdaps. I have written this guide with Ubuntu Oneiric in mind, but it should also work on Precise. I also have a depricated uguide. That guide might be usefull for older Ubuntu releases. You can still read the guide here.

Setup apt

This is actually an optional step, but it is nice to have hdaps-utils package installed in order to verify that hdaps is working. Hdaps-utils is a small graphical utility that show how much you tilt your laptop. Hdaps-utils is no longer a part of Ubuntu, but I have created a package in my PPA. Open a terminal and add my PPA with the commandsudo apt-add-repository ppa:jonasped/ppa.

TP-Smapi

Install tp-smapi-dkms package. The package contains two kernel modules. One TP-Smapi interface and the other one is the hdaps interface. The package is part of the official Ubuntu repository. Install it with the command sudo apt-get install tp-smapi-dkms.

Hdaps

Hdapsd is a small daemon that parks the HD heads if the acceleration is too big. This is done to protect your harddrive against shocks. First you need to install the hdapsd package. You do that by typing in sudo apt-get install hdapsd. The installer starts hdapsd automatically.

Hdaps-utils

Further to above daemon there is a couple of small utilities that can show how you rotate your laptop in real-time. These utilities are found in the package hdaps-utils. This package is not a part of the official Ubuntu repository, but I have created a package and placed it in my PPA. Install this package by typing sudo apt-get install hdaps-utils. After package is installed you can either run hdaps-pivot or hdaps-gl. Try to run hdaps-gl command and you will get something like below. This is an easy way to verify that hdaps interface is working.

hdaps
As you can see above command is mostly to show that it actually works.

HDAPS guide / TP-Smapi guide – old version

This is a guide I have written to get hdaps and the tp-smapi module to work on an Lenovo ThinkPad T500. Same guide should also work on the T400 model. These two models are more or less the same except for the screen size. Hdaps should also work on some Apple laptops.

This guide is written to work on Ubuntu, but it should also work on Debian.

Setup apt

The versions included in the Jaunty repositories are a bit outdated. Especially the hdapsd package. The easiest way to get the updated packages is to add another repository to apt. If you visit my PPA at https://launchpad.net/~jonasped/+archive/ppa you will find a pretty good guide on how to do this. Once you have added my PPA as a software repository you are ready to install the needed packages.

TP-Smapi

Now you are ready to install tp-smapi-source package. As the entire process requires some a console lets do all the installation from the console. Start up your favourite console. Start with installing tp-smapi-sources package. You do that by typing sudo apt-get install tp-smapi-sources. This will install the source code for tp-smapi. Next step is to compile the modules. Easiest way to do this is to type sudo module-assistant build tp-smapi. This will compile the source code and create a deb package with the modules. Next step is to install the modules. Easiest way to do this is to type sudo module-assistant install tp-smapi.

At this point we have the modules installed. Next thing is to load the modules. The T500 and T400 model needs a special option to the modules before it will load. What I have done is to make the modules load automatically when I boot my laptop. I have done this by addind a single line to /etc/modules. Fire up your favourite editor and open /etc/modules and add the following line to the file: thinkpad_ec force_io=1. We are now ready to actually load the modules. Do this by typing in sudo /etc/init.d/module-init-tools.

The modules are now loaded and you are ready to install the hdaps programs.

Hdaps

Hdapsd is a small daemon that parks the HD heads if the acceleration is too big. This is done to protect your harddrive against shocks. First you need to install the hdapsd package. You do that by typing in sudo apt-get install hdapsd. After installation it is time to start the hdapsd daemon. You do that by typing sudo /etc/init.d/hdapsd start. You can verify that hdapsd daemon is actually running by typing ps aux | grep hdapsd. The output should show a line containing /usr/sbin/hdapsd.

Further to above daemon there is a couple of small utilities that can show how you rotate your laptop real-time. These utilities are found in the package hdaps-utils. Install this package by typing sudo apt-get install hdaps-utils. After package is installed you can either runhdaps-pivot or hdaps-gl. Try to run hdaps-gl command and you will get something like below.
hdaps
As you can see above command is mostly to show that it actually works.