Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > script that disables deeps sleep if usb 2 are plugged in

script that disables deeps sleep if usb 2 are plugged in
Thread Tools
toffe
Forum Regular
Join Date: Apr 2005
Location: Helsinki
Status: Offline
Reply With Quote
Apr 3, 2006, 01:03 PM
 
Hi.

i've got a PowerMac g4 (AGP-graphics) that i have installed a usb 2.0 PCI card into.
However, if the computer goes to sleep with usb devices lugged into it, it will not wake up. But if they are disconnected, it works just fine.

I have now set the power management so that it will not go to sleep. But you can put it to sleep yourself, but then you have to make sure that no usb 2 device is attatched.

Would it be possible to make a script that checks if any devices are plugged into the usb 2 PCI card. and if you try to put it to sleep, or if the power management tries to put it to sleep, it would check for usb 2 devices, and if they are plugged in it would ask you to unplug them before it could go to sleep.

How would you do such a thing, and is it at all possible.. etc..

that's about it.
     
toffe  (op)
Forum Regular
Join Date: Apr 2005
Location: Helsinki
Status: Offline
Reply With Quote
Apr 7, 2006, 01:40 PM
 
Ok, i guess this topic did'nt seem too interresting.
Bu would it be then possible to create a script that will put the computer to sleep if it has not been used for a while (let's say 10 minutes), if no usb device is attatched, an no film or music is played.

so.
how to:
put computer to sleep
check if something is plugged in top a pci usb card
check if a film or song is played
reset timer when events occour.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:20 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,