Restoring Normality to OS X – Right-Click, Expose, Sleep, and Passwords

My MacBook Pro wouldn’t sleep, draining my battery each night. It wouldn’t ask for a password after a screen saver. Here’s why, how I fixed it, and what caused it to happen in the first place.

Ok, let’s start off by stating out right this was my own darn fault…

I’m using a MacBook Pro (Intel) running OS X 10.4.8, and my personal habit is to charge the system way up to full, then use the battery until it’s virtually drained, and repeat. Somehow I’m hoping that this will get me longer battery life, but that’s another story.

OS X is really smart in that while you’re working it pops up a dialog box telling you that you’ve got ten minutes of battery life left, and that you should go get your adapter and plug in the laptop. It’s so smart, in fact, that if you do that, it will close the dialog without you even have to click. Very clever.

But Apple is also treats you with a little respect. If you dismiss the dialog box, it’s not going to remind you any further. You know about the condition of the battery, as you just acknowledged it. To perpetually remind you would not just be insulting, but get in the way of what you were doing. I can’t count the number of times I’ve acknowledged the state, finished an email leisurely, and then gotten my adapter. I like that. I like not being nagged.

With that kind of interface comes responsibility, and I neglected mine. I allowed myself to get distracted by other things and it took me a moment to realize what had happened when the screen went dark and wouldn’t come back with a flick of the touch pad. I had accidentally allowed my battery to completely drain.

Turns out you don’t want to do this. It’s not going to damage your computer, but at the same time it isn’t going to leave things in a very valid state.

First, let’s give some credit to Apple — the moments after I plugged in my power adapter, the disk whirled up, and within a few seconds my screen came back to life, I lost no data, and my internet connections were still functioning. In the laptop’s last dying breath, it had preserved its state to disk, recovering when it had power.

The immediate concern is a disk repair; although the file system is journaled and your data won’t get corrupted, if it was in the middle of doing something where it hadn’t gotten that data to disk yet, that data is lost. This can result in minor file system problems which are easily corrected by booting your original OS X install disc and using the Disk Utility (rather than the install program) to repair the volume structurally, and then repair permissions.

But things doesn’t necessarily stop there. It is possible that your system, because of lack of power, lose some important system settings. The best analogy I can make for PC users is when your CMOS battery dies and your system “forgets” all the settings for the time and drives. While this doesn’t happen on the MacBook Pro, the following things did happen — and here’s how I corrected them.

1. The “Place two fingers on trackpad and click button for secondary click” stopped functioning. Solving this was merely a matter of going to the Keyboard & Mouse preference screen and toggling it off and back on.

2. The function keys, F9 – F12, stopped invoking Expose. Solving this was merely a matter of going to the Dashboard & Expose preference screen and setting the keyboard shortcuts back, they became unassigned.

3. The laptop stopped going into sleep mode when I closed the lid; apparently the power management subsystem had gotten confused. If something like Firefox was running GMail, this was enough to keep the system running (even though the back light went out). I’d awake in the morning to find my battery drained, leading to more problems of this nature. The laptop’s “sleep” led wasn’t “breathing” and pulsating as it does when hibernating. The solution was to reset the power management: Shutdown, Remove Battery, Hold Power Button for 5 Seconds, Insert Battery, and Boot.

4. When the laptop was woken up or coming out of a screen saver, it was not prompting for a password, as I had configured it to do. The solution was to Reboot, Hold Down Option-Command-P-R (that’s four keys at once!), wait for the chime, and release all four keys letting it boot as normal, then, sign on and go to the Security preference screen and toggle “Require password to wake this computer from sleep or screen saver”

I’m happy to report, the Mac is back working perfectly.

Oh, and a tip for people who want to put their Mac to sleep real quick, even with the above problems you can do this, press Option-Command-Eject. You’ll have to close your lid and re-open it to wake.

0 thoughts on “Restoring Normality to OS X – Right-Click, Expose, Sleep, and Passwords”

  1. Found this link several layers from digg, figured I’d give you some info about battery life.

    Repeatedly charging and discharging the battery is only going to hurt the battery life. I’m appalled that you would leave the thing kicking around overnight, not plugged in, hoping for it to go to sleep automatically.

    The simplest way to view a Li-ion battery is having a certain amount of energy that it will store and supply over it’s lifetime. Over charging and under charging Li-ion batteries is extremely bad for them, so bad that there are built in electronics in the batteries to prevent this from happening, so you needn’t worry.

    Having said that, it makes the most sense to leave your laptop plugged in all the time when you can. If you’re serious about extending battery life, you’d be better off taking the battery out when it’s plugged in for long periods of time, to avoid the battery charger from periodically topping up the battery. (If you really want to take the battery out and put it on a shelf, definitely read more about batteries than what I’ve written here). Unfortunately, having no battery means if the power goes out, so does your laptop. I personally leave my battery in.

    This is just a rough guide. If you’re serious, your best bet would be to read up about lithium ion batteries. There are several sites I’ve seen that detail the various types of batteries and their recommended care, much better than I can. Unfortunately, I cannot remember any of them. Different types of batteries need drastically different care.

  2. I have to say, I’ve left my MacBook drain completely numerous times and have never experienced any problems at all. It always just wakes up when I plug it in and carries on as if nothing has happened, thats one of the beauties of of OSX and laptops that use it. Are you sure there isn’t a more serious problem that is just manifesting itself in these ways if the battery drains?

  3. In response to ‘Require Password to wake -fix’. That did it! I had little faith that resetting the pram would fix the problem, but viola! It did! I’m on a G4 [Digital Audio] Desktop, and this was driving me crazy, as I need my computer protected while I’m away from it and working on it.

    Thank you a thousand times over!
    Tracy

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.