SourceForge project page Download files Get support
APMtimer provides a Linux/Unix utility that
can permanently Disable, Get, or Set the value of the APM timer found in recent Western Digital
2.5 WD*PVX Hard Disks where the APM setting defaults to 0x60 after a power cycle.
It may be used in conjunction with the official wdidle3.exe proprietary program or Christophe Bothamy's Idle3-tools to control your WD Hard Disk's Intellipark timer.
A power off/on cycle to the hard disk is required for the new settings to take effect. If the APM timer is disabled, the hard disk's default APM level should change from 0x60 to 0x80 after a power-cycle.
APMtimer is an independent project, unrelated in any way to Western Digital Corp. or Christophe Bothamy.
WARNING : THIS SOFTWARE IS EXPERIMENTAL AND NOT WELL TESTED. IT MIGHT VOID YOUR WARRANTY WITH WESTERN DIGITAL.
USE AT YOUR OWN RISK!
IF YOU ARE UNSURE OR DO NOT WANT TO MAKE ANY PERMANENT CHANGE TO YOUR HARD DISK, USE THE "hdparm -B
Recent Western Digital 2.5" Hard Disks include the Intellipark feature that parks the Hard Disk's head when it is not in use.
The time required to trigger the Intellipark feature is believed to be defined by the idle3 and APM timers.
The default timer setting might not be perfect for everyone. It could also result in an increase to the SMART Load Cycle Count value (SMART attribute #193).
If you have a Western Digital JPVX or LPVX Hard Disk, you can check the SMART Load Cycle Count information with the following command :
$ sudo smartctl -A /dev/sda | grep "^193" 193 Load_Cycle_Count 0x0032 253 253 000 Old_age Always - 31337If the Load Cycle Count exceeds 1000, your WD hard disk is probably parking at a rate faster than what is ideal for your Operating System. This could be due to either the idle3 feature, new APM feature, or both.
$ sudo hdparm -I /dev/sda | grep "Advanced power" Advanced power management level: unknown setting (0x0060)If the APM is at level 0x0060, it probably has the APM timer set.
# apmtimer -g /dev/sda
# apmtimer -d /dev/sda
# apmtimer -s 10.0 /dev/sda
APMtimer should be compatible with all recent Western Digital HDD driven by a real SATA controller.
Compatibility with SATA-to-USB adapters has not been tested.
Since APMtimer uses SMART ATA commands to manipulate the APM timer, it should work if SMART information can be read from your hard disk.
The APM timer appears to be a power-on only setting. That means that the hard disk needs to be powered OFF and then ON to use the new default setting.
Source code and releases can be found on the SourceForge project pages.
After downloading the tarball, for example the 1.0 release (apmtimer-1.0.tar.gz), uncompress it :
$ tar zxvf apmtimer-1.0.tar.gzChange to the source directory, and compile the code :
$ cd apmtimer-1.0 $ makeYou should get the apmtimer executable :
$ ls apmtimer apmtimer $ ./apmtimer -V APMtimer v1.0And run it with root permissions to get or set the APM value :
$ sudo ./apmtimer -g /dev/sdaYou can optionally install the APMtimer utility to the /sbin directory
$ sudo make installPlease note that you only need to run apmtimer once on each WD Hard Disk as the APM timer setting change is permanent.
This utility is brought to you by Khong How Yu.
It was modified from Christophe Bothamy's idle3-tools project.
Low level ATA I/O is done using the sgio.c file of the hdparm project.
The APMtimer project is released under the GNU GPL v3.
This utility would not have been possible without the invaluable mentoring and guidance given by Franc Zabkar (fzabkar).
Christophe Bothamy for developing the idle3-tools.