Posts Tagged ‘Laptop’

Eee PC Clicking Sound

Wednesday, June 16th, 2010

I’ve noticed that on battery power the hard disk makes a clicking sound every 20 seconds or so. This symptom has been reported particularly by laptop and netbook users, including those that use Windows (though I gather it’s much less of a problem with Windows users).

A quick summary of the situation. If your Eee PC has a SATA hard disk, chances are you’ve noticed this problem. The simple solution is just to disable Advanced Power Management on the hard disk all together and then get on with your life. There are plenty of other power saving features that work, but it seems that the APM is not well suited to Lucid Lynx (or vice versa).

Ubuntu is telling the hard disk to take it easy and not to chew too much power. But this is really just to lull it into a false sense of security as it doesn’t actually cut the drive any slack. In fact, Lucid has some services which appear to be very demanding on the hard disk. The hard disk keeps trying to take a break but Lucid keeps accessing it. The result is a drive that constantly sleeps and wakes up again (causing the click to be heard, as the disk heads park and then move back into working position again). Luckily this action was actually audible, otherwise I’d have been none the wiser, oblivious to the performance hits until my hard disk finally died from excess wear.

A quick search revealed the following command to instantly stop the clicking:

$ sudo hdparm -B 254 /dev/sda

Where “sda” is your SATA hard disk device of course. That command will buy you some time to figure out what’s really happening. Unless you are feeling adventurous, you’ll probably reach the same conclusion that I have. But lets work through this anyway for the sake of actually understanding a little more about what’s actually going on here.

The following command will tell you lots of stuff about your hard drive that you probably don’t want to have to care about:

$ sudo hdparm -I /dev/sda

You can find just the line we are interested in with this one:

$ sudo hdparm -I /dev/sda | grep "Advanced power management"

Which should yield this, since we ran hdparm with the -B 254 option…

Advanced power management level: 254

This is what we want. But if you reboot and run that command you will see it reverts back to level 128. In fact, if you plug the power back in and then remove it, theoretically it should revert to APM level 128.

To find out what the hard drive has been up to, install the smartmontools package using synaptic or sudo apt-get install smartmontools. Then you can run this command (make sure your terminal window is nice and wide or maximised):

$ sudo smartctl -a /dev/sda

Cool huh? More stuff you don’t want to have to care about. But just have a look at the section titled “Vendor Specific SMART Attributes with Thresholds”. On my Eee PC I had very high “RAW_VALUE” for “Load_Cycle_Count” row.

“Load_Cycle_Count” was 3150 and “Power_On_Hours” was only 56. So I’m assuming this means the drive has averaged one “load cycle” per minute of it’s life. Which is about right, since the clicking only happens on battery power and then it happens about every 20 seconds during this time. So if the clicks coincide with these “load cycle” thingamajigs, this would suggest it’s lived on batteries less than 1/3rd of it’s life, which is about right.

If you don’t like my science, or you have a different interpretation of your own threshold table then you might want to have a look at the SATA known issues wiki page. Meanwhile, on with the show…

With a default Lucid Lynx installation, the APM level 128 setting is triggered by a htparm power management script that lives here… /usr/lib/pm-utils/power.d/95hdparm-apm. If you have another power management package installed such as laptop-mode-tools then your on your own.

The configuration for this and possibly other power management tools lives in /etc/hdparm.conf. To basically disable APM when running on battery power, add the following to the end of the config file…

/dev/sda {
	apm = 254
	apm_battery = 254
}

This tells hdparm to keep the drive at APM level 254 even when it’s running on battery power. Unfortunately, this seems to be the simplest option when running Lucid Lynx on an Eee PC. Apparently Lucid Lynx just doesn’t want to stop molesting the hard disk. Just disable APM for now. Hopefully future UNE releases will address this rather major issue.

I’m planning to test the battery life of the OEM Windows 7 and then compare it with Lucid Lynx without APM. I expect it to be a bit of a hit, but I get the impression it’s not worth the effort to make Lucid Lynx APM friendly. If you are feeling masochistic though, perhaps you can pick up from where this guy left off.. http://forum.eeeuser.com/viewtopic.php?id=85230

I see this as an unfortunate trade off between power consumption and performance. The performance improvement of Ubuntu still far out weighs this issue. To be fair, I first found out how to fix this problem from Windows users. Someone has ported a lot of the functionality of hdparm to a tool called quietHDD to solve this for the Windows platform. At least our solution is supported and bundled with the operating system. I found it interesting anyway to know a bit more about how power management works in Ubuntu.

References:
man hdparm.conf

Paying the Microsoft Tax

Wednesday, July 29th, 2009

Since I’m always keeping an eye out for good deals on Netbooks, I stumbled upon this great little budget Toshiba laptop. It’s a Toshiba Satellite Pro L300 (PSLB9A-02L001). Not exactly what I’m looking for, but I decided to order one for my folks. For just $600, you can’t really go wrong. Here’s the specs…

  • Mobile Intel® Celeron® M 585 Processor (2.16GHz, 667MHz FSB, 1MB L2 cache)
  • Mobile Intel® GL40 Express Chipset
  • Genuine Windows Vista® Home Premium 32bit SP1(OEM)
  • Hard Drive: 160GB 5400rpm 2.5″ SATA
  • RAM: 1GB DDR2 667 expandable to 2GB# (one slot used, one slot free)
  • Video 15.4″ Widescreen XGA TFT Active Matrix 200NIT (1280×800) resolution
  • Video Card Intel® Graphics Media Accelerator GL40
  • DVD SuperMulti Dual / Double Layer (DVD±R±RW,DVD±R(DL) DVD-RAM) Read: CD-ROM(24x), DVD-ROM(8x) Write: CD-R 24x, CD-RW 4x
  • 10/100Mbps LAN
  • Integrated Atheros 802.11 b/g WLAN
  • Express card slot, RGB, 3 x USB 2.0, Headphone & microphone port, Bridge media Reader/Writer slot (SD, MMC, Memory Stick/Memory Stick Pro), Integrated microphone
  • Integrated Web Camera
  • Intel® High Definition Audio Sound
  • 6 cell Lithium-Ion battery (up to 3 hours)
  • Dimensions 362mm(W) x 267mm(D) x 33/37.7mm(H)
  • Weight 2.6kg

The processor and video card are lame I know, but considering Mum is currently using an 8 year old PC with Windows 98 on it, I don’t think she’s going to notice. Still, this thing is badly under spec’d for running Vista. All the reviews I’ve read indicate this thing is going to be pretty hit and miss as far as getting a fully functional distro installed without too much bother, so it’s getting delivered here and I’m preparing to have some geeky fun with it. I’m also getting an additional 1GB of RAM delivered, so plan B is to just revert to Vista and surgically remove the guff to get some reasonable performance out of it before handing it over. Having successfully avoided ever touching Vista thus far, I’m actually curious to give plan B a go.

The main reason I still bought it despite the bad Linux reviews was some guys down in Melbourne who offer support services over the phone for this model and have listed “Linux Compatibility” as “Excellent”. My plan is to install the latest Ubuntu and then what ever doesn’t work, I’ll contact them and ask them to book me some time for a phone support call to sort out the rest. I’m happy to pay $40 for 1/2 hour of support, that’s more than reasonable if it saves me half a day.

What really bugs me is that I’m still sponsoring Microsoft out of all of this. I’m still indirectly paying for the crappy OEM Vista which is no doubt the main reason these laptops are now so drastically reduced in price. There is no refund available to me if I don’t want to use it. Hell, apparently I can’t even downgrade to Windows XP. Microsoft was advertising that as an option, but apparently it only applies under very strict circumstances. So this poor laptop has to suffer Vista on the consumer electronics market and hence it’s doomed to perform horrendously. Ok, I’m making a few assumptions based on very little at this stage (considering it hasn’t even been delivered yet). I certainly smell a follow up post or two.