Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I make a shortcut or Automator action to toggle hard drive sleep?
#1
Problem I'm trying to solve: when I have an external FW drive attached, it spins down per the Energy Saver prefs check box and I find it irritating and disruptive when the whole system freezes while the HD spins back up. (As we all know, OS X waits for the drive to spin up often even if the current operation doesn't actually need anything from the drive). So, sometimes I uncheck "spin down hard drive." Then I forget to put it back, and my drive spins all night and all morning.

So, looking for a quick way to toggle this from desktop or the dock. Any ideas?

I just tried to make an automator action, but it didn't work. I've never really used Automator so rather than trouble shoot w/o much knowledge, I thought I'd ask for suggestions.
Reply
#2
Here is one to keep drive spinning - you might look at it for ideas on what you are trying to do.

http://www.macupdate.com/info.php/id/311...e-spinning


Fred Also
Reply
#3
This AppleScript will toggle the setting on.

tell application 
System Preferences
activate
set current pane to pane
com.apple.preference.energysaver
end tell

tell application
System Events
tell application process
System Preferences
if value of checkbox
Put the hard disk(s) to sleep when possible
of tab group 1 of window
Energy Saver
= 0 then
click checkbox
Put the hard disk(s) to sleep when possible
of tab group 1 of window
Energy Saver
end if
end tell
end tell
quit application
System Preferences
Reply
#4
thermarest wrote:
Problem I'm trying to solve: when I have an external FW drive attached, it spins down per the Energy Saver prefs check box and I find it irritating and disruptive when the whole system freezes while the HD spins back up. (As we all know, OS X waits for the drive to spin up often even if the current operation doesn't actually need anything from the drive).

I think there's something else going on there. I can mount, unmount, and remount drives (at least internal ones) with no interruption to current operations.

Anyway, here are some links that I think will put you on the right path to creating a useful AppleScript, plus a couple of pre-built utilities that might be useful:

http://www.thexlab.com/faqs/sbbod.html

http://www.macosxhints.com/article.php?s...0905050737
http://discussions.apple.com/thread.jspa...ID=1872806

http://lightheadsw.com/caffeine/
http://ian.aramisdesign.com/software/ ( "Presentation Mode" )
http://www.digital-heaven.co.uk/disksomnia (unfortunately, for use with Final Cut Pro or Final Cut Express only)



(EDIT: sheesh, spent too much time with the googles...you guys beat me to it)
Reply
#5
Great...thanks both of you!

Regarding if there's something else going on: when my external is spun-down, anything that makes it spin up also brings on the rainbow wheel of doom and I can't do anything until the drive is back online. Is this not normal?
Reply
#6
> anything that makes it spin up also brings on the rainbow wheel...

The Finder or Disk Utility might briefly stall while a drive mounts on a slow Mac, but other apps should keep working.
Reply
#7
Doc wrote:
> anything that makes it spin up also brings on the rainbow wheel...

The Finder or Disk Utility might briefly stall while a drive mounts on a slow Mac, but other apps should keep working.

Hmmm. I'm on a MBP 2.4, 4 gigs ram. Any app stalls w/the beachball for 5 up to maybe 20+ seconds when the drive spins up. Maybe I should look into the cause. Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)