Archive for December, 2007

Its a common knowledge that Thinkpads have HDAPS feature (IBM Active Protection System). Its primary purpose, in Windows at least, is to detect falling motion (laptop about to crash into the ground) so that it can immediately park the hard disk heads to prevent data loss. How cool is that?
In Linux, are are available drivers that you can install in order for you to make use or access the built-in accelerometer. Users on YouTube have already posted demos of fun things you can do with it, from useful features such as tapping your laptop to switch workspaces, or changing the display orientation to silly ones like playing games by tilting the laptop itself and making it hum like Jedi swords. So what do you need to get started hacking? First, you’ll need the TP_SMAPI. Second? Imagination. Here’s a java port to get you started:

int threshold = 2;
long numMillisecondsToSleep = 1000; // 1 second
int oldx=0, oldy=0, x, y;
boolean doupdate;

try {
    do {
        FileReader fr = new FileReader("/sys/devices/platform/hdaps/position");
        BufferedReader br = new BufferedReader(fr);
        String s = br.readLine();

        StringTokenizer st = new StringTokenizer(s, "(,)");
        x = Integer.parseInt(st.nextToken());
        y = Integer.parseInt(st.nextToken());

        doupdate = false;

        if ((oldx != x) || (oldy != y)) {

            if (Math.abs(oldx - x) > threshold) {
                oldx = (oldx != x) ? x : oldx;
                doupdate = true;

            if (Math.abs(oldy - y) > threshold) {
                oldy = (oldy != y) ? y : oldy;
                doupdate = true;

            if (doupdate) {
                System.out.println("x = " + oldx + " | " + "y = " + oldy);


        try {
        } catch (InterruptedException e) {
    } while(true);

} catch (IOException e) {

Ported from the original C code written by Jeff Molofee.

Read Full Post »

I have been using Linux since 1996 and started with Slackware v1 and FreeBSD but I have never used linux on any of my PCs. Today, I have made the jump from Windows to Linux last month after buying a used Lenovo Thinkpad x60. I opted to use PCLinuxOS due to its rave reviews and growing popularity. Recently, it surpassed Ubuntu on the number of downloads based on Distrowatch stats. Based on my experience with Ubuntu and PCLinuxOS, I think Linux is finally ready on the desktop.

Almost everything works with PCLinuxOS2007 except for the IBM Action Protection System due to lack of available Linux drivers. Installation was smooth and never encountered problems (make sure you dont have any other programs running when you hit “install to hard disk”. I used a bootable USB drive since this model doesnt come with a CD/DVD drive. Ethernet, Bluetooth, Wifi, SD memory slot, USB, Sound, and Mic works perfectly. Can detect inserted drives and easily detects wifi and lan. My unit doesnt have the fingerprint feature.

Thinkpad x60


Processor Intel Core 2 Dou processor T5600 (1.8GHz)
Memory 2GB DDR2-667
Hard drive Toshiba 100GB 5400RPM SATA
Display 12.1″ TFT display
Graphics Intel Graphics Media Accelerator 950
Wireless Intel 3945 802.11a/b/g wireless, IBM Bluetooth 2.0
Networking Intel Pro/1000 Gigabit Ethernet
Expansion 3 USB 2.0 ports, 1 4-pin Firewire (IEEE 1394) port, 1 Express Card, 1 Secure Digital
Battery Lithium Ion 8 cell


* If you dont have CD/DVD drive, you only need a USB drive and ISO CD Image to install. Follow the instructions here if you are on Linux, or here if you are on Windows,
* If you have at least 2Gb RAM, allocate a maximum of 1Gb or even less for Swap space. You will hardly use it.
* To enable Thinkpad function buttons (Blue buttons), enable the KMilo plugin under KDE Control Center | System Administration.
* Default video players didnt work on my fresh install. Had to Install VLC to watch avi files (tv shows for my case)
* Additional Thinkpad-specific apps that you can install are: KThinkBat for better battery power usage detection and TP_SMAPI (HDAPS driver for the built-in accelerometer).
* You can enable the frequency scaling feature by enabling the “powernowd” service at PCLOS Control Center | System | Enable or disable system services.
* With the latest Wine version, you can still enjoy Windows apps like Photosop 7, Dreamweaver 8, Microsoft Office 2003 and Warcraft 3 – TFT as they can run on Linux w/o a hitch.

Known problems and solutions:

Solved: Sound doesnt work by default.
Solution: Upgrade kernel to kernel- or higher
Explanation: ALSA related bug in kernel

Solved: Fn + Home (Increase Brightness) will blank your screen
Solution: edit the /etc/modprobe.conf and add the line “alias video off” (The blacklist solution doesnt work.)
Explanation: There is a conflict with the ACPI video module.

Solved: Sending files to Bluetooth devices via GUI.
Solution: Install kbluetooth
Explanation: Not installed by default

What doesnt work:

* FN+F7, FN+F8, FN+F9.


* Express Card slot
* 56K Modem
* Infrared

The obligatory screenshot:

PCLOS2007 on Thinkpad x60

Read Full Post »