Page 1 of 1

Allow OS X to sleep?

Posted: Sat Jul 27, 2013 7:12 am
by Forquare
Good morning all,

I have a mid-2011 iMac running Mountain Lion, it is set to sleep after three hours of inactivity. Yesterday I installed FAH and it didn't go to sleep last night. While I know FAH is a really good cause, I'm not sure I can afford to have the computer running like this 24/7 (before it was rarely powered off, just in sleep/standby).

Is there a way to make FAH allow the iMac to sleep? I've had a look through the configuration options but can't immediately see anything, and it seems that my GoogleFu is failing me :(

Many thanks,
Ben

Re: Allow OS X to sleep?

Posted: Sat Jul 27, 2013 2:11 pm
by Joe_H
Could you post your log file showing the beginning section which shows the version information, system configuration and the folding setup. One of the settings may have been inadvertently changed from a default which would allow sleep.

I do know the client will let the OS sleep a Mac, my son's Mac Pro is normally set to never sleep. But after applying a recent system update about 2 weeks ago we noticed the points production had gone down. Checking the logs I saw the evidence that the Pro had been sleeping during periods he was not using it. He checked and found the setting was changed to sleep after a short period of inactivity.

Re: Allow OS X to sleep?

Posted: Sat Jul 27, 2013 4:04 pm
by Forquare
Hi Joe_H,

Log here:

Code: Select all

*********************** Log Started 2013-07-26T20:24:13Z ***********************
20:24:13:************************* Folding@home Client *************************
20:24:13:    Website: http://folding.stanford.edu/
20:24:13:  Copyright: (c) 2009-2013 Stanford University
20:24:13:     Author: Joseph Coffland <joseph@cauldrondevelopment.com>
20:24:13:       Args: 
20:24:13:     Config: <none>
20:24:13:******************************** Build ********************************
20:24:13:    Version: 7.3.6
20:24:13:       Date: Feb 18 2013
20:24:13:       Time: 15:24:11
20:24:13:    SVN Rev: 3923
20:24:13:     Branch: fah/trunk/client
20:24:13:   Compiler: GNU 4.2.1 (Apple Inc. build 5666) (dot 3)
20:24:13:    Options: -std=gnu++98 -O3 -funroll-loops -mfpmath=sse -ffast-math
20:24:13:             -fno-unsafe-math-optimizations -msse3 -arch x86_64
20:24:13:             -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
20:24:13:   Platform: darwin 10.8.0
20:24:13:       Bits: 64
20:24:13:       Mode: Release
20:24:13:******************************* System ********************************
20:24:13:        CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
20:24:13:     CPU ID: GenuineIntel Family 6 Model 42 Stepping 7
20:24:13:       CPUs: 8
20:24:13:     Memory: 16.00GiB
20:24:13:Free Memory: 5.86GiB
20:24:13:    Threads: POSIX_THREADS
20:24:13:Has Battery: false
20:24:13: On Battery: false
20:24:13: UTC offset: 1
20:24:13:        PID: 11999
20:24:13:        CWD: /Library/Application Support/FAHClient
20:24:13:         OS: Darwin 12.4.0 x86_64
20:24:13:    OS Arch: AMD64
20:24:13:       GPUs: 1
20:24:13:      GPU 0: ATI:4 Whistler XT [AMD Radeon HD 6970M]
20:24:13:       CUDA: Not detected
20:24:13:***********************************************************************
Many thanks for your reply,
Ben

Re: Allow OS X to sleep?

Posted: Sat Jul 27, 2013 7:12 pm
by Joe_H
Could you also post the F@H client configuration portion of the log? It will start with <config> and end with </config>. Since you just installed the client, there may be several places in the log that show this as you configured folding on your iMac. The most recent occurrence in the log will show the the current settings.

Re: Allow OS X to sleep?

Posted: Sat Jul 27, 2013 7:24 pm
by Forquare
There are a couple of config sections:

Code: Select all

20:24:13:<config>
20:24:13:  <!-- Folding Slots -->
20:24:13:</config>

Code: Select all

06:50:00:Saving configuration to config.xml
06:50:00:<config>
06:50:00:  <!-- Network -->
06:50:00:  <proxy v=':8080'/>
06:50:00:
06:50:00:  <!-- User Information -->
06:50:00:  <passkey v='********************************'/>
06:50:00:  <team v='35947'/>
06:50:00:  <user v='Forquare'/>
06:50:00:
06:50:00:  <!-- Folding Slots -->
06:50:00:  <slot id='0' type='CPU'/>
06:50:00:</config>
The entire logs are here

Re: Allow OS X to sleep?

Posted: Sat Jul 27, 2013 10:19 pm
by calxalot
In FAHControl, you can add client option disable-sleep-when-active false.
Select client > Configure > Expert tab > Extra client options Add > name: disable-sleep-when-active, value: false > OK > Save.

If your computer spends a lot of time sleeping, you won't make deadlines for the Work Units.

Another possibility is to just set the slot to Finish.
Select client > Right click slot > select Finish.
When the WU is done, the computer will be allowed to sleep.
When you want to start a new WU, you can right click the slot and select Fold.
Some WUs can take more than a day to fold, so this might not be attractive to you.
But you would get full bonus points for the WUs you do.

You can always force your Mac to sleep from the Apple menu.

Re: Allow OS X to sleep?

Posted: Sun Jul 28, 2013 2:58 am
by billford
Forquare wrote: I have a mid-2011 iMac running Mountain Lion, it is set to sleep after three hours of inactivity. Yesterday I installed FAH and it didn't go to sleep last night. While I know FAH is a really good cause, I'm not sure I can afford to have the computer running like this 24/7 (before it was rarely powered off, just in sleep/standby).

Is there a way to make FAH allow the iMac to sleep? I've had a look through the configuration options but can't immediately see anything, and it seems that my GoogleFu is failing me :(
A possible alternative is to do as I do on my Macs- in sysprefs >= Energy Saver => Power tab, "Computer sleep" is set to Never, "Display sleep" is set to 30 minutes.

It saves a useful anoint of power but doesn't hit your points production!

Re: Allow OS X to sleep?

Posted: Sun Jul 28, 2013 3:41 pm
by Joe_H
I rechecked my systems running OS X to see if they would automatically go to sleep with the default installation. My son's Mac Pro does as mentioned earlier, but my MacBook does not. The difference appears to be that the Mac Pro is still running the 7.2.9 version of the client, this MacBook is at the latest version like your iMac - 7.3.6. It normally does not effect my machines as they are set to fold all of the time normally.

I missed that change, it probably is documented in one of the release notes for the interim versions or the development bug and enhancement tracker. The change in the default was probably made due to the increasing use of GPU folding. A number of persons reported that folding on a GPU WU would fail after coming out of sleep, CPU processing would resume usually without issue. As GPU folding is not yet available with OS X you should be okay to disable this change as suggested by calxalot. The other suggestions provided in this thread will also work.

One thing that may effect the sleep period you set is something I noticed from my son's log file. His Mac Pro would wake up every 2-3 hours during the night to process some system or other process and then go back to sleep. I have not looked into it further to identify the exact source, but suspect it most likely from the system doing some of the background maintenance.