The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > MacCar

Reply
 
Thread Tools Display Modes
Old 05-05-2005, 06:59 PM   #1
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
Shutting Down Mac Mini vs. Sleep

I've started a new thread on this.

The issue: The Mac Mini does not shut down like a PC when the power button is pressed. That means that when the P1900 sends the power button pressed signal to the Mini, it does one of two things:

1. Nothing.
2. Sleeps (if set properly in the Energy control panel)

Holding the power button for 6 seconds will force shutdown, but is not recommended as a long term solution.

The mission: Figure out how to alter this behavior either through a change in the Open Firmware power managment software (specifically, the pmset command), OR through a small app that receives the power button command and orders a shutdown of the machine.
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Sponsored Links
Old 05-05-2005, 07:01 PM   #2
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
I checked into doing this via Applescript. Here's a response I got:

"Unfortunately, I don't think you can do this from AppleScript. However, there's still hope.
The Carbon framework enables you to implement a callback to catch and even halt sleep - which would then let you perform your shut down.
The Cocoa frameworks (AppKit's NSWorkspace class in particular) has a notification, NSWorkspaceWillSleepNotification, that can cause sleep to be suspended for up to 30 seconds. You may be able to begin a shut down during those 30 seconds."

I will look into the framework and see what else I can find out. If a small app can be written to do this, we only need run it on startup.

[Edit] Found this: "NSWorkspace now provides sleep notifications. NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification will be sent before the machine sleeps and after the machine wakes, respectively. An observer of NSWorkspaceWillSleepNotification can delay sleep for up to 30 seconds within the handling of the notification."

from here: http://developer.apple.com/releaseno...lderNotes.html

[Double Edit] Crap! I misspelled Mini in the thread title and it shows as "Mine". Changing it didn't fix it. Kandyman, can you fix it?
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video

Last edited by Bugbyte : 05-05-2005 at 09:29 PM.
Bugbyte is offline   Reply With Quote
Old 05-05-2005, 09:39 PM   #3
Low Bitrate
 
FireAnt's Avatar
 
Join Date: May 2004
Location: Houston, Texas
Vehicle: 2005 MINI Cooper Cabrio
Posts: 104
My Photos: (0)
Great to see your working on this! I would really like to be able to do a proper shut down via the signal from the p1900 power supply. I wish I could program, it's tuff being blessed with beauty and no brains. lol

Mike F.
__________________
05 MINI Cooper Cabrio "Mac MINI"
progress 95%- Mac Mini, Lilliput 7" , usb-wifi, Rayming GPS, Route 66,easy cat touch pad, CCAR front end"skinned",P1900 power supply
FireAnt is offline   Reply With Quote
Old 05-06-2005, 02:46 PM   #4
Low Bitrate
 
Join Date: Feb 2005
Posts: 109
My Photos: (0)
Well, I'm still waiting on my main techie guy here at work to get back to me on the problem, but in the meantime one of the other guys here gave me a pretty decent solution.

Here it is:
Use the P1900 in its normal sleep mode operation. This will keep the mini in sleep mode drawing a little bit of current when the car is off. Instead of running it like this all the time, set the computer to turn off at a specific time every night. For example set the cpu to turn off at 12:00 midnight or whenever you usually put the car away for the night. A specific shutdown time can be adjusted in the system preferences/energy saver. This would at least conserve some battery power. Your mini would shutdown at midnight and the next morning startup whenever you hit the ignition. This is about 6-8 less hours of sleep operation per day. It's also useful incase you forget to turn your cpu off and go on vacation. It would automatically shutdown at midnight.

I might run it this way for the time being before someone figures a permanent solution out.

Last edited by maxipad96 : 05-06-2005 at 02:49 PM.
maxipad96 is offline   Reply With Quote
Old 05-06-2005, 03:06 PM   #5
Variable Bitrate
 
noodles's Avatar
 
Join Date: Sep 2003
Location: Mississippi
Vehicle: 2002 Acura RSX Type S
Posts: 343
My Photos: (0)
Is leaving it in sleep mode even a threat? I drive my car daily. The longest I'd go without driving is maybe 2-3 days. On vacation or business trips, I'd definately shut down though.
noodles is offline   Reply With Quote
Old 05-06-2005, 03:22 PM   #6
Low Bitrate
 
Join Date: Feb 2005
Posts: 109
My Photos: (0)
I personally do not want to leave my mini in sleep mode. I am running subs/amps/upgraded head unit and do not want to run a second battery or risk my battery running down. The last thing I want to be is stranded. My car is new and battery is strong now, but I want to do as much as possible to keep it that way.

6-8 hours of not running the mini is 122 less days of mini sleep mode drain per year on your battery. That is a lot.

I understand the battery recharges, but I would rather not have it drain and recharge over and over again.

Last edited by maxipad96 : 05-06-2005 at 03:24 PM.
maxipad96 is offline   Reply With Quote
Old 05-06-2005, 05:09 PM   #7
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
Okay, so isn't the "battery running down" issue a non-issue if you are using a P1900? I thought it had low voltage protection and would shut the computer off if the power drops below 12 volts. Even when asleep.
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Old 05-06-2005, 05:19 PM   #8
my nizzle
 
shizzle's Avatar
 
Join Date: Mar 2005
Location: Sarasota, FL
Vehicle: 98' Honda Accord V6
Posts: 817
My Photos: (0)
I am also "concerned," and would like to have a power down solution. I do not see sleeping the mini as a major battery threat, however, and I keep a high amp charger in the trunk in case I do something stupid anyway.
__________________
Carputer status: [-*---------]
Im thinking laptop...
shizzle is offline   Reply With Quote
Old 05-08-2005, 02:25 PM   #9
Variable Bitrate
 
noodles's Avatar
 
Join Date: Sep 2003
Location: Mississippi
Vehicle: 2002 Acura RSX Type S
Posts: 343
My Photos: (0)
The only reason I want sleep mode is for the instant-on capability. Imagine hopping into your car and having it greet you in some fashion... KITT style! I love Macs, but the startup time is hellacious.
noodles is offline   Reply With Quote
Old 05-09-2005, 09:35 PM   #10
Newbie
 
Join Date: Apr 2005
Posts: 19
My Photos: (0)
Quote: Originally Posted by Bugbyte
I checked into doing this via Applescript. Here's a response I got:

"Unfortunately, I don't think you can do this from AppleScript. However, there's still hope.
The Carbon framework enables you to implement a callback to catch and even halt sleep - which would then let you perform your shut down.
The Cocoa frameworks (AppKit's NSWorkspace class in particular) has a notification, NSWorkspaceWillSleepNotification, that can cause sleep to be suspended for up to 30 seconds. You may be able to begin a shut down during those 30 seconds."

I will look into the framework and see what else I can find out. If a small app can be written to do this, we only need run it on startup.

[Edit] Found this: "NSWorkspace now provides sleep notifications. NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification will be sent before the machine sleeps and after the machine wakes, respectively. An observer of NSWorkspaceWillSleepNotification can delay sleep for up to 30 seconds within the handling of the notification."

from here: http://developer.apple.com/releaseno...lderNotes.html

[Double Edit] Crap! I misspelled Mini in the thread title and it shows as "Mine". Changing it didn't fix it. Kandyman, can you fix it?

I tried playing with the NSWorkspaceWillSleepNotification and what would happen was the machine would sleep before the notification was triggered. Then after I brought it out of sleep the code would be executed. After digging around on lists.apple.com I found out that there is 2 types of sleep. One is idle sleep and this can be interrupted programatically and the other is a forced sleep (power button or menu initiated) which can not be interrrupted. Here is some info http://lists.apple.com/archives/darw.../msg00041.html

Last edited by rgreen103 : 05-11-2005 at 06:23 AM.
rgreen103 is offline   Reply With Quote
Sponsored Links
Old 05-09-2005, 11:40 PM   #11
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
Rats. That sounds like a dead end.

The only possibility left seems to be reprogramming the Open Firmware. I don't have a clue about that.
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Old 05-10-2005, 10:57 AM   #12
FLAC
 
sdashiki's Avatar
 
Join Date: Aug 2004
Location: Floreeda
Vehicle: 2003/Toyota/Matrix
Posts: 998
My Photos: (0)
Um why are you doing this?

You say you dont want to drain your battery so sleep mode is out of the question...
And a 2nd battery is out of the question?
So now I have a question... are you out of your mind?

You dont want to be stranded in the middle of nowhere because your mac mini drained your battery. But you dont want a 2nd battery to counteract that problem...instead you want to hack your mac to do something that is totally ludicrous when it comes down to sheer time, work and effort. Buy a 2nd battery OR dont worry about leaving the Mini in sleep, gimme a break dood, if you leave your car for a week, yeah shut it down, but otherwise, sleep wont drain.
__________________
(----) 0.0%
No more loot for the carpute.
Trying to fit my 20" iMac into the dash... RF 600.5 amp, two 10" JLW0, 8 Infinity Components
sdashiki is offline   Reply With Quote
Old 05-10-2005, 08:16 PM   #13
my nizzle
 
shizzle's Avatar
 
Join Date: Mar 2005
Location: Sarasota, FL
Vehicle: 98' Honda Accord V6
Posts: 817
My Photos: (0)
Quote: Originally Posted by sdashiki
Um why are you doing this?

You say you dont want to drain your battery so sleep mode is out of the question...
And a 2nd battery is out of the question?
So now I have a question... are you out of your mind?

You dont want to be stranded in the middle of nowhere because your mac mini drained your battery. But you dont want a 2nd battery to counteract that problem...instead you want to hack your mac to do something that is totally ludicrous when it comes down to sheer time, work and effort. Buy a 2nd battery OR dont worry about leaving the Mini in sleep, gimme a break dood, if you leave your car for a week, yeah shut it down, but otherwise, sleep wont drain.

Dood, you are missing a lot of relevant facts here. For one, the p1900 will shut down if the battery goes to or below 12V. I personally dont worry about my battery too much as it is new and I have a charger in the trunk that works excellent.
Second, this is not the issue. The issue is whether there can be true MAC startup/shutdown control. Ok, we can sleep the mac if we want to, and that is fine. It is not out of the question. Some folks, however, are not all about sleeping their carputers, thats their preference and thery are working it out. If you don't wanna help, that is fine. Take a break.
__________________
Carputer status: [-*---------]
Im thinking laptop...
shizzle is offline   Reply With Quote
Old 05-10-2005, 09:34 PM   #14
Low Bitrate
 
Join Date: Feb 2005
Posts: 109
My Photos: (0)
wurd... I love it how people take things like its a personal knock against them. I just wanna have a shutdown controller that actually shuts my computer down. Is that such a bad thing. The p1900 IS my power supply. I'm installing it this weekend. I cannot wait, its gonna be great. I personally also want my computer to shut down/start up all the way. Thats my personal preference. I hope it happens. thanks "dood".
maxipad96 is offline   Reply With Quote
Old 05-11-2005, 10:13 AM   #15
FLAC
 
sdashiki's Avatar
 
Join Date: Aug 2004
Location: Floreeda
Vehicle: 2003/Toyota/Matrix
Posts: 998
My Photos: (0)
Nothing personal, sheesh. But why would you need a shutdown/startup controller...

macs like many comps are made to run 24/7. If you didnt know that, you dont use OSX enough. at about 3am (or some strange time) OSX deletes its temp/cache files keeping the computer running smoothly. Shutting it down, you skip this step and after time can lead to slowdown....

If someone wants to shutdown instead of sleep I ask why? Its not hibernate like the PCs...
__________________
(----) 0.0%
No more loot for the carpute.
Trying to fit my 20" iMac into the dash... RF 600.5 amp, two 10" JLW0, 8 Infinity Components
sdashiki is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone figure out sleep? DMB-RSX MacCar 12 01-18-2005 05:57 PM
PC Not Shutting down LanoX General Hardware Discussion 9 09-16-2004 12:40 AM
Opus shutting down when car is off Weatherboy Power Supplies 1 09-03-2004 06:21 PM
ebay touchscreen 12.89" w/ controller (not mine) Question Classified Archive 0 05-31-2003 08:46 PM
Carputer shutting down by it self... cyrofilho General Hardware Discussion 5 09-16-2002 04:26 PM


All times are GMT -5. The time now is 05:51 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics