HD spin down and sleepy mac

how do you set a hard disk spin down time manually in OS X (Panther)?
Karl Zag4n wrote on :

Hi,

Question 1: how do you set a hard disk spin down time manually in OS X (Panther)?

In System preferences it is too limited for my taste. I think in Linux it has hdparms, but that doesn't seem to exist in os X. And the thing is it is a SCSI not IDE disk (which is connected via a SCSI card) which I want to control the spin down time on. Currently it spins down way too soon (about 10 minutes or so setting System Preferences>Energy Saver>Sleep>Put the hard disk(s) to sleep when possible

Question 2:

Why the hell does OS X go to sleep when the computer is doing something ? OS 9 didn't do that.

Example leave bittorent downloading something overnight. Or doing a long 3d render overnight.

Wake up and find the computer is asleep on the job.

I know you can turn off sleep in Energy Saver, but it seems a huge flaw that OS X is apparently testing user input as a measure of inactivity, not CPU/disc/network use.

thanks

Jeff Wiseman replied on :

Karl Zag4n wrote:

Question 2:

Why the hell does OS X go to sleep when the computer is doing something ? OS 9 didn't do that.

Example leave bittorent downloading something overnight. Or doing a long 3d render overnight.

Wake up and find the computer is asleep on the job.

I know you can turn off sleep in Energy Saver, but it seems a huge flaw that OS X is apparently testing user input as a measure of inactivity, not CPU/disc/network use.

Since in a Unix based system, there are ALWAYS many processes running and disk activity 24/7. You would have to somehow designate a difference between processes that you will allow to be interrupted for a sleep and those that you did not. OS 9 had nothing like this. As a result, the only way to define "no activity" in something like OS X is when the keyboard and mouse havn't been used for a while (i.e., no USER activity). The OS X system is always active from a straight process running viewpoint.

The sleep function IMHO might have only been implemented on these things to comply with energy saver standards. Most UNIX based systems are run 24/7 (e.g. Solaris workstations). The real issue is having your LCD monitor backlights shut down when someone is not there watching them so that they last longer. Keyboard and mouse activity is a good way to tell if someone is there looking at the screen. They just used the same very simple detection mechanism to initial sleep since anything else is going to be far more complex and would require all kinds of user provisioning (e.g. the user would have to specify the types of processes that could be interrupted for sleep and which ones could not). In many ways this would not be trivial and all for the ability to leave the sleep function on all the time. For the few activities that someone does where they would not want sleep activating and they ALSO are not sitting at the console using it, just turning off sleep temporarily is so easy, it's unlikely that Apple could justify putting so much development effort into such a minor feature.

All this only IMHO, of course!

Neill Massello replied on :

Karl Zag4n nowhere@redacted.invalid wrote:

Question 1: how do you set a hard disk spin down time manually in OS X (Panther)?

In System preferences it is too limited for my taste. I think in Linux it has hdparms, but that doesn't seem to exist in os X. And the thing is it is a SCSI not IDE disk (which is connected via a SCSI card) which I want to control the spin down time on. Currently it spins down way too soon (about 10 minutes or so setting System Preferences>Energy Saver>Sleep>Put the hard disk(s) to sleep when possible

The time (in minutes) until hard disk sleep is stored in the /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist file. You can modify it with the defaults command, Property List Editor (/Developer/Applications/Utilities/Property List Editor.app), a text editor, or with one of the third-party configuration utilities such as TinkerTool System http://www.bresink.com/osx/TinkerToolSys.html.

Question 2:

Why the hell does OS X go to sleep when the computer is doing something ? OS 9 didn't do that.

I'm no developer so I'm just guessing, but this might have something to do with differences in multi-tasking between OS 9 and OS X.

Example leave bittorent downloading something overnight. Or doing a long 3d render overnight.

Wake up and find the computer is asleep on the job.

I know you can turn off sleep in Energy Saver, but it seems a huge flaw that OS X is apparently testing user input as a measure of inactivity, not CPU/disc/network use.

It is annoying, but I don't know whether the blame lies with Apple or with third-party developers. Sleep in OS X can be prevented by some processes, although not usually by design. On most Macs, at least some background processes (backup schedulers, etc) will be third-party stuff that Apple hasn't written. If those processes don't reset the sleep timer or tell the OS not to sleep -- if that's possible -- the OS has to presume that it's all right to put the Mac to sleep. Otherwise, few Macs would ever go to sleep on the timer.

Ernie Klein replied on :

In article E35BD4JZ38476.6325578704@redacted.invalid, Karl Zag4n nowhere@redacted.invalid wrote:

Hi,

Question 1: how do you set a hard disk spin down time manually in OS X (Panther)?

You can adjust the spindown time from 1 minute to 1000 minutes by using the "SpindownHD" tool if you have the developer tools and CHUD tools installed.

Karl Zag4n replied on :

Hi,

Question 1: how do you set a hard disk spin down time manually in OS X (Panther)?

In System preferences it is too limited for my taste. I think in Linux it has hdparms, but that doesn't seem to exist in os X. And the thing is it is a SCSI not IDE disk (which is connected via a SCSI card) which I want to control the spin down time on. Currently it spins down way too soon (about 10 minutes or so setting System Preferences>Energy Saver>Sleep>Put the hard disk(s) to sleep when possible

Question 2:

Why the hell does OS X go to sleep when the computer is doing something ? OS 9 didn't do that.

Example leave bittorent downloading something overnight. Or doing a long 3d render overnight.

Wake up and find the computer is asleep on the job.

I know you can turn off sleep in Energy Saver, but it seems a huge flaw that OS X is apparently testing user input as a measure of inactivity, not CPU/disc/network use.

thanks

Karl Zag4n replied on :

In article Iwaee.5782$HL2.2417@redacted.invalid, Jeff Wiseman abuse@redacted.invalid wrote:

thanks for the comments, but this I don't agree with:

it's unlikely that Apple could justify putting so much development effort into such a minor feature.

if (time>=sleeptime){ if (cpuload >idle) { // dontsleep } else { sleep(); } }

It would be trivial to develop and lot less ugly than having to manually disable sleep everytime you needed to.

Tom Stiller replied on :

In article eckleinspammenot-FF149C.15385204052005@redacted.invalid, Ernie Klein eckleinspammenot@redacted.invalid wrote:

In article E35BD4JZ38476.6325578704@redacted.invalid, Karl Zag4n nowhere@redacted.invalid wrote:

Hi,

Question 1: how do you set a hard disk spin down time manually in OS X (Panther)?

You can adjust the spindown time from 1 minute to 1000 minutes by using the "SpindownHD" tool if you have the developer tools and CHUD tools installed.

Or with 'pmset'.

Mark Haase replied on :

In article ZTJTVFBU38476.7585648148@redacted.invalid, Karl Zag4n nowhere@redacted.invalid wrote:

It would be trivial to develop and lot less ugly than having to manually disable sleep everytime you needed to.

Hey Karl,

There are APIs for an application to prevent sleep, I just think most applications that should use them don't. Maybe you could write a shell script to toggle sleep on and off and drop it in the dock..

Jochem Huhmann replied on :

Karl Zag4n nowhere@redacted.invalid writes:

Hi,

Question 1: how do you set a hard disk spin down time manually in OS X (Panther)?

psmset spindown nn (where nn is the time in minutes). Read the pmset man-page for details.

Why the hell does OS X go to sleep when the computer is doing something ?

Because it is always doing something and there is no way to tell from within some code (and be it very clever code) if this is something that is important to you or not. The only clear thing to watch out for is user activity.

I know you can turn off sleep in Energy Saver, but it seems a huge flaw that OS X is apparently testing user input as a measure of inactivity, not CPU/disc/network use.

There's always some CPU/disc/network use. And there is no clean way to tell if this is caused by something that is important enough to the very user at that very point of time that it should not cause the machine to go to sleep. I think Apple did the right thing. If they had tried to be too clever with this you might have ended up with a more or less unreliable behaviour in this regard.

    Jochem