DJing Discussion

This area is for discussion about DJing in general. Please remember the community rules when posting and try to be polite and inclusive.

The hdapm hack thread - for replacement hard drives in Macs

DJ DisGrace 3:09 PM - 20 April, 2012
I've got a new hybrid drive on the way for my 15" unibody, and wanted to make sure I got the hapm hack done properly.

Thanks to DJMark for pointing this out in a couple other threads. I think this is vital info and deserves it's own thread!

Quote:
Just for reference: when installing certain hard drives in the new MacBook Pro's, it is still neccessary to do the "hdapm" thing that's been written about before:

mymacfixes.blogspot.com

I can confirm that this works properly on my new MacBook Pro with a 750gb Western Digital hard drive. (Confirmed by using SMARTUtility, and monitoring the "Load Cycle" count).

Without the "hdapm" fix, a replacement hard drive may very quickly accumulate a lot of load cycles, which is likely to shorten the life of the drive and possibly slow your system down. You also may hear "clicking" as mentioned in the link, though I haven't heard that happening with the WD drives.

I just want to make sure I am doing it right, and that nothing has changed since the last OSX update. I read somewhere that maybe Snow Leopard or Lion would address this in updates. Can anyone speak to that?
DJ DisGrace 3:28 PM - 20 April, 2012
djaction 3:32 PM - 20 April, 2012
i'm pretty sure (based on google and my own experience) that HDAPM just will not work with samsung drives.. i have a 1TB spinpoint and hdapm always fails on it
DJ Michael Basic 5:43 PM - 20 April, 2012
Get a pc?
DJ DisGrace 6:01 PM - 20 April, 2012
Quote:
Get a pc?

touché
DJMark 5:15 AM - 21 April, 2012
Quote:
i'm pretty sure (based on google and my own experience) that HDAPM just will not work with samsung drives.. i have a 1TB spinpoint and hdapm always fails on it


Do you find that the Samsung drive is accumulating a lot of load cycles? If not, there may be no problem to "fix".

The important things to look at (with SMARTUtility or some other tool capable of reading detailed SMART paramaters) are the "Power Cycle Count" and the "Load Cycle Count". If Load Cycles are way higher than Power Cycles, there's potentially an issue. If not, probably not to worry.

I've seen scenarios where a pretty new drive may have a couple hundred power cycles, and something like hundreds of thousands of load cycles. Those are the situations where drive performance and longevity may be suffering.
DJ DisGrace 10:05 AM - 21 April, 2012
Here is a link to the SARTUtility Software:
www.volitans-software.com
I think you get one free scan before needing to pay...

DJMark, do you think a hybrid drive would even require the hack? I assume an all SSD drive would not.
DJMark 10:39 PM - 21 April, 2012
I don't know whether the drive you've ordered will require it or not. It will be easy to determine by looking at the "Power Cycles" and "Load Cycles" with the drive installed.

In a situation where a drive's "advanced power management" is causing a lot of unload/reloads, you can watch the "Load Cycle" count rise in a short time (an hour should be more than enough to determine that). Just leave Smart Utility running as you do other stuff, and re-scan the drives before looking at the "Attributes" a few times. If you see Load Cycles climbing as you do that, it indicates the kind of problem I've discussed earlier.
boabmatic 3:28 PM - 22 April, 2012
Open console from the utilities folder in apps.. Search for apm and there should be success after it tried to set it for the drive.

There was an issue after the 10.6.8 update that required an update of the location of the plish file and a change of permissions..

On my phone at the moment will try and find the link detailing it.
boabmatic 3:34 PM - 22 April, 2012
Found it...

discussions.apple.com
DJ DisGrace 4:21 PM - 22 April, 2012
Quote:
Found it...

discussions.apple.com

good find!

Basically if you are using 10.6.8 the old hack doesn't work anymore. The developer posted a link to the new installer:

mckinlay.net.nz
boabmatic 5:06 PM - 22 April, 2012
When I used the new installed it still didn't work for me I had to manually do this..

Move your hdapm.plist file from the /library/LaunchAgents directory to /library/LaunchDaemons
Give root-privileges to hdapm.plist using: sudo chown root:wheel /libary/LaunchDaemons/hdapm.plist
 
Daktyl 12:48 PM - 30 November, 2012
ok, i def need this. i installed the smart utility and my load cycles were at 465,000 and increasing every couple of minutes... i can't get the hdapm to work properly though. i ran the installer and it said installation was successful, but i can't actually find it to put in the apps>utilities folder. the only thing after the install is the .dmg file. in console, it shows as failed: apm not supported. thing is it shows as a successful run before the restart and before i installed and set everything up in lingon...
this is what the system log shows:

Nov 30 06:48:55 Tai-Nguyens-MacBook hdapm[25031]: disk0: FUJITSU MHY2250BH
Nov 30 06:48:55 Tai-Nguyens-MacBook hdapm[25031]: Set APM Level to 0xfe: Success
Nov 30 06:53:15 Tai-Nguyens-MacBook hdapm[25070]: disk0: FUJITSU MHY2250BH
Nov 30 06:53:15 Tai-Nguyens-MacBook hdapm[25070]: Set APM Level to 0xfe: Success
Nov 30 07:01:38 Tai-Nguyens-MacBook SecurityAgent[25104]: sys.openfile.readwritecreate./Library/LaunchDaemons/com.tainguyen.laun
chd.hdapm.plist|2012-11-3007:01:38 -0500
Nov 30 07:03:14 localhost com.apple.launchd[1] (com.tainguyen.launchd.hdapm[46]): posix_spawn("/Applications/Utilities/hdapm", ...): No such file or directory
Nov 30 07:03:14 localhost com.apple.launchd[1] (com.tainguyen.launchd.hdapm[46]): Exited with exit code: 1
Nov 30 07:03:22 localhost hdapm[45]: disk0: FUJITSU MHY2250BH
Nov 30 07:03:22 localhost hdapm[45]: Set APM Level to 0xfe: FAILED: APM not supported
Nov 30 07:24:49 Tai-Nguyens-MacBook hdapm[301]: disk0: FUJITSU MHY2250BH
Nov 30 07:24:49 Tai-Nguyens-MacBook hdapm[301]: Set APM Level to 0xfe: FAILED: APM not supported
Nov 30 07:24:49 Tai-Nguyens-MacBook hdapm[301]: disk0: FUJITSU MHY2250BH
Nov 30 07:24:49 Tai-Nguyens-MacBook hdapm[301]: Set APM Level to 0xfe: FAILED: APM not supported
DJ DisGrace 12:59 PM - 30 November, 2012
New update here, seems pretty straightforward, lol I can't actually tell if it worked, I just ran the installer and it said installed successfully.

mckinlay.net.nz



Quote:
DJMark, do you think a hybrid drive would even require the hack? I assume an all SSD drive would not.

Just checked my hybrid Momentus XT drive, have had it for about 6 months.
Power cycles: 680
Load Cycles: 49682

I actually forgot all about this.... Just ran the hack, will see how it goes from here.
DJ DisGrace 1:04 PM - 30 November, 2012
Quote:
i can't get the hdapm to work properly though. i ran the installer and it said installation was successful, but i can't actually find it to put in the apps>utilities folder. the only thing after the install is the .dmg file. in console, it shows as failed: apm not supported.

I din't run lingon, just the hack installer. Seems to have worked. Did you run the latest version?


12-11-30 8:54:43.334 AM Installer: hdapm Installation Log
12-11-30 8:54:43.334 AM Installer: Opened from: /Volumes/hdapm/Install hdapm.pkg
12-11-30 8:55:03.550 AM Installer: Install: "hdapm"
12-11-30 8:55:03.550 AM Installer: Install: "hdapm"
12-11-30 8:55:04.268 AM hdapm: disk0: ST95005620AS
12-11-30 8:55:04.268 AM hdapm: disk0: ST95005620AS
12-11-30 8:55:04.566 AM hdapm: Set APM Level to 0xfe: Success
12-11-30 8:55:04.566 AM hdapm: Set APM Level to 0xfe: Success
12-11-30 8:55:04.709 AM installd: Installed "hdapm" ()
boabmatic 8:01 PM - 30 November, 2012
Thanks for reviving this thread .. Recently updated to mountain lion and will need to reapply this hack again ..
DJ DisGrace 2:11 PM - 2 December, 2012
Quote:
Just checked my hybrid Momentus XT drive, have had it for about 6 months.
Power cycles: 680
Load Cycles: 49682

Been a couple days....

Load Cycles now: 49688

It would appear the hack is working
DJ DisGrace 2:14 PM - 2 December, 2012
Quote:
Quote:
Just checked my hybrid Momentus XT drive, have had it for about 6 months.
Power cycles: 680
Load Cycles: 49682

Been a couple days....

Load Cycles now: 49688

It would appear the hack is working

and power cycles 685
d:raf 12:00 AM - 3 December, 2012
Momentus XT 750:

Power cycle count: 1152

Load Cycle Count: 165808

:(
DJMark 12:10 AM - 3 December, 2012
Quote:
Quote:
Quote:
Just checked my hybrid Momentus XT drive, have had it for about 6 months.
Power cycles: 680
Load Cycles: 49682

Been a couple days....

Load Cycles now: 49688

It would appear the hack is working

and power cycles 685


Yes you want to see the "load cycles" and "power cycles" tracking pretty closely.

If you use sleep mode a lot you'll still see more load cycles, but way less than before applying the hdapm fix.
DJ DisGrace 12:22 AM - 3 December, 2012
Quote:
Quote:
Quote:
Quote:
Just checked my hybrid Momentus XT drive, have had it for about 6 months.
Power cycles: 680
Load Cycles: 49682

Been a couple days....

Load Cycles now: 49688

It would appear the hack is working

and power cycles 685


Yes you want to see the "load cycles" and "power cycles" tracking pretty closely.

If you use sleep mode a lot you'll still see more load cycles, but way less than before applying the hdapm fix.

Ok, good to now. Thank DJMark. I do use sleep alot, back and forth from home to school...

Funny part is I started this thread to make sure I knew how to do the hack when I got my new drive. Apparently I forgot to do the hack! Glad the latest update made it very easy to do.
DJMark 7:49 AM - 7 December, 2012
The new hdapm installer sure makes things easier than before...

Just ran it on a test install of Mountain Lion, seems to work just fine.
the_black_one 7:55 AM - 7 December, 2012
Quote:
The new hdapm installer sure makes things easier than before...

Just ran it on a test install of Mountain Lion, seems to work just fine.


links??
DJMark 8:52 AM - 7 December, 2012
There's a link a few posts up...
the_black_one 6:15 AM - 24 July, 2013
OK...... I have a SSD in my opti bay and a 1 terabyte HD in the original place of the HD. The HD that i have a question on is the secondary drive with all my music and video files. I ran SMART UTILITY and for the secondary drive that has my music and video files (1 terabyte).

the results are not to my liking

Power cycle count 125
Load cycle count 14258

can this hack be applied to the secondary drive????
DJMark 7:10 AM - 24 July, 2013
Quote:
can this hack be applied to the secondary drive????


Yes. In a Mac Pro, I've applied it to all four internal drives and a bunch of external ones connected via an eSATA card and eSATA extender bracket (using two otherwise unused eSATA ports that are on the Mac Pro mainboard. Worked exactly as expected.

In a MacBook Pro, the main drive is disk0 and a drive placed into an optical bay bracket will be disk1. In your case, you'd want to apply the hdapm installer referring to disk1.

Actually there's no harm in applying it to both drives (just to be sure that the Mac OS doesn't decide to swap drive numbers arbitrarily, something I've occasionally seen happen in the past). The worst that will happen is a console message showing (example from my own MacBook Pro):


7/21/13 11:08:23.147 AM hdapm[79]: disk0: Samsung SSD 840 PRO Series
7/21/13 11:08:23.147 AM hdapm[79]: Set APM Level to 0xfe: FAILED: APM not supported


while with your secondary drive you'll see something like:


7/21/13 11:08:23.147 AM hdapm[79]: disk1: WDC WD10JPVT-22A1YT0
7/21/13 11:08:23.154 AM hdapm[79]: Set APM Level to 0xfe: Success

Power-cycle count on my WD drive is 656 while load-cycles are at 759...most if not all those extra 103 load-cycles were just from before I applied the hdapm hack to that drive.
the_black_one 7:13 AM - 24 July, 2013
good looking out..... i just ran the installer and it told me installation was successful... is there a way to check if the hack was applied to the right drive?
DJMark 10:02 PM - 24 July, 2013
Quote:
good looking out..... i just ran the installer and it told me installation was successful... is there a way to check if the hack was applied to the right drive?


The simplest way is to launch Console, make sure "SYSTEM LOG QUERIES" "All Messages" is selected on the left side, then search hdapm and look at the most recent entries.
d:raf 4:05 PM - 11 July, 2016
bump (cause I just picked up a used 2012 mbp, needed the link and had to dig through my tracked discussions to find it 'cause the search function sucks).
WarpNote 12:47 PM - 13 July, 2016
I thought this was only relevant for older hard drives?
Reson for asking, is I recently got a fresh mbp non retina 13" (101a model)
and have a Samsung evo SSD on order, going in as soon as I receive it.
AKIEM 6:14 PM - 13 July, 2016
Just got a 101 too, came with El Capitan.

I split the ssd for booting SSL/SDJ.
WarpNote 1:11 PM - 17 July, 2016
El Cap on mine too, ran a command line thing to install SSL on it.
I'll have to check, can't remember from the top of my head...
d:raf 1:47 PM - 17 July, 2016
Quote:
I thought this was only relevant for older hard drives?
Reson for asking, is I recently got a fresh mbp non retina 13" (101a model)
and have a Samsung evo SSD on order, going in as soon as I receive it.


Yeah, I think hdapm is just for mechanical hard drives. If you want a quasi-equivalent for the SSD world, look up TRIM.
WarpNote 1:58 PM - 17 July, 2016
I thought TRIM also only applied to older SSD's ?