methamp
Jul 24 2008, 03:32 PM
A lot of us on laptops using Intel’s onboard GMAX3100 are having to do something called the “sleep trick” to get our screens to display Mac OS X after you boot or reboot. The most common way to perform this trick is to set a hot corner (Expose) to “Sleep Display” and blindly move your mouse over to the spot, hoping it wakes the screen up and displays your new Mac. For most of us, this trick works well. For the power user (or those without Sleep), we’re constantly booting up and shutting down to save battery life.
The biggest issue is since Expose uses your user settings, you have to leave Automatic Login on for your user account to get access to that hot spot. This leaves our Hackbooks at risk for theives to just boot right up, and if they figure out how the !@#$% to turn on the screen, they’ve got access to all your data. Not anymore! By following my instructions below, you can have a more natural experience by forcing the display to sleep automatically during boot, BEFORE you reach the Login screen!
....Download The Sleep Hack Below!
Drag SleepDisplay.app to your home directory. In Finder, this is the “place” that is shown with your username.
Open Terminal and type sudo su - then open /etc/rc.common with your favorite text editor (as root), and at the top, add the following:
# Sleep display on boot
/Users/richard/SleepDisplay.app/Contents/MacOS/sleepdisplay
Replace “richard” with your username, or the full path to the location of SleepDisplay.app plus the trailing path you see above. Save the file and type head -n 5 /etc/rc.common to make sure it’s in there. Good? OK. Now go to System Preferences, Accounts, Login Options and disable automatic login. Keep Expose set to the hot corner as a fail over in case an update wipes your rc.common changes. Now reboot. Need I say more? If you’re ever stuck with a blank screen, just touch your mouse and boom — it’s up. No hot corner bullshit. If for any reason this doesn’t work, the hot corner is still there so just pretend you’re looking at the Login screen, type your password and hit Enter, then move your mouse to the Expose corner.
Easy, huh?
macgirl
Jul 25 2008, 05:02 AM
you can still use /etc/rc.local on Leopard, documentation says is deprecated but it works, so when any update replaces rc.common you preserve your script.
psychonautuk
Jul 25 2008, 12:50 PM
You wouldnt happen to have a copy of the format of that rc.local file would you? Leopard doesnt have it
MacUser2525
Jul 25 2008, 01:21 PM
QUOTE(psychonautuk @ Jul 25 2008, 09:50 AM)

You wouldnt happen to have a copy of the format of that rc.local file would you? Leopard doesnt have it
It is just a text file so open an editor put the lines above in it then save the file. Once done you most likely will want to check the ownership and permissions of the file with
ls -l /etc/rc.local if not owned by root and admin then
chown 0:0 /etc/rc.local and if not set executable then
chmod 755 /etc/rc.local now reboot and hope it works.
methamp
Jul 25 2008, 08:40 PM
QUOTE(macgirl @ Jul 25 2008, 01:02 AM)

you can still use /etc/rc.local on Leopard, documentation says is deprecated but it works, so when any update replaces rc.common you preserve your script.
It works as expected, just create and go? Thanks! I wasn't aware of that. This definitely saves everyone some head scratching after an update. I thought about testing rc.local support before I wrote this up but backed out due to an overload of work (Couldn't reboot again).
Thanks a lot.
jmvBMW
Jul 31 2008, 07:52 PM
I lost me in "Open Terminal and type sudo su -
then open /etc/rc.common with your favorite text editor (as root), and at the top, add the following"
MacUser2525
Jul 31 2008, 09:54 PM
QUOTE(jmvBMW @ Jul 31 2008, 04:52 PM)

I lost me in "Open Terminal and type sudo su -
then open /etc/rc.common with your favorite text editor (as root), and at the top, add the following"

Go into the Applications folder using Finder then to the Utilities folder contained within it scroll down until you see Terminal double click to open once opened.
CODE
sudo su -
nano /etc/rc.common
Hitting the enter key after each of the commands above when doing the first it will ask you for the password you set upon configuration of the install you would type that in and hit enter key again. The nano command opens the file in one of the easier to use editors to write the file after editing use CTRL + O (the + means both keys at the same time) then hit the enter key when you see the file to save too come up at the bottom of the window CTRL + X exits the file editing.
jmvBMW
Aug 1 2008, 01:37 AM
Didn't work for me...

Black screen on reboot and nothing happens, inclusive, the sleep trick don't work.
In order to recovery the system, I press the power button then s and enter, the laptop go to sleep. After this, wake up to the log in screen.
jmvBMW
Aug 1 2008, 08:33 PM
EDIT: works!!
But only in the rc.common.
My first tried was with the rc.local method, it don't work...
Thanks!!
psychonautuk
Aug 2 2008, 11:54 AM
QUOTE(MacUser2525 @ Jul 25 2008, 02:21 PM)

It is just a text file so open an editor put the lines above in it then save the file. Once done you most likely will want to check the ownership and permissions of the file with ls -l /etc/rc.local if not owned by root and admin then chown 0:0 /etc/rc.local and if not set executable then chmod 755 /etc/rc.local now reboot and hope it works.
Awesome, thanks..
QUOTE(jmvBMW @ Aug 1 2008, 09:33 PM)

EDIT: works!!
But only in the rc.common.
My first tried was with the rc.local method, it don't work...
Thanks!!
Thanks for trying before I did, great, thanks
cu3edweb
Aug 18 2008, 07:11 PM
For some reason this does nothing for me. I still have to use a screen corner? I tried rc.local and rc.common? What might I be doing wrong.
Thanks
completing
Aug 19 2008, 08:47 AM
Here's a very simple way to use this trick.
Just put the app on Login Items in Account, System Preferences menu
You have to select auto-login. Otherwise you have type your password on blank screen.
I tried the method above, but it didn't work. Putting it in StartupItems didn't work either.
Anyway, try this method if you just want it quick and simple.
cu3edweb
Aug 19 2008, 12:21 PM
QUOTE(completing @ Aug 19 2008, 01:47 AM)

Here's a very simple way to use this trick.
Just put the app on Login Items in Account, System Preferences menu
You have to select auto-login. Otherwise you have type your password on blank screen.
I tried the method above, but it didn't work. Putting it in StartupItems didn't work either.
Anyway, try this method if you just want it quick and simple.
Thanks I actually got it working. I am an idiot I forgot to click it to start before I reboot so it was asking if I wanted to open it since it was downloaded from the internet.
gunwolf
Aug 22 2008, 05:02 AM
Well, it puts it to sleep for me that's for sure.
I can't get anything but a black screen now!
I still have a 'hot corner' but is doesn't seem to respond now.
The gray screen with the apple comes up with the spinning curser for a short time, I get a light blue screen for about a second then black (just like it always has) but now I can't do anything after that.
Any suggestions?
Wayne
DELL 1525 Inspiron Notebook, !ATKOS V2 10.5.4 Intel Core2 Duo 2Ghz, 4GB memory
methamp
Sep 4 2008, 06:01 PM
I've had rather strange happenings when sleeping, waking up, and having it all done while I'm logged in. Things like disappearing icons, unclickable items, and desktop chaos seems to randomly happen. The fix? Sleep/wake *BEFORE* you log in. Thus the reason for this alternative sleep trick. Fixed my problems right away and I can keep my HackBook more secure by not allowing everyone with access to my power button to view my files.
norex
Sep 20 2008, 12:21 PM
FOR PEOPLE WHO CAN'T RUN GAMES BECAUSE OF SCREEN SLEEP PROBLEM
This is a solution that I coded for people who when they run games can't see them because the screen goes blank (screen turns off , monitor goes black , etc) aka they have a x3100 graphics chipset like what I have on my Dell Inspiron 1525.
The application is called GameSleepX, when you run it you have 20 seconds to start your game, then when the game starts you simply press the space bar on you keyboard wallah you screen is back up and ready to play those games. I created this because of a void that existed for our problem so please show you support buy emailing Cerieti@gmail.com to let me know if this has worked for you!
If your an avid game player you might want to add this app to your dock for quick access, now without further ado here is the link to the app ENJOY!
If the added file doesn't work you can download this app at my website address, just be sure to right click and save as!
www.cerieti.com/GameSleepX.app
achtung
Nov 5 2008, 11:58 AM
Hi there,
the rc.common solution didn't work for me so I investigated a little research into the "new" launchd setup since 10.4 which replaces rc and SystemStartup.
Since now I also always used the StartupItem method but always has the problem that "lock screen" for example won't ask you for login credentials.
So I wrote a LaunchAgent script which gets loaded after LoginWindow but before a specific user login. I works flawless and is future proof because its not relying on the deprecated rc or SystemStarter and the script is placed in /Library/LaunchAgents which means even updates don't touch these scripts.
1. Open console/terminal: Terminal.app
2. Become root: su -
3. vim /Library/LaunchAgents/name.of.your.choice.plist
4. insert:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>de.testit.launchd.sleepDisplay</string>
<key>ProgramArguments</key>
<array>
<string>/Users/chris/SleepDisplay.app/Contents/MacOS/sleepdisplay</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>LimitLoadToSessionType</key>
<string>LoginWindow</string>
</dict>
</plist>
5. replace the the path/executable with your specific location
6. restart to see if it works and remember to have a backup strategie (hot corners/spotlight/startupitem) as mentioned above
7. to see if the agente was loaded you can use launchctl load /Library/LaunchAgents/name.of.your.choice.plist and it should say something like "already loaded"
Bye.
nawcom
Nov 8 2008, 06:56 AM
This was taken care of ages ago.
http://nawcom.com/osx86/files/Video/Intel/...staller.pkg.zipSleep_Login takes care of the prelogin stuff that you need as your system starts up, especially since for security reasons you are given access to display settings after LoginWindow launches but it cannot be after Aqua launches. This is system-wide so you don't need an annoying app running every time you log into your computer for each user. Not sure why the thread creator went that route.
ResDaemon takes care of keeping the screen up and keeping your Finder icons together in place. The most common cause of it is resolution changes in games and such.
Originally made for Dells with GMA950s long ago - I guess no one here saw the info about it.
Sources:
http://nawcom.com/osx86/Projects/ResDaemon/http://nawcom.com/osx86/Projects/Sleep_Login/If you wish to use code please follow the APSL and GPLv2 appropriately.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.