Archive for October, 2007

Workaround solution to broken ACPI in laptop HDD’s

October 31, 2007

Recently there has been quite some talk (ubuntu bug #59695) about the brokenness of laptop harddrives under linux. As a powersaving/shockprotecting feaure these disks load and unload their heads up to several times per minute. This mechanism is rated at a couple of hundred thousand such operations. Read this for details.

You can see how many load/unloads your disk (/dev/sda below) has performed by executing:

sudo smartctl -d ata -a /dev/sda | grep Load_Cycle_Count

For this to work you will need the smartmontools package installed. For ubuntu users, this is done by executing:

sudo apt-get install smartmontools

The last number is what you are looking for. In this example the number is 13121:

$ sudo smartctl -d ata -a /dev/sda | grep Load_Cycle_Count
[sudo] password for asjo:
193 Load_Cycle_Count 0x0032 094 094 000 Old_age Always - 13121

You can monitor how the Load_Cycle_Count value changes by running the above command twice separated by 8 min:

sudo smartctl -d ata -a /dev/sda | grep Load_Cycle_Count ; sleep 480 ; sudo smartctl -d ata -a /dev/sda | grep Load_Cycle_Count

The difference of the last numbers of the two lines should not be too high. If you were using the machine a difference of zero would be sensible.

A solution

I followed this guide, which basically turns off powersave on the disk. This is what I did (replace /dev/sda where appropriate):

sudo su
cd /etc/acpi
rm -Rf
chmod 755
echo \#\!/bin/sh >>
echo hdparm -B 255 /dev/sda >>
ln -s ../ start.d/
ln -s ../ suspend.d/
ln -s ../ resume.d/


Why didn’t I come up with that!

October 24, 2007

That being this page. They even have a RSS feed.

Gimp 2.4 released

October 24, 2007

Forgot to post about the Gutsy Gibbon release of Ubuntu (that would be 7.10).

Instead I’ll post on the freshly released Gimp. The plan, it seems, for the next major release is to port the core to GEGL. This will, among other things, add 16 bit per channel support, nondestructive editing and DAG semantics. As for now, we will have to do without and play around with the new and very nice selection tools.

How to enable user scaling of CPU frequency on Ubuntu

October 24, 2007

On a fresh Ubuntu install the ‘CPU Frequence Scaling Monitor’ is just that, a monitor. By following this guide, you can use it to set a specific frequency or a specific governors for automatic scaling.

Blogging on janslak blog

October 20, 2007

For projects with Jan Chu, I am blogging here.