Jump to content

Autosleep-Script


KWS
 Share

165 posts in this topic

Recommended Posts

Is sleep working by menu command ... I use pc efi 10.5, i replaced boot file with rc4 and sleep isn't working by menu command and so also not by RIP-script.

Funny is that i changed my dvd-drive some weeks ago and since that autosleep is perfectly working without my script. So i feel not too much motivated to change my working configuration for testing ... :)

 

I was using the patched RC4 boot file by blackosx which combined both Duvelv & Rekursor solution to OpenHaltRestart & PlatformUUID issues.

I replaced that with just Rekursor's boot file and everything is back to normal.

Both force and auto sleep are working again with RIP2 :P .

Pls note that efi 10.5 use PciRoot=1 as default whereas rc4 default to PciRoot=0

Try putting PciRoot=1 in com.apple.boot.plist for using rc4.

 

TQ & have a nice day.

Link to comment
Share on other sites

I was using the patched RC4 boot file by blackosx which combined both Duvelv & Rekursor solution to OpenHaltRestart & PlatformUUID issues.

I replaced that with just Rekursor's boot file and everything is back to normal.

Both force and auto sleep are working again with RIP2 :P .

Pls note that efi 10.5 use PciRoot=1 as default whereas rc4 default to PciRoot=0

Try putting PciRoot=1 in com.apple.boot.plist for using rc4.

 

TQ & have a nice day.

Thank you for the tip, will try it later :)

Link to comment
Share on other sites

This is a new version of PenntNeu-script, which now recognizes the setting "Never" for sleep-delay in energy-saver preferences. It works in 10.6 too. You must add It to Start Up Objects on your User Account ... ;)

 

Added try ... end try to the script to prevent an error while running time machine backups ...

 

To explain it in detail: this is no solution for any sleep-issue with the except of not working AUTOMATIC-Sleep. If your machine goes to sleep by menu-command and wake without problems, you can use it ...

 

Added three little changes to stop script while itunes, dvd-player or QuickTime is playing...

I love it, but it would be perfect if you could add transmission support. So it wont sleep while downloading and when copying files. :unsure:

Link to comment
Share on other sites

  • 2 weeks later...
I've just started having this problem after adding a DVD drive.. so do some drives cause this problem and others do not? (ie. should I swap the one I got with others in the house as a test ?)

I changed my LG-drive to a Optiarc AD-72435 and autosleep started working. Leo trys to power-down the DVD-drive (i think so, but i dont know really - somewhere in Insanelymac there's a thread about it, but i lost the url :(), with one drive it works and with another it fails, depending on the model. On my other machine a different LG-drive and autosleep are working together ...

Link to comment
Share on other sites

I changed my LG-drive to a Optiarc AD-72435 and autosleep started working. Leo trys to power-down the DVD-drive (i think so, but i dont know really - somewhere in Insanelymac there's a thread about it, but i lost the url :wacko: ), with one drive it works and with another it fails, depending on the model. On my other machine a different LG-drive and autosleep are working together ...

 

I just got a Samsung TS-H663B/UOAH... its nice and compact and quiet... wah....

 

Have folks seen any difference between SATA, PATA, etc on this?

Link to comment
Share on other sites

I put in a CD, and with my SAMSUNG TS-H663B/UOAH SATA, and changed my sleep times to 1 minute. After 1 minute, the display sleeps... maybe 5 minutes later I hear the HDD spin down. 3-4 minutes later, the whole machine finally sleeps.

 

So I need to keep a disc inserted?!? LOL, that seems counter-intuitive.

 

Out of curiosity I swapped in a lite-on DH-20A4H PATA drive... I inserted a disc and it also went to sleep, but when it woke up the LiteOn went nuts as if I''d just loaded a disc it could not read... and it would not give up trying, even after I removed the disc.

 

I have an external case, so I may just pull the DVD and put it in that, only powering on when needed (which is not all that often).

 

thanks for the info!

Link to comment
Share on other sites

For KWS:

DVD Burner May Be Cause of Insomnia

http://www.insanelymac.com/forum/index.php?showtopic=171929

 

--

 

Actually I just tested my own setup and it fails to auto-sleep even without a DVD drive. I'm using an Intel X25-M 160GB Gen2 SSD. Have yet to test the script method.

 

INTEL SSDSA2M160G2GC:

 

Capacity: 160.04 GB (160,041,885,696 bytes)

Model: INTEL SSDSA2M160G2GC

Revision: 2CV102HD

Serial Number: CVPO93060165160AGN

Native Command Queuing: Yes

Queue Depth: 32

Removable Media: No

Detachable Drive: No

BSD Name: disk0

Partition Map Type: GPT (GUID Partition Table)

S.M.A.R.T. status: Verified

Volumes:

Mac Pro:

Capacity: 159.7 GB (159,697,911,808 bytes)

Available: 153.39 GB (153,394,716,672 bytes)

Writable: Yes

File System: Journaled HFS+

BSD Name: disk0s2

Mount Point: /

Link to comment
Share on other sites

  • 2 weeks later...
...

Added a possibility to select "sleep-resistant" programs (should support torrent downloads or dvd-rips with non-scriptable applications).

...

thats very kind of you, especially that you don't have to worry about TSST Drive bug anymore

thanks KWS !

Regards

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

thank you for the great script, but I have a small problem with the RIP3. Is there a way to analyze it? The Problem: I edit the script (line 5) and "set Programme to {"TeamViewer", "jdownloader", "blabla"}". I start the RIP3 and normaly the system should not go to sleep if one of the programs is started. But since one week, it doesn't work anymore. After the idle time the system falls to sleep, no mater if e.g. TeamViewer ist started or not.

 

Any idea?

 

Best

 

Wikus

Link to comment
Share on other sites

If you write in terminal

ps -axww

you get a list of running processes, like in Activity Monitor.

I tested the script with TeamViewer Application (10.6.2) and it worked.

So to make it safe repeat the whole procedure, download and edit the script - maybe this will bypass the mistake.

Link to comment
Share on other sites

Hey KWS, do u know whether VLC/other video apps support AS (smt. like IfVideoIsPlaying= )

VLC's AppleScript support is really limited.

Move application icon over Applescript-Editor (drag'n'drop) and you will see.

It is possible to determine vlc state by checking used buttons, but this changes with program language, in my opinion to much effort ...

:whistle:

Link to comment
Share on other sites

Doesn't work for me. My machine goes to sleep by menu-command and wake without problems.

 

My DVD-RW is TSSTcorp CD/DVDW SH-S182M

I changed the basic script a little for some diagnostic messages. So when you download SleepTest and start it, you should see dialog boxes - one by one - with

1. Sleeptime (from System Preferences)

2. Idle time (time since last user input)

3. Time till sleep

For testing a short sleep time interval (maybe 2 min) is recommended. SleepTest must have focus to see dialog boxes.

And you must stop the script after testing manually :P

SleepTest.app.zipRIP3s.app.zip

Link to comment
Share on other sites

Hey I had a question about the script. Im not a programer at all. The script is working pretty good, goes to sleep on time like clockwork. One thing I've started noticing is that after it goes to sleep via the script, my computer once out of every 3 or 4 times shuts off after an extended period of time. I was wondering if something in the script may cause this or if its just my system acting up? Other than that I love the script, but my alarmclock not going off is killin me hahaha. Thanks for any insight or help in advance.

Link to comment
Share on other sites

Hey I had a question about the script. Im not a programer at all. The script is working pretty good, goes to sleep on time like clockwork. One thing I've started noticing is that after it goes to sleep via the script, my computer once out of every 3 or 4 times shuts off after an extended period of time. I was wondering if something in the script may cause this or if its just my system acting up? Other than that I love the script, but my alarmclock not going off is killin me hahaha. Thanks for any insight or help in advance.

You can open Applescript-Editor and paste

 

tell application "System Events" to sleep

 

and click Run.

After that command the script is not responsible for further actions (in my knowledge). In Windows the System will go after a defined time to deep sleep (if set so), but in OS X ... ?

Link to comment
Share on other sites

Hmmm odd indeed, has anyone else had this same problem? I've recently updated some kexts but nothing to do with sleep. I'll keep testin to see if I figure anything out.

 

EDIT:

So I switched from OSXResart.kext to evoreboot.kext and haven't had an issue since I'll update again if anything else develops.

Link to comment
Share on other sites

  • 2 months later...
 Share

×
×
  • Create New...