You are not logged in.

#1 2009-03-17 15:16:43

EVRAMP
Member
From: Czech Republic
Registered: 2008-10-03
Posts: 173
Website

Where to save hdparm settings?

Hi,
my HDD has a default value of hdparm -B 128 which results in landing and spinning drive's head every 5 seconds.
To not have this, i want to disable power managment by using hdparm -B 255. From man hdparm I read that file /etc/hdparm.conf is sourced. But here comes the problem:
This file is not installed with hdparm package.
After creating this file, it looks like hdparm ignores it.

cat /etc/hdparm.conf

command_line {
hdparm -B 255 /dev/sda
}

But i still see the default value in hdparm -I /dev/sda and HDD turns off every 5 seconds.

Can anyone help me please? Should I report a bug?

By the way I added hdparm -B 255 /dev/sda to /etc/rc.local, so it is executed when booting, but the default value is back after pm-suspend.

Offline

#2 2009-03-17 16:19:41

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: Where to save hdparm settings?

Add a hook. It should look like this

#!/bin/bash
case $1 in
    hibernate)
        echo "A hook to restore hdparm value on resume"
        ;;
    suspend)
        echo "A hook to restore hdparm settings at resume."
        ;;
    thaw)
        hdparm -B 255 /dev/sda
        ;;
    resume)
        hdparm -B 255 /dev/sda
        ;;
    *)  echo "somebody is calling me totally wrong."
        ;;
esac

My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#3 2009-03-18 19:27:42

EVRAMP
Member
From: Czech Republic
Registered: 2008-10-03
Posts: 173
Website

Re: Where to save hdparm settings?

Thank you for reply Dheart,
unfortunately this won't work, power managment level is back 128 after resuming.
And I don't think this is a right solution of non existing hdparm.conf file.

Last edited by EVRAMP (2009-03-18 19:28:09)

Offline

#4 2009-03-18 20:16:50

Andy Mack
Member
Registered: 2008-06-16
Posts: 133

Re: Where to save hdparm settings?

Put hdparm -B 254 /dev/sda* in /etc/rc.local

The settings aren't remembered after suspend/hibernate.

Last edited by Andy Mack (2009-03-18 20:18:16)

Offline

#5 2009-03-18 20:22:53

thunderogg
Member
From: Rio de Janeiro
Registered: 2008-07-13
Posts: 172

Re: Where to save hdparm settings?

This is the fix even if it's not a spindown problem:
http://wiki.archlinux.org/index.php/Lap … wn_problem

Offline

#6 2009-03-19 17:30:42

EVRAMP
Member
From: Czech Republic
Registered: 2008-10-03
Posts: 173
Website

Re: Where to save hdparm settings?

Thank you thunderogg, this works for pm-hibernate, but not for pm-suspend.
I created bug report, since there really should be /etc/hdparm.conf as manual page says.

Offline

#7 2009-03-19 17:36:36

thunderogg
Member
From: Rio de Janeiro
Registered: 2008-07-13
Posts: 172

Re: Where to save hdparm settings?

It works for me.

Offline

#8 2010-11-12 22:59:54

dwheeler
Member
Registered: 2010-11-12
Posts: 21

Re: Where to save hdparm settings?

Offline

Board footer

Powered by FluxBB