My Linux on Thinkpad T41p Guide (2)

Since first I wrote [my Gentoo on IBM Thinkpad T41p guide](https://priyadi.net/archives/2004/12/20/gentoo-linux-under-thinkpad-t41p/), there are numerous updates to involved software. Features has been added, bugs has been fixed and new bugs appears. Some parts of the old guide has become irrelevant, outdated and simply wrong.

The following is my attempt to update the guide to reflect the current situation.

**Display**

I’m now switching to fglrx as it now supports software suspend. Now, 3D acceleration, suspending, and hopefully multi head work at the same time. In `/etc/X11/xorg.conf`, I added `Option “dpms”` under “Monitor” section to enable [DPMS](http://en.wikipedia.org/wiki/DPMS). I also added `Option “UseInternalAGPGART” “on”` under “Device” section to use kernel’s [Agpgart](http://en.wikipedia.org/wiki/Agpgart). For some reason, the Agpgart that comes with fglrx is not as stable as the kernel’s. Added `DisplaySize 474 356` under “Monitor” section to keep resolution on 75×75 DPI.

[Xv](http://en.wikipedia.org/wiki/X_video_extension) by default is not enabled on fglrx. To enable it, use `Option “VideoOverlay” “on”` and `Option “OpenGLOverlay “off”` under section “Device”.

To automatically put the video adapter in power saving mode, I put `Option “PowerState” “1”` under “Device” section. To get a list of available modes, use `aticonfig –list-powerstates`. To disable power saving mode on the fly, use `aticonfig –set-powerstate=2 –effective=now`. Please note that different video card has different power saving power states, be sure to use `aticonfig –list-powerstates` to see the available power states on your model. My [Mobility FireGL T2](http://www.thinkwiki.org/wiki/ATI_Mobility_FireGL_T2) has two powerstates, under low voltage mode glxgears runs with a little more than 1000 FPS, and under default state it runs with about 2100 FPS.

References:

* [HOWTO ATI Drivers](http://gentoo-wiki.com/HOWTO_ATI_Drivers) on Gentoo-Wiki
* [ATI Unofficial ATI Linux Driver Wiki](http://wiki.cchtml.com/index.php/Main_Page)
* [Fglrx](http://www.thinkwiki.org/wiki/Fglrx) on ThinkWiki
* [Problems with fglrx](http://www.thinkwiki.org/wiki/Problems_with_fglrx) on ThinkWiki
* [Gentoo ATI Radeon FAQ](http://odin.prohosting.com/wedge01/gentoo-radeon-faq.html)
* [How to make use of Graphic Chips Power Management features](http://www.thinkwiki.org/wiki/How_to_make_use_of_Graphics_Chips_Power_Management_features) on ThinkWiki

**CPU Frequency Scaling**

With the introduction of ‘conservative’ CPU frequency governor in 2.6.12, it is no longer required to use userspace CPU scaling daemon such as [powernowd](http://www.deater.net/john/powernowd.html). Now I just let [laptop mode tools](http://www.xs4all.nl/~bsamwel/laptop_mode/tools/) change CPU governor to ‘conservative’ when on battery and ‘ondemand’ when on AC power. The `cpufreq-conservative` and `cpufreq-ondemand` need to be loaded either statically or loaded as module.

Relevant snippet from `/etc/laptop-mode/laptop-mode.conf`:


# Should laptop mode tools control the maximum CPU frequency?
CONTROL_CPU_FREQUENCY=1

# Legal values are "slowest" for the slowest speed that your
# CPU is able to operate at, "fastest" for the fastest speed,
# "medium" for some value in the middle, or any value listed in
# /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies.
BATT_CPU_MAXFREQ=medium
BATT_CPU_MINFREQ=slowest
BATT_CPU_GOVERNOR=conservative
LM_AC_CPU_MAXFREQ=fastest
LM_AC_CPU_MINFREQ=slowest
LM_AC_CPU_GOVERNOR=ondemand
NOLM_AC_CPU_MAXFREQ=fastest
NOLM_AC_CPU_MINFREQ=slowest
NOLM_AC_CPU_GOVERNOR=ondemand

References:

* [How to make use of Dynamic Frequency Scaling](http://www.thinkwiki.org/wiki/How_to_make_use_of_Dynamic_Frequency_Scaling) on ThinkWiki.

**Disabling Disk Syncing**

Laptop mode tries to delay write to hard drive but some programs insist on syncing every minute or so. [Libnosync](http://bourbaki.math.uni-kiel.de/~oschmidt/nosync/) solves the problem. Compile it, put `libnosync.so` in /usr/lib and add `/usr/lib/libnosync.so` in `/etc/ld.so.preload`.

**Embedded Security Subsystem**

This works with `tpm_atmel` module, it created device `/dev/tpm0`. However I have no real use for it.

References:

* [Embedded Security Subsystem](http://www.thinkwiki.org/wiki/Embedded_Security_Subsystem) on ThinkWiki
* [Tpm](http://www.thinkwiki.org/wiki/Tpm) on ThinkWiki
* [Tpmdd](http://www.thinkwiki.org/wiki/Tpmdd) on ThinkWiki

**Hard Drive Active Protection System**

This one hasn’t matured yet. It works but requires no small amount of tinkering:

* Install [hdaps](http://hdaps.sourceforge.net/) driver. No problem, any recent kernel already includes this. The driver is called `hdaps`.
* Patch the kernel with [disk protection kernel patch](http://www.zen24593.zen.co.uk/hdaps/hdaps_protect.20060118.patch).
* Install `hdapsd` user space daemon. [Gentoo Ebuild](http://bugs.gentoo.org/show_bug.cgi?id=119845).
* Install `khdapsmon` KDE tray application. [Download and Gentoo Ebuild](http://www.kde-apps.org/content/show.php?content=34134).
* Upgrade the [hard drive BIOS](http://www-306.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-62282).
* Patch the kernel with [unload capabilities check patch](http://www.thinkwiki.org/wiki/How_to_protect_the_harddisk_through_APS).

The last two steps are probably specific only to early version of this hard drive model (Hitachi HTS726060M9AT00).

References:

* [How to protect the harddisk through APS](http://www.thinkwiki.org/wiki/How_to_protect_the_harddisk_through_APS) on ThinkWiki
* [HDAPS](http://www.thinkwiki.org/wiki/HDAPS) on ThinkWiki

26 comments

  1. wei…. abeeee buncit. kikikiki linux emang aneh ya mas pri. tapi walo aneh… juga begitu mengagumkan. kie skalian test ubuntu. masih pake yg live :D

  2. om pri…
    kalo ada how-to mengenai ngoprek linux – big/huge memory > 4GB pada IA32… pls share donk….

  3. Memori > 4 GB di IA32? WDF! apa hubungannya ama Linux? ganti aja mesinnya pake 64, linux gag perlu dioprek2 lg :d

  4. Hii… syerem… koq milih linuxnya yg susah2 gitu sih? :p napa ga milih yg simpel kayak SimplyMepis, Xandros dsb.. (padahal sih uda nyobain ga semuanya enakeun gara terlalu simple kali ya?) tau ah binun nih mo pake distro apaan lagi ya..? Distro 347 aja kale ye.. :D

Leave a Reply to aRdho Cancel reply

Your email address will not be published. Required fields are marked *