有篇不错的文章解决APS问题
那个滚轮找了些修改X org的方法可是无效,郁闷!不知道楼主现在解决没有?
Ubuntu 8.04.1 comes with tp_smapi and hdaps_ec (the renamed hdaps), so we do not need to install these modules. However, to enable the active protection system (hard disk parking), we need to do something more.
Installing daemon and utilities:
$ sudo apt-get install hdapsd hdaps-utils
Adjust the configuration daemon for your hard disk device:
$ sudo vim /etc/default/hdapsd
For IDE:
DISK="hda"
For SATA:
DISK="sda"
Add the necessary modules in the list that is loaded after boot:
$ echo tp_smapi | sudo tee -a /etc/modules
$ echo hdaps_ec | sudo tee -a /etc/modules
Preparation
Installation of tools for compiling and creating a working 'thinkpad' components:
$ sudo apt-get install linux-kernel-devel fakeroot build-essential
mkdir ~/thinkpad
Obtaining resources for compiling the kernel and modules:
$ cd ~/thinkpad
$ sudo apt-get build-dep linux-image-$(uname -r)
$ apt-get source linux-image-$(uname -r)
$ sudo apt-get build-dep linux-ubuntu-modules-$(uname -r)
$ apt-get source linux-ubuntu-modules-$(uname -r)
$ sudo apt-get build-dep linux-restricted-modules-common
$ apt-get source linux-restricted-modules-common
Compile kernel
Getting the two patches for the 2.6.24 kernel:
$ cd ~/thinkpad
$ wget -c 'http://sourceforge.net/mailarchive/attachment.php?list_name=hdaps-devel&message_id=87hcjjedbn.fsf%40denkblock.local&counter=2' -O disk-protect.patch
$ wget -c 'http://sourceforge.net/mailarchive/attachment.php?list_name=hdaps-devel&message_id=87bq6l2ihm.fsf%40denkblock.local&counter=2' -O adjust-blocked-counters.patch
Applications patch, the change of name from generic to thinkpad, compiling and installing the kernel (CONCURRENCY_LEVEL parameter = 2 is only for the Core Duo processor):
$ cd ~/thinkpad/$(ls -1p ~/thinkpad | grep ^linux-2\.6\..*/$)
$ patch -p1 -l < ../disk-protect.patch
$ patch -p1 -l < ../adjust-blocked-counters.patch
$ mv debian/config/i386/config.generic debian/config/i386/config.thinkpad && mv debian/abi/$(ls -1p debian/abi | grep ^2\.6\..*/$)i386/generic debian/abi/$(ls -1p debian/abi | grep ^2\.6\..*/$)i386/thinkpad && mv debian/abi/$(ls -1p debian/abi | grep ^2\.6\..*/$)i386/generic.modules debian/abi/$(ls -1p debian/abi | grep ^2\.6\..*/$)i386/thinkpad.modules && mv debian/config/amd64/config.generic debian/config/amd64/config.thinkpad && mv debian/abi/$(ls -1p debian/abi | grep ^2\.6\..*/$)amd64/generic debian/abi/$(ls -1p debian/abi | grep ^2\.6\..*/$)amd64/thinkpad && mv debian/abi/$(ls -1p debian/abi | grep ^2\.6\..*/$)amd64/generic.modules debian/abi/$(ls -1p debian/abi | grep ^2\.6\..*/$)amd64/thinkpad.modules && mv debian/control debian/control.orig && sed s/-$(uname -r | sed 's/thinkpad/generic/')/-$(uname -r | sed 's/generic/thinkpad/')/ debian/control.orig > debian/control
CONCURRENCY_LEVEL=2 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-debs flavours=thinkpad
$ sudo dpkg -i ~/thinkpad/$(ls -1 ~/thinkpad | grep ^linux-image-2\.6\..*thinkpad.*\.deb$)
$ sudo dpkg -i ~/thinkpad/$(ls -1 ~/thinkpad | grep ^linux-headers-2\.6\..*thinkpad.*\.deb$)
Modules
Change of name from generic to thinkpad, compiling and installing the modules (CONCURRENCY_LEVEL parameter = 2 is only for the Core Duo processor):
$ cd ~/thinkpad/$(ls -1p ~/thinkpad | grep ^linux-ubuntu-modules-2\.6\..*/$)
$ mv debian/control debian/control.orig && sed s/-$(uname -r | sed 's/thinkpad/generic/')/-$(uname -r | sed 's/generic/thinkpad/')/ debian/control.orig > debian/control
CONCURRENCY_LEVEL=2 AUTOBUILD=1 fakeroot debian/rules binary-debs flavours=thinkpad
$ cd ~/thinkpad/$(ls -1p ~/thinkpad | grep ^linux-restricted-modules-2\.6\..*/$)
$ mv debian/control.stub.in debian/control.stub.in.orig && sed s/-@@ABIVER@@-generic/-@@ABIVER@@-thinkpad/ debian/control.stub.in.orig > debian/control.stub.in && debian/rules debian/control
CONCURRENCY_LEVEL=2 AUTOBUILD=1 fakeroot debian/rules binary-debs flavours=$(uname -r | sed 's/generic/thinkpad/') ati_flavours=$(uname -r | sed 's/generic/thinkpad/') nv_flavours=$(uname -r | sed 's/generic/thinkpad/')
$ sudo dpkg -i ~/thinkpad/$(ls -1 ~/thinkpad | grep ^linux-ubuntu-modules-2\.6\..*thinkpad.*\.deb$)
$ sudo dpkg -i ~/thinkpad/$(ls -1 ~/thinkpad | grep ^linux-restricted-modules-2\.6\..*thinkpad.*\.deb$)
If you are using additional drivers under the Restricted (FGLRX, NVIDIA, etc.), the analogy is to install (as in the ~/thinkpad). In my case, I did not install these Restricted modules (my system do not need):
$ cd ~/thinkpad
$ ls -1 | grep \.deb$
$ sudo dpkg -i .deb
Then, reboot with new kernel, '2.6.xx kernel-xx-thinkpad'
Test an accelerometer
$ hdaps-gl
If the detection of movement inverse, we need to put a parameter for hdaps_ec, e.g. 'hdaps_ec parameter invert = 1', in '/etc/modules'. More information and parameters are provied at
http://www.thinkwiki.org/wiki/Tp_smapi# ... rientationInstall GNOME applet
This will show a status icon on a panel to indicate the active protection status:
$ sudo apt-get install libpanel-applet2-dev
$ mkdir -p ~/thinkpad/gnome-hdaps-applet
$ cd ~/thinkpad/gnome-hdaps-applet
$ wget -c
http://www.zen24593.zen.co.uk/hdaps/gno ... 120.tar.gz$ tar -xzvf gnome-hdaps-applet-20060120.tar.gz
$ gcc $(pkg-config --cflags --libs libpanelapplet-2.0) -o gnome-hdaps-applet gnome-hdaps-applet.c
$ sudo cp gnome-hdaps-applet /usr/bin
$ sudo mkdir /usr/share/pixmaps/gnome-hdaps-applet/
$ sudo cp *.png /usr/share/pixmaps/gnome-hdaps-applet/
$ sudo cp GNOME_HDAPS_StatusApplet.server /usr/lib/bonobo/servers/