Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Set Automatic Acoustic Management level on hard drives' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set Automatic Acoustic Management level on hard drives
Authored by: alexwegel on Dec 10, '05 08:23:24AM
Let's try.

The original code was:


0 0 0 here 428000 , ef , 4000 1 apply ata-command hd .

" 0 0 0 " are three arguments for the "ata-command" call. IRC they were for specifying i/o-buffers that are not needed for this particular command, so they are zeros.

" here 428000 , ef , " creates a ata command buffer in memory, containing "00428000000000ef". The "here" leaves the address of that buffer on the stack as the 4th argument for ata-command.

"4000" is the timeout for the command.

The last number, "1", - i'll have to look this one up again, since i never needed to use ata-command again since my drive is silenced. Doubtlessly, it is another argument;-)

The rest of the line "apply ata-command hd" does the whole work, with "apply" digging out the device-handle of "hd" (which is one of open-firmwares aliases), and calling the ata-command method on it.

Now, to the contents of the command buffer:

I got it from a drive manual, or from the ata spec. Without digging it out again, i remember that the "80" (yes, that's the "80" in "428000") is the level to set the AAM to. Allowed values for this byte range from 01 to fe, where fe makes the drive go loud and fast (AAM=off). I don't remember what happened when using "01" as the value, but i think "80" was working, while "01" was not - not sure.

The "00" just before the final "ef" in the buffer is for the drive number, so if you want to use this command for a secondary drive on a bus, you have to change this from "ef" to "10ef" to make it work.

The final "." hust prints out the result from the ata-command.

To sum it up:

-Change the "80" in "428000" to sth between "01" and "fe" to select different levels of AAM.

-Replace "hd" by the device path or device alias of the drive you want to affect.

-Don't forget to change the "ef" to "10ef" when that drive is the second drive on a bus.

-The rest of the line should stay as it is. Maybe the timeout could be adapted ($4000 = 16384 = ca. 16sec).

Some examples:

Make the first disk go loud:


0 0 0 here 42fe00 , ef , 4000 1 apply ata-command hd .

Silence second disk:


0 0 0 here 428000 , 10ef , 4000 1 apply ata-command hd2 .

Silence a disk with no alias (example):


0 0 0 here 428000 , ef , 4000 1 
apply ata-command /ht/pci@5/k2-sata-root/k2-sata@0/disk@0 .

And don't forget that all the spaces in the line are important: eg. "ef," would be wrong.

HTH
Alex

[ Reply to This | # ]

Set Automatic Acoustic Management level on hard drives
Authored by: mickangel on Dec 10, '05 02:17:42PM
Thanks very much for the information.

I have been playing around with "APM Tuner X". This utility is abandonware but some information is still available here:

http://web.archive.org/web/20011006043108/http://www01.u-page.so-net.ne.jp/gb3/eijim/index-E.html

On my PB 15 with Seagate (ST9808211A) drive I was getting irritating park&clunk noises every 15-20 seconds. Apparently this frequent parking is common, and does help to save energy, but the constant parking/unparking reduces the life of the hard drive and the noise is extremely irritating. I was getting head parking 4 times a minute until I started using APM Tuner X.

The rated life of the hard drive says "600,000 load/unload cycles" (seagate specs) and I had already 96865 load cycle counts for 375 power on hours. Amazingly I'd reached a sixth of the expected life of the hard drive in only 375 'on-hours'. I've emailed Seagate about this but no response so far.

The APM Tuner utility allows you to manually increase a certain APM value meaning that the incessant, frequent and irritating "clunk" of the heads parking happens less often.

For more information on the clunk&park look here:

http://macosg.com/group/viewtopic.php?t=3944&sid=bd90b603bef94e2057c610b8e772f983

The reason for asking for an explanation is I wanted to try to apply a value in open firmware to the APM register of the disk's firmware. ie: replicate what APM Tuner does but using open firmware.

It seems that the following sets the APM value:

0 0 0 here 85D300 , ef , 4000 1 apply ata-command hd .

The 85 above seems to refer to the APM entry and the D3 is 211 in decimal. 211 is the value I found that stopped the park&clunk from happening in APM Tuner.

After mac-boot from open firmware the park&clunk noise is gone and smartmontools' /usr/local/sbin/smartctl disk0 -a | grep Load_Cycle_Count reports the cycle count is now static.

.

[ Reply to This | # ]

Set Automatic Acoustic Management level on hard drives
Authored by: mickangel on Dec 11, '05 01:23:52AM

[update to above]

bugger: the APM open firmware setting doesn't seem to survive across reboots. Oh well - back to having APM Tuner X in the startup group.





[ Reply to This | # ]
Set Automatic Acoustic Management level on hard drives
Authored by: mickangel on Dec 12, '05 07:48:28AM

Ok, I've managed to script the APM Tuner X so that I don't have to manually set the slider and hit "Set" everytime I reboot.

As the app is not scriptable and the slider does not seem to be selectable from applescript I changed some settings in the APM Tuner X nib file so that the default value for the slider is the value I wanted, then wrote a small applescript utility to pass a 'return' keypress (which presses the "set" button).

Finally I added the script to the startup group. It seems to work: upon bootup the script runs, it opens the APM Tuner X program with the slider set to 211 by default, the sends a 'return' keypress to set the value, finally it closes the APM Tuner app.





[ Reply to This | # ]