Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

harddisk spindown after return from hibernation

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
rayandrews
Posts: 112
Joined: 2014-01-31 21:32
Has thanked: 4 times
Been thanked: 1 time

harddisk spindown after return from hibernation

#1 Post by rayandrews »

When I return from hibernation all my disks seem to forget their 'hdparm' settings:

hdparm -S60y /dev/sda
hdparm -S60y /dev/sdb

... which I have in /etc/rc.local. I always have to reset the spindown time again at the command line. Is there some way of accomplishing this automatically?

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: harddisk spindown after return from hibernation

#2 Post by bw123 »

The file /etc/hdparm.conf is reloaded thru the /usr/lib/pm-utils/power.d/95-hdparm-apm script when waking from suspend. You can put your settings there instead of rc.local but use the /dev/disk/by-uuid/ label instead of the examples shown at the end.
resigned by AI ChatGPT

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: harddisk spindown after return from hibernation

#3 Post by stevepusser »

I think the tlp script, which has the latest version in backports, has a setting for that, too.
MX Linux packager and developer

rayandrews
Posts: 112
Joined: 2014-01-31 21:32
Has thanked: 4 times
Been thanked: 1 time

Re: harddisk spindown after return from hibernation

#4 Post by rayandrews »

stevepusser wrote:I think the tlp script, which has the latest version in backports, has a setting for that, too.
Steve, pardon, but you are way over my head there, what is the 'tlp script'?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: harddisk spindown after return from hibernation

#5 Post by stevepusser »

It's installed by the tlp package.

Code: Select all

apt install tlp
Then take a look at the script, /etc/default/tlp.
MX Linux packager and developer

rayandrews
Posts: 112
Joined: 2014-01-31 21:32
Has thanked: 4 times
Been thanked: 1 time

Re: harddisk spindown after return from hibernation

#6 Post by rayandrews »

Nuthin' works, I even tried making a systemd service. Hafta just spin the disk down manually on restart, it's not the end of the world

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: harddisk spindown after return from hibernation

#7 Post by bw123 »

rayandrews wrote:Nuthin' works, I even tried making a systemd service. Hafta just spin the disk down manually on restart, it's not the end of the world
Works fine here putting the settings in hdparm.conf

Code: Select all

# tail /etc/hdparm.conf
/dev/disk/by-id/ata-Maxtor_4R080L0_R2S6K4FE  {
#       apm = 127
        spindown_time = 60
}
/dev/disk/by-id/ata-HDS728080PLAT20_PFD255S2CVB3LJ {
#       apm = 127
        spindown_time = 60
}
In general, I've never used rc.local and don't really consider it a good idea at all. Why use that method?
resigned by AI ChatGPT

rayandrews
Posts: 112
Joined: 2014-01-31 21:32
Has thanked: 4 times
Been thanked: 1 time

Re: harddisk spindown after return from hibernation

#8 Post by rayandrews »

You know, I'm so used to using hibernation that I failed to notice that if I quit instead then boot to prompt, the spindown is accomplished. It's only when I start up xfce4 that it spins up again, so this seems to be an xfce4 issue.

Post Reply