0

While investigating why my hard drive load cycle count was increasing, I observed my APM level gets reset each time I come out of Suspend on my Debian Jessie laptop running MATE:

$ sudo smartctl --get=apm /dev/sda
...
APM feature is:   Disabled
$ sudo hdparm -I /dev/sda | grep level
    Advanced power management level: disabled
$ sudo hdparm -B /dev/sda

/dev/sda:
 APM_level  = off

After putting the laptop into Suspend and then taking it out of Suspend, I have the following:

$ sudo hdparm -I /dev/sda | grep level
    Advanced power management level: 128
$ sudo smartctl --get=apm /dev/sda
...
APM level is:     128 (minimum power consumption without standby)
$ sudo hdparm -B /dev/sda

/dev/sda:
 APM_level  = 128

I tried enabling the APM options in /etc/hdparm.conf, but it didn't seem to help:

...
# -B apm setting
#apm = 255
apm = 255
# -B apm setting when on battery
#apm_battery = 127
apm_battery = 255
...

Then:

$ sudo /etc/init.d/hdparm restart

After putting the hard drive into Suspend and bringing it back out, I noticed the APM level is back to 128.

  • I don't know MATE at all so it's a long shot: it may have its own power management settings and they interfere. Something like this where there is a 'disks' entry on the left (yet it's from 2012, rather old). I believe this screenshot is from mateconf-editor. – Kamil Maciorowski Jun 11 '17 at 7:43
0

Do you use an SSD drive? In my case the acoustic level management for HDD set by default in /etc/hdparm.conf was the culprit.

These settings eventually did the trick for me:

# quiet # this should be commented out

/dev/disk/by-id/<YOUR_DISK_UUID> {
        acoustic = 128
        keep_features_over_reset = on
}

After this my SSD drive stopped changing APM level on suspend/resume, as well as this fixed an SG_IO error, probably related to the same issue.

More on finding your disk UUID and hdparm configuration can be found here: http://forum.havetheknowhow.com/viewtopic.php?t=479

Hope that helps!

  • For new folks, it would help to mention this will require restarting /etc/init.d/hdparm for changes to take effect. I'm afraid this didn't work for me. For my drive, hdparm -M reports acoustic is not supported, and if I put in the "acoustic = 128" setting, my /var/log/syslog shows hdparm didn't like that setting. Without it, the effect is unchanged. – jia103 Dec 21 '17 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.