Get idle3-tools at SourceForge.net. Fast, secure and Free Open Source software downloads

idle3-tools

Quick links

SourceForge project page Download files Get support SVN access

Description

Idle3-tools provides a linux/unix utility that can disable, get and set the value of the infamous idle3 timer found on recent Western Digital Hard Disk Drives.
It can be used as an alternative to the official wdidle3.exe proprietary utility, without the need to reboot in a DOS environement.
A power off/on cycle of the drive will still be mandatory for new settings to be taken into account.

Idle3-tools is an independant project, unrelated in any way to Western Digital Corp.

WARNING : THIS SOFTWARE IS EXPERIMENTAL AND NOT WELL TESTED. IT ACCESSES LOW LEVEL INFORMATION OF YOUR HARDDRIVE. USE AT YOUR OWN RISK.

Origin of the problem

Modern Western Digital "Green" Drives include the Intellipark feature that stops the disk when not in use.
Unfortunately, the default timer setting is not perfect on linux/unix systems, including many NAS, and leads to a dramatic increase of the Load Cycle Count value (SMART attribute #193).

Problem report in french Problem report in english

If you have a Western Digital EADS or EARS drive, please check you SMART information before it's too late :

$ sudo smartctl -A /dev/sda | grep "^193"
193 Load_Cycle_Count        0x0032   253   253   000    Old_age   Always       -       14493
If the Load cycle count exceeds 1000, you're probably affected by the idle3 timer problem.

Syntax

idle3ctl [options] /dev/device

Examples

Get idle3 timer raw value

# idle3ctl -g /dev/sda

Disable idle3 timer

# idle3ctl -d /dev/sda

Set the idle3 timer to 10s

# idle3ctl -s 100 /dev/sda

Compatibility

Idle3ctl should be compatible with all modern Western Digital HDD driven by a real SATA controler.
Compatibility with SATA-to-USB adapters is uncertain.
Since idle3ctl uses SMART ATA commands to get and set the idle3 timer, it should work if SMART information can be read from your drive.

WARNING

The idle3 timer seems to be a power on only setting. That means that the drive needs to be powered OFF and then ON to use the new setting.

Download

Source code and releases can be found on the SourceForge project pages.

Compilation / Installation

After downloading the tarball, for example the 0.9.1 release (idle3-tools-0.9.1.tar.gz), uncompress it :

$ tar xzvf idle3-tools-0.9.1.tar.gz
Change to the source directory, and compile the tool :
$ cd idle3-tools-0.9.1
$ make
You should get the idle3ctl executable :
$ ls idle3ctl
idle3ctl
$ ./idle3ctl -V
idle3ctl v0.9.1
And run it with root permissions to get or set the idle3 value :
$ sudo ./idle3ctl -g /dev/sda
Now you can optionnally install the tool to the /sbin directory
$ sudo make install
Please note that, as the idle3 setting of your disk is permanent, you only need to run idle3ctl once per drive.

Author

Christophe Bothamy is the author of this software.
Low level ata I/O is done using the sgio.c file of the hdparm project.

License

The idle3-tools project is release under the GNU GPL v3.

Thanks

The Bochs project has been an invaluable tool for reverse engeeniring the proprietary WD ATA commands.

Feedback

Feedback is welcome ! Please report which HDD model you had success (or not). Report bugs to the SourceForge tracker.

WD specific ATA commands

Read Timer Value

  1. VSC Enable
  2. Feature : 0x45
    Count   : 0x00
    LBA16-24: 0x57
    LBA08-15: 0x44
    LBA00-07: 0x00
    Device  : 0xA0
    Command : 0x80 (Vendor Specific)
    
  3. VSC Send Read Key
  4. Feature : 0xD6
    Count   : 0x01
    LBA16-24: 0xC2
    LBA08-15: 0x4F
    LBA00-07: 0xBE
    Device  : 0xA0
    Command : 0xB0 (SMART Function D6 Write Log)
    Log page sent (512 bytes, 00 padded) : 2a 00 01 00 02 00 0d 00 16 00 01 00 00 00 00 
    
  5. VSC Read Timer
  6. Feature : 0xD5
    Count   : 0x01
    LBA16-24: 0xC2
    LBA08-15: 0x4F
    LBA00-07: 0xBF
    Device  : 0xA0
    Command : 0xB0 (SMART Function D5 Read Log)
    Log page read (512 bytes) : Timer value is in 1st byte of the received log page
    
  7. VSC Disable
  8. Feature : 0x44
    Count   : 0x00
    LBA16-24: 0x57
    LBA08-15: 0x44
    LBA00-07: 0x00
    Device  : 0xA0
    Command : 0x80 (Vendor Specific)
    

Write Timer Value

  1. VSC Enable
  2. Feature : 0x45
    Count   : 0x00
    LBA16-24: 0x57
    LBA08-15: 0x44
    LBA00-07: 0x00
    Device  : 0xA0
    Command : 0x80 (Vendor Specific)
    
  3. VSC Send Write Key
  4. Feature : 0xD6
    Count   : 0x01
    LBA16-24: 0xC2
    LBA08-15: 0x4F
    LBA00-07: 0xBE
    Device  : 0xA0
    Command : 0xB0 (SMART Function D6 Write Log)
    Log page sent (512 bytes, 00 padded) : 2a 00 02 00 02 00 0d 00 16 00 01 00 00 00 00 
    
  5. VSC Write Timer
  6. Feature : 0xD6
    Count   : 0x01
    LBA16-24: 0xC2
    LBA08-15: 0x4F
    LBA00-07: 0xBF
    Device  : 0xA0
    Command : 0xB0 (SMART Function D6 Write Log)
    Log page sent (512 bytes, 00 padded) : Send Timer value as 1st byte of log page 
    
  7. VSC Disable
  8. Feature : 0x44
    Count   : 0x00
    LBA16-24: 0x57
    LBA08-15: 0x44
    LBA00-07: 0x00
    Device  : 0xA0
    Command : 0x80 (Vendor Specific)
    

Meaning of the returned raw value depending on the wdidle3 version

The value 0 is used when the timer is disabled.
The values 1 to 128 are reported in .1s by all wdidle3.exe versions.
The values 129 to 255 are in .1s for version 1.00, but in 30s for versions 1.03 and 1.05
The difference only affects the output, the stored timer is identical between versions. Maybe different WD drives have different beheviour.

wdidle3 v1.00 v1.03 v1.05
0disableddisableddisabled
1100ms100ms100ms
10010s10s10s
12812.8s12.8s12.8s
12912.9s30s30s
13013s60s60s
25425.4s3780s3780s
25525.5s3810s3810s