Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Hardware & Laptops
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Hardware & Laptops
Problems with hardware & laptops not being detected or supported during or after install.

 
 
Thread Tools Display Modes
Old August 22nd, 2007   #1
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,405
Kubuntu 10.04 Lucid Lynx
[SOLVED] Hard drive spinning up/down (Laptop)

Hi Folks,

I am running Kubuntu 7.04 on laptop PC. Recently I noticed that my hard drive is constantly spinning up & down (at least once a minute) causing a "click" sound, apparenly as part of Ubuntu's power management. Since spinning up & down can significantly reduce the life cycle of your HD, I want to disable this feature like I did in Dapper.

But I don't know how to do that & where to start. I cannot remember when I did while I was on Dapper. Please note that the HD is fine and that the 'click' sound has definitely to do with the power management.

What I did is this, but to no avail:
Quote:
sudo gedit /etc/laptop-mode/laptop-mode.conf
Now set these values to '0':
Quote:
CONTROL_HD_IDLE_TIMEOUT=0
Quote:
BATT_HD_POWERMGMT=0
Does anybody know which file controls hard disk power management?
wieman01 is offline  
Old August 23rd, 2007   #2
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,405
Kubuntu 10.04 Lucid Lynx
Re: Hard drive spinning up/down (Laptop)

Deleted...

Last edited by wieman01; August 26th, 2007 at 04:43 AM..
wieman01 is offline  
Old August 26th, 2007   #3
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,405
Kubuntu 10.04 Lucid Lynx
Re: Hard drive spinning up/down (Laptop)

SOLUTION:
Add startup script:
Code:
sudo gedit /etc/init.d/local_settings
Now add this:
Code:
hdparm -B 255 /dev/xxx
...whereas 'xxx' represents your hard drive.

Make it executable:
Code:
sudo chmod +x /etc/init.d/local_settings
Create symb-link:
Code:
sudo ln -s /etc/init.d/local_settings /etc/rc2.d/S99local_settings
Restart & the weird clicking sound should now have disappeared. Guess that's it!

Last edited by wieman01; March 20th, 2010 at 05:00 AM..
wieman01 is offline  
Old September 7th, 2007   #4
louaym
Spilled the Beans
 
Join Date: Jun 2006
Beans: 13
Re: Hard drive spinning up/down (Laptop)

Quote:
Originally Posted by wieman01 View Post
SOLUTION:
Add startup script:
Code:
sudo gedit /etc/init.d/local_settings
Now add this:
Code:
hdparm -B 254 /dev/xxx
...whereas 'xxx' represents your hard drive.

Create symb-link:
Code:
sudo ln -s /etc/init.d/local_settings /etc/rc2.d/S99local_settings
Restart & the weird clicking sound should now have disappeared. Guess that's it!
many thanks to the tip; it worked for me too.

louay
__________________
Many Thanks
__________________
Louay
louaym is offline  
Old October 23rd, 2007   #5
GTdriver2012
5 Cups of Ubuntu
 
GTdriver2012's Avatar
 
Join Date: Sep 2007
Beans: 29
Re: Hard drive spinning up/down (Laptop)

wieman a couple of questions from a linux newb, any help here would be much appreciated and probably extend the life of my hdd

Does this work in gutsy ubuntu 7.10?
if so, is this a permanent fix, or do you have to do this every time you boot, as I was using the hdparm -B 254 dev/sda command in the terminal every time after I boot and log in
and if this is a permanent fix for 7.10, which would be awesome and much kudos to you for finding this!!!
do I type each of these commands into the terminal one at a time, one after another?

thanks again for any help

Last edited by GTdriver2012; October 23rd, 2007 at 02:10 PM..
GTdriver2012 is offline  
Old October 23rd, 2007   #6
Daelyn
Gee! These Aren't Roasted!
 
Daelyn's Avatar
 
Join Date: Oct 2007
Location: Nottingham
My beans are hidden!
Ubuntu 8.04 Hardy Heron
Re: Hard drive spinning up/down (Laptop)

Files in /etc/init.d/ are read at every boot (I think so, still a newbie), so, should be a permanent fix.

There are many of them, involving placing hdparm -B255 (or 254 depending on HDD), in different locations.

I just rebooted after adding this string in /etc/init.d/ and I have not heard any click yet.
Daelyn is offline  
Old October 23rd, 2007   #7
GTdriver2012
5 Cups of Ubuntu
 
GTdriver2012's Avatar
 
Join Date: Sep 2007
Beans: 29
Re: Hard drive spinning up/down (Laptop)

thank you for the reply Daelyn, i'm really hoping this works
GTdriver2012 is offline  
Old October 23rd, 2007   #8
GTdriver2012
5 Cups of Ubuntu
 
GTdriver2012's Avatar
 
Join Date: Sep 2007
Beans: 29
Re: Hard drive spinning up/down (Laptop)

Great..... I just tested it in ubuntu 7.10 and it works

thank you louaym for the tip, here is a simplified version for all us newb's out there

!!!!!!DISCLAIMER!!!!!! I am not an expert at all, and I claim no responsibility for data loss or damage to your HDD if you are concerned about that, do not proceed, as I myself am unsure of the longterm affects this may have (although your hard drive parking every 5 seconds may shorten the life of your hdd to as little as a few months) A few things to note as to what you are about to do by following these instructions..... you are basically telling your hdd not to park its heads for a very long period of time (this is common in desktop computers). It is, however, common for laptops to park there hdd heads somewhat frequently to save power and potentially protect data and damage to your hdd if your laptop is dropped or jarred suddenly, which you probably should avoid anyway.... anyway here goes\


Go to your terminal in Application/Accessories/Terminal
copy this line from here and paste in your terminal

sudo gedit /etc/init.d/local_settings

hit enter and it will ask for a password, type in your password that you use to log into the computer when you turn it on (note no asterisks will appear, this is normal) once you have entered your password hit enter and a text editor window will pop up. Copy this line from here and paste it in the window that just opened up.

hdparm -B254 /dev/xxx

*note* after you paste this line you need to edit the part that reads xxx, you have a few options here, if you have a pata/eide hdd in your computer you need to replace xxx with hda, if you have a sata hdd in your laptop you need to replace xxx with sda. so your new line should read either
hdparm -B 254 /dev/hda or hdparm -B 254 /dev/sda

once that has been edited to the correct line, go to "file" and select "save" at this point it is safe to close the text editor window.

next step, in the Terminal window copy this line from here and paste it in the terminal.

sudo ln -s /etc/init.d/local_settings /etc/rc2.d/S99local_settings

hit enter and then close the Terminal. Reboot your laptop and TADA no more clicking, your laptop will only click (park its heads) after a very long period of inactivity.

Last edited by GTdriver2012; October 23rd, 2007 at 08:11 PM..
GTdriver2012 is offline  
Old October 23rd, 2007   #9
GTdriver2012
5 Cups of Ubuntu
 
GTdriver2012's Avatar
 
Join Date: Sep 2007
Beans: 29
Re: Hard drive spinning up/down (Laptop)

I have restarted about five different times now and it is working perfectly
GTdriver2012 is offline  
Old October 23rd, 2007   #10
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,405
Kubuntu 10.04 Lucid Lynx
Re: Hard drive spinning up/down (Laptop)

As you guys have highlighted this is a permanent fix which will stick. I think the development team is aware of this issue and should fix the bug soon. I was hoping that Gutsy would fix it, but apparently this is still an issue.

Thanks, GTdriver2012, for posting your stuff as well. I was not aware of the fact that simple commands (with not further comments) can be confusing to newcomers. I usually try to convey my message in the simplest way possible, but apparently it does not always work out.
wieman01 is offline  
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:28 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry