Laptop APM level gets reset when coming out of Suspend

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.

jia103

Posted 2017-06-11T06:08:40.093

Reputation: 415

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 – 2017-06-11T07:43:20.903

Answers

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!

andretges

Posted 2017-06-11T06:08:40.093

Reputation: 1

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 – 2017-12-21T03:36:37.007