harddisk spindown after return from hibernation

If none of the more specific forums is the right place to ask

harddisk spindown after return from hibernation

Postby rayandrews » 2018-03-03 17:11

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?
rayandrews
 
Posts: 44
Joined: 2014-01-31 21:32

Re: harddisk spindown after return from hibernation

Postby bw123 » 2018-03-03 17:48

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.
User avatar
bw123
 
Posts: 3578
Joined: 2011-05-09 06:02
Location: TN_USA

Re: harddisk spindown after return from hibernation

Postby stevepusser » 2018-03-03 20:30

I think the tlp script, which has the latest version in backports, has a setting for that, too.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10276
Joined: 2009-10-06 05:53

Re: harddisk spindown after return from hibernation

Postby rayandrews » 2018-03-04 15:41

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'?
rayandrews
 
Posts: 44
Joined: 2014-01-31 21:32

Re: harddisk spindown after return from hibernation

Postby stevepusser » 2018-03-04 19:38

It's installed by the tlp package.

Code: Select all
apt install tlp


Then take a look at the script, /etc/default/tlp.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10276
Joined: 2009-10-06 05:53

Re: harddisk spindown after return from hibernation

Postby rayandrews » 2018-03-06 16:51

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
rayandrews
 
Posts: 44
Joined: 2014-01-31 21:32

Re: harddisk spindown after return from hibernation

Postby bw123 » 2018-03-06 16:55

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?
User avatar
bw123
 
Posts: 3578
Joined: 2011-05-09 06:02
Location: TN_USA

Re: harddisk spindown after return from hibernation

Postby rayandrews » 2018-03-06 22:39

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.
rayandrews
 
Posts: 44
Joined: 2014-01-31 21:32


Return to General Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable