Help get my hdapm working please :(

Discussion in 'MacBook' started by lyons238, Apr 7, 2010.

  1. lyons238 macrumors 6502

    Mar 21, 2010
    ok well i've posted before about this and never got it resolved. i installed hdapm the way the instructions say to and even tried some other commands in terminal that other people have recommended.

    I have hdapm in usr/local/bin and the list in the launch folder. but when i type hdapm in console to search for the string nothing comes up. my load cycle count is still rising too quick for comfort and my seagate drive still faintly clicks while booting up.

    can someone please hop on aim or maybe help me on here? i really want to get this working and no one has been able to help me do so.

    thank you
  2. bluskale macrumors regular

    Mar 29, 2010
    for reasons I can't recall, I put it into /usr/bin
    You'll have to change the script so that it points to the correct location, if you do that though.

    Does the command work if you type it into terminal? it should, if it is installed correctly and working.

    As a side note, I was screwing around with the settings for it... it seemed like it was very binary... either you could have the priority (or whatever the number was representing) high enough to make it stop completely, or low enough to have no effect. There might have been a 1 unit grey area, where it was less frequent for a while, but not always. So strange. I think max (equiv to 254) is probably the best one.
  3. lyons238 thread starter macrumors 6502

    Mar 21, 2010
    what command are you talking about for terminal to check if its working. and what commands do you use to adjust it?
  4. bluskale macrumors regular

    Mar 29, 2010
    I saw your other thread after I posted, so I see what I said wouldn't really be adequate for your level of knowledge.

    basically, if you read the installation instructions with the hdapm program, you'll see that it is a simple command that you can set, but that you need to set it once every time you start up. That's why there's 2 things to install... one is the program, and the other is a script to run the program on startup.

    you're not seeing any hdapm in your console message, but more iportantly, the load cycles are increasing rapidly still.

    Basically this means that the command isn't getting run, but this could be either because the program wasn't installed correctly, or because the automatic script isn't working correctly.

    So, to help find out if it is installed in a usable way, open up terminal, and type hdapm disk0 max and press return. you should get back someting that looks like
    Macintosh-8:~ bluskale$ hdapm disk0 max
    disk0: ST9160821A                              
    Setting APM level to 0xfe: Success
    Macintosh-8:~ bluskale$ 
  5. lyons238 thread starter macrumors 6502

    Mar 21, 2010
    yes it says success when i try this. so im guessing it has to do with the root user access if its not working upon startup.

    now that we know i have it at least installed correctly what can i do? sorry im not the best with terminal, and your help is much appreciated.
  6. bluskale macrumors regular

    Mar 29, 2010
    right, so... that is good to know. most likely the launch daemon (what runs this command on startup) isn't configured quite correctly. Actually, I'm not even sure if that part ever got installed.

    So, in the Finder, choose from the "Go" menu the "Go to folder..." command (apple-shift-g). Type in /Library/LaunchDaemons/

    Here you may or may not find the file "hdapm.plist". If its there, good, if its not there, then open the hdapm disk image, and drag the"hdapm.plist" file into the "LaunchDaemons" folder. It'll tell you you need to authenticate if you want this to happen; do so.

    Finally, open up terminal. Type (the stuff in bold) cd /Library/LaunchDaemons/ press return
    type sudo chown root:wheel hdapm.plist press return. type your admin password and press return.

    I think at this point it should work... so you can try restarting a few times and see if it is (there is a menu utility called smartctl that you can see the load cycle count with... every time the hard drive clicks, the load cycle count will increase by one).

    It looks like I also used the following command, but I don't think there is any need to do so... but in case it is still not working, do this in terminal:

    cd /Library/LaunchDaemons/ press return
    type sudo chmod 755 hdapm.plist press return, type your admin password, and press return again.

    Let me know if this gets things working... if not, I'd like to verify where hdapm was installed, and the contents of the hdapm.plist file, but we'll save that for later.

    One more thing, I don't see any "hdapm" in my console.. I'm not sure if that's because I haven't restarted for several weeks, or because it just doesn't show up. The load cycle count is definitely under control though.
  7. lyons238 thread starter macrumors 6502

    Mar 21, 2010
    YESSS! WORKS :). says hdapm success apm level 0xfe in console. thanks sooo much man. appreciate your time and patience. im going to favorite this thread because im actually getting a new seagate drive and sending this one back. already has 11000 load cycle counts after 2 weeks. so now i know exactly how to install hdapm for the new drive.

    also do you think hdapm helps save power?
  8. bluskale macrumors regular

    Mar 29, 2010
    I'm not sure... the author implies that it might actually lower your battery life, and could leave your hard drive spinning more often (perhaps not the best thing, if your laptop gets bumped a lot). To be honest, I really don't know enough to say.

    I'm really not even sure if it is a big issue or not... some seems to think that incrementing the load cycle count so quickly will lead to an early drive death... others not so much. I think a related issue on Ubuntu a year or two back actually was found to lead to shortened hard drive life. I was a little surprised, but my gf bought a new macbook pro last year, and it essentially shipped with this issue, if it is one (I installed hdapm anyway).

    To be honest, I'm kind of surprised that you've heard about the whole hdapm thing without already having the know-how to get it working. Glad this got things working though.
  9. lyons238 thread starter macrumors 6502

    Mar 21, 2010
    well right on the hdapm download site it says
    - eliminate "clicking when idle" noises exhibited by some laptop hard drives
    - make a drive save more power and spin down more aggressively that in does with the default OS settings.

    but i also heard it makes the drive spin more and run at max power settings, so that confused me a little.

    and yeah i found hdapm because i try to do my homework before i do things (in my case upgrade my hard drive for making music). and i just read and read and read and finally found that many people were noticing high load cycle counts, i installed my drives and noticed just that. so i wanted to fix it with hdapm.

    and i installed it correctly as the directions told me, i was unaware at the time that there is a few things you most likely have to do that are not included in the directions.

    and to be honest im not as tech savvy on a mac. i mean i've used them for a couple years but i'm just now starting to get to know them a lot better. i knew how to do quite a bit with windows, but i dont miss windows at all. in fact mac is much more simple.
  10. bluskale macrumors regular

    Mar 29, 2010
    ohh, right, so the "max" part of the command (hdapm disk0 max) is basically maximum performance / no spin down. you could specify "min", which should replicate the original issue, or any number between 1 and 254.

    By trial and error, I found the boarder between constant clicking and no clicking was 195 on my laptop with the drive I installed... higher than that = no clicking, lower than that = clicking. in theory, there should be a gradual change with a gradual change in the setting, but I didn't see that in practice.

    anyhow, good sleuthing to find the program and all. there is a lot of 'hidden' power with the underlying unix system in mac os x... if you're interested, there are always tutorials to play around with it. just be aware that a few bad typos can result in some massive data loss, especially when you're using sudo commands (although without sudo commands, you can still destroy your user directory). these commands are pretty obvious though, and any decent tutorial/ etc will point them out.
  11. lyons238 thread starter macrumors 6502

    Mar 21, 2010
    ok thanks a lot man. so to edit the power settings i can just replace the max with a number between 1 and 254? do i have to go under root access again, using sudo? id rather not run on max power settings if necessary. i like to conserve battery as well as not have any clicks/age my drive faster than normal.

    and also i was told most drives can live up to 600,000 load cycle counts, so by theory without hdapm i would be killing my drive quicker. just stating that because i saw before you mentioned that there could be a correlation between high load cycle count and hd death, when in fact there is a direct relation.

    but yeah, please let me know how i can change my power settings if you could, and have a good day!
  12. bluskale macrumors regular

    Mar 29, 2010
    I don't think its possible to have it both ways. I would prefer the shorter battery life, personally. I'm not sure if it would be noticeably different, either... it seems like the actions by the drive that generate the clicking are not necessarily intended, nor power saving in the first place (the frequency for me was ~ 1 every 6 seconds). At least with the hdapm disk0 max setting, its not being driven to an early death too.
  13. lyons238 thread starter macrumors 6502

    Mar 21, 2010
    well i wasent saying i want to set it for both. i was just asking how would i set it to say 192 like you said? or should i just keep it at max?
  14. luisnobregaster macrumors newbie

    Mar 30, 2010
    hitachi hdds

    I have a MBP 4.1 with an hitachi 200GB with 90000 cycles (for 2,5 years now). I still have 10.5.8 running but i will move to SL soon.

    I am planning to change my Hdd to an Hitachi 500 GB (5K500 or 7K500) as I have heard that these drives cause less problems than WD Seagate or Samsung in terms of lcc.

    Does anyone have experience with these 2 drives on 10.5 or 10.6? anyone have used hdapm with these drives on 10.5 or 10.6? and do you know if they support hdapm?

    thanks a lot!
  15. bluskale macrumors regular

    Mar 29, 2010
    no experience, but there shouldn't be any reason why hdapm wouldn't work with any drive you install (at least ones that are installed in your computer... external drives not so much)
  16. Signal-11 macrumors 65816


    Mar 23, 2008
    2nd Star to the Right
    I started an earlier thread on this and my experience with the Samsung M7E HM640JI (640GB) is that my load cycle counts were going up around 150-200 an hour, which is excessive.

    I switched out to a Hitachi 5K500, and load cycles were around 75-100 an hour, which is still on the high end but significantly lower than the Samsung. I kept this for a few days.

    A few days ago, I swapped the Samsung back in and am playing with the settings. Load cycle counts are above 200/hour right now. Closer to 250. That's essentially a spin/up down cycle once every 15 seconds.

    Typically, laptop drives are rated for around 600k cycles, which is the minimum. My Hitachi 5k250 that came with the drive had right around 100 cycles an hour by the time I pulled it, with around 12,000 hours up and 1.2 million load cycles, which is roughly twice it's minimum rated life. I had the MBP for a little over two years at the time of the replacement.

    I did notice a lot more errors popping up in the last few weeks, but this may have had to do with the environment and how full the drive was - at the end, I had 1-2 gigs left and was constantly running out of space.

    The truth is that no one really knows if the high/excessive load cycle count is worth worrying about. I've read the arguments both ways and often times, guys on both sides of the argument say things that make sense while at the same time say things that don't make any sense and often continue to do so even the technical errors are pointed out - and as is the nature of internet arguments, once anyone digs in their heels, game over in terms of rationality.

    If you're only going up to the 500, I'd suggest the Hitachi. It's quieter and has all around middle of the road performance.

    If you go higher, 640GB+, you have two options. Just stop worrying and love the atom bomb (and keep backups) or fret about it and/or keep screwing around with it in hopes of finding the proverbial pot o'gold. I happen to have a lot of time on my hands right now so I've chosen to screw around.

    And please don't make blanket statements about what should and should work if you haven't tried it. hdapm does NOT work in default on the Samsung 640. I know, because I can get it to hold from Linux through exactly one reboot cycle into OSX but I can't get it to hold past through an OS X reboot. Weird, but I'm having fun. YMMV.
  17. luisnobregaster macrumors newbie

    Mar 30, 2010
    hi there,

    thanks a lot for your info and findings. They are really helpfull.

    I would prefer to have a 640GB hdd but like u i have heard that both WD and Samsung are have a high lcc which cannot be solved by hdapm and I have heard that the WD shows problems like halting/stalling while playing a movie this is simply not acceptable for me! If Hitachi had a 640GB even 5400 rpm I would go for it without a blink.

    In this sense I think the best option in Hitachi 500GB 7k500. The 500GB 5k500 is also an option but i think that the increase in performance is about 30% for a small increase in the temperature so I think it pays off going for the 7k.

    In the meantime since I knew I was going to upgrade both the HDD from Hitachi 200GB to Hitachi 500GB 7k500/5k500 and also from 10.5 to 10.6 I decided to implement hdapm and lingon still with the Hitachi 200GB HDD and on 10.5 and result was really good!

    hdapm actually worked. The lcc count almost stopped completely. I only get a 2 lcc increase every time I put the MBP to sleep. When it boots I actually get a bit more but I don't get the 100 lcc/hour that I used to get. I have now an increase in temperature but its about 2 deg C so its negletable.

    Considering this I am going for the Hitachi 7k500 and i am expecting to solve the lcc problem again using the hdapm/lingon in Snow Leopard.

    I think that Hitachi 7k500 is really the best option right now interms of both lcc and performance. I am only skeptical if Hitac hi 7k500 supports hdapm and if hdapm will work under SL.
  18. bluskale macrumors regular

    Mar 29, 2010
    to signal-11:
    the hdapm command has to be applied at reboot for some hard drives (eg, mine, or the OPs)... so you probably only need need to make sure that the launch daemon is installed correctly, assuming that you installed hdapm correctly in the first place. Did you try steps similar as to those I detailed in the above posts?
  19. Signal-11 macrumors 65816


    Mar 23, 2008
    2nd Star to the Right
    Dude, its not a launchd issue with the HM641JI. It's a power cycling issue and not a reboot issue as I had originally assumed. I've tested this and since I rarely ever hard cycle anyway, I just wrote a script to remind me to soft restart once when I do.
  20. Sergievsky macrumors newbie

    Jul 18, 2010
    Thank you so much for this blueskale. This last bit of yours was the one that FINALLY got mine working. It was crucial for me because I am a musician and my main apps is Logic Pro and Digital Performer, and the performance just blows until I got hdapm working.

    I don't think it works with a second internal drive though )I replaced my dvd drive with a second one). Ah well. Thanks again!

  21. bluskale macrumors regular

    Mar 29, 2010
    I bet if you duplicate the hdapm.plist file, and change the "disk0" in this section
    to "disk1" then it would work for the second drive. You may want to test out the command in the terminal first (type "hdapm disk1 max" or "hdapm disk2 max" or so on) to make sure you can get the command to work manually. I'm not really sure if simply duplicating the file is the correct approach, but intuitively, it seems it should work. Note that you probably have to apply the same set of commands as previously to the hdapm2.plist file.

Share This Page