Comment 3 for bug 318980

Revision history for this message
Günther Köckerandl (gkoe-deactivatedaccount) wrote :

This patch tries to make sure that /etc/acpi/*.d/90-hdparm.sh does not overwrite settings made by laptop-mode-tools or hdparm. Each harddisk is checked individually; APM settings are only applied if the drive is neither controlled by /etc/laptop-mode/laptop-mode.conf nor by a matching section in /etc/hdparm.conf.

However, the proposed patch does NOT check whether the device section in /etc/hdparm.conf actually contains an APM setting. This would require a lot of functionality that is already present in /lib/udev/hdparm. Maybe this functionality should be exported to a small parser lib for the hdparm.conf file format?
Note that this problem only affects people who created a drive section in hdparm.conf and left out the APM value (which seems unlikely; most people seem to edit /etc/hdparm.conf because they *DO* want to set a specific APM value). The default behaviour does not differ from the current implementation of 90-hdparm.sh