Home › Forums › Operating Systems › Linux, ChromeOS and all other OS chat › Linux UBUNTU "load cycle" bug: don't let it kill your hard drive!
- This topic has 0 replies, 1 voice, and was last updated 14 years, 8 months ago by
ossas81.
- AuthorPosts
- January 6, 2009 at 7:17 am #160448
ossas81
Memberbackground:
http://nc10ubuntu.wordpress.com/
http://colorfulcuriosities.blogspot.com/2008/05/ubuntu-hard-drive-cycle-linux-only.html
http://ubuntuforums.org/showthread.php?t=941864Ubuntu attempts to save battery power on laptops by spinning-down the hard drive. Shutting off the hard drive is also a safety feature, since if it gets knocked around, it could cause damage or lost data, etc (more info in links above).
However, the laptop hard drives are only rated for ~600,000 “load cycles”. If the hard drive shuts off and on frequently (i.e., 3 times a minute… sometimes an audible “click”), it shortens hard drive lifetime.
The links posted above can guide in diagnosing if your laptop has a problem or not (i.e., ways to monitor the increase in “load cycles”. Depending on the Ubuntu version/mods/power saving packages/kernal, etc, you may or may not have this problem).
I found that I had the problem on my Samsung NC10 (Ubuntu 8.10), despite whatever hotfix Ubuntu released. I fixed it by enabling “laptop mode tools”, and tweaking the “laptop-mode.conf”.
I don’t take credit for this fix (just google “ubuntu load cycle bug”, etc, and you’ll see this and other workarounds).Step 1: enable the laptop mode setting in /etc/default/acpi-support by setting ENABLE_LAPTOP_MODE=true
Step 2: edit the parameters in the file /etc/laptop-mode/laptop-mode.conf
Definitions of all parameters are provided in the links below, as well as how to use/install/configure laptop mode tools. There are also many other places to read up on the topichttp://www.samwel.tk/laptop_mode/faq
http://linux.die.net/man/8/laptop-mode.confAfter some playing around, I determined these parameters in laptop-mode.conf to be “OK” (but not ideal yet) for my Samsung NC10. With these settings, it seems my hard drive spins down maybe 10-20 times per hour (on battery), and never on A/C power.
Note: It doesn’t seem the Windows XP install EVER spins down the hard drive (on either battery or AC). So there’s always the option of altering laptop-mode.conf to also never spin down.
Note: DO NOT just copy all these lines and save them as laptop-mode.conf, since I am omitting many many parameters. Go line by line in your original laptop-mode.conf and make the changes you want:
#I do this so I can control the load cycle issues while on both battery and AC power:
ENABLE_LAPTOP_MODE_ON_BATTERY=1
ENABLE_LAPTOP_MODE_ON_AC=1
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1##these params are VERY IMPORTANT. They have to do with how long the hard drive can be idle before being allowed to spin down (play with them and see how they work for you, as they are closely related to computer usage habits, web browsing, etc):
CONTROL_HD_IDLE_TIMEOUT=1
LM_AC_HD_IDLE_TIMEOUT_SECONDS=7200
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=200
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200##these are also very important. They deal with how aggressive power management is. “254” essentially causes the hard drives to never spin down. “1” (or other low number) causes hard drives to spin down more often. I found “192”, combined with the above “200” for LM_BATT_HD_IDLE_TIMEOUT” to work OK with my Samsung:
CONTROL_HD_POWERMGMT=1
BATT_HD_POWERMGMT=192
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254good luck. Post any observations here, and also follow the links I posted for more info and help. I’m still not 100% sure if these params are ideal for the NC10, so I’m interested if anyone else has any input.
- AuthorPosts
- You must be logged in to reply to this topic.