Chapter 4. Quick Guide to Troubleshooting Mac OS X
Mac OS X is a robust operating system; while problems are rare, they do show up from time to time. Since these problems always seem to present themselves at the worst possible moment, it helps if you’re pre-armed with the best ways to troubleshoot them. Troubleshooting is what this chapter is about, and a great reason to keep this book in your pocket!
Common Problems
There are a lot of things that can go wrong with your Mac. Hardware problems, software glitches, and configuration issues can happen at any moment. Most of the problems you’ll encounter with your Mac can be easily addressed or diagnosed by following the steps in this chapter. If the information doesn’t resolve the problem, it could be unique and a trip to the Apple Store or a call to Apple is in order.
Note
If you’d rather call Apple than run by an Apple Store, you can find a complete list of technical support numbers at http://www.apple.com/support/contact/phone_contacts.html.
Misbehaving Applications
One of the most common problems on a Mac is an application that isn’t behaving as expected. The problem comes in many forms: an application that unexpectedly quits repeatedly, an application that simply stops responding, or even an application that just doesn’t perform the way you expect it to.
An application stops responding
One of the problems you may encounter when using your Mac is an application that’s not responding. When this happens, the application will simply stop reacting to anything. Your mouse or trackpad will still work, other programs will be fine, but if you want to use the troublesome program all you’ll get is a spinning beach-ball cursor (instead of the mouse pointer) and you’ll have no way to input anything.
Don’t panic; there is an easy fix. Simply right-click or Control-click on the stalled application’s icon in the Dock to bring up its Dock menu. If you see a message at the top of the menu saying Application Not Responding (the message is in light text), you’ll also see an option to Force Quit the application. Select Force Quit (Figure 4-1) and Mac OS X will kill the program.
You may need more than one way to kill a program, because occasionally a program can become unresponsive without Mac OS X realizing that the program is in peril. For these times, launch the Force Quit Applications window either by selecting Force Quit from the Apple menu or using the key combo Option-⌘-esc. You can also try holding down Shift as you click the Apple menu, then select Force Quit application name to force quit the frontmost application.
Warning
Force quitting destroys all the data since your document (or whatever you were working on) was last saved. Some applications can recover some of your work even if you haven’t saved it, but don’t count on that. For example, in Safari, you can choose History→Reopen All Windows From Last Session to reopen the windows you had open.
An occasional hang is one thing, but if you find an application consistently freezing, a little more research is in order. One possible remedy is to delete the preferences file. You can find the preferences for an application in your Home folder under Library/Preferences. Drag the file or files associated with the troublesome application (they usually have the application’s name somewhere in the preferences filename) from the Preferences folder into the Trash and restart the application. Don’t worry, the program will still work and will build a new preference file (though you will lose any preferences you have set up for the program and will have to reconfigure them). If the application starts working, it means that your preferences file had become corrupt somehow.
The finder stops responding
The Finder is just another program; it can get hung up. If that happens, either get to the Force Quit item in the Apple menu or rely on the key combination ⌘-Option-esc. If nothing happens, try clicking the Dock or some other application first, then use the Apple menu or ⌘-Option-esc to invoke the Force Quit dialogue.
Note
While every other application is forced to quit, the Finder is relaunched. Why the change in nomenclature? Unlike every other application, the Finder will be restarted immediately after it is forced to quit.
Force quitting greedy processes
Turns out that the Force Quit menu doesn’t show all the applications running on your Mac. If you suspect something is eating up too much processor time or too many system resources (your Mac might be running really slowly or the fans may be running at full speed for no obvious reason), Force Quit won’t help you figure out which application is hogging the resources. You won’t be forced to restart to get your old Mac back; instead, open Activity Monitor (/Applications/Utilities/Activity Monitor), click the CPU tab, and look for any processes that are using a lot of CPU resources for more than a few seconds (Safari and its helper applications occasionally do this, particularly with runaway Flash or JavaScript code). With the suspect identified, single-click on the renegade process, followed by a click on the big red Quit Process button in the upper-righthand corner of the Activity Monitor window (you can’t miss it, it’s shaped like a stop sign).
Warning
Be careful which applications you quit in this way. There are some programs that your Mac runs in the background, and many of these are important to the operation of your Mac. Here’s a rule of thumb: if you don’t recognize the name of the program as an application that you started, don’t kill it. Instead, do a Google search on its name (for good measure, include the terms “Mac OS X” and “cpu”). Chances are good you’ll find a solution to whatever is causing that process to use up so much CPU time.
USB device problems
It seems like computers never have enough USB ports, so most of us end up using USB hubs (or using keyboards that have extra USB ports). Then we plug some fantastic new USB device into the hub and it doesn’t work. In fact, if you dig through System Profiler (it’s located in the /Applications/Utilities folder) and look at the USB Device Tree (click USB from the list on the left), the hub shows up, but not the device.
Often the problem is because the device requires a powered USB port and you’re using an unpowered hub (or you’ve maxed out the power capabilities of the hub or USB port). Switching to a powered hub instead of an unpowered one might fix the problem, but it isn’t guaranteed. What works most often is plugging the device directly into your Mac, which means you’ll need to shuffle the way you plug USB devices into your Mac. If any of the devices you use can run off of their own external power supply rather than taking power from the USB port, that may help as well (sometimes the external power supplies are sold separately; check with the manufacturer of the device you are using).
The second method of attacking USB device problems is a little more involved. Shut down your Mac and unplug all the USB devices (if any of the devices use external power, unplug them, too). Reboot your Mac, then plug them back in one at a time while looking at the USB Device Tree (it is updated quickly so you’ll see each device as it is plugged in) to see which device isn’t playing nicely with others. Sometimes going through this procedure results in all of the devices suddenly working.
If a USB device isn’t working, you may need to install a new driver for it. Check the manufacturer’s website for updates.
Battery problems
MacBook users are faced with a problem desktop users don’t have to worry about: the battery. The goal for most Apple batteries is to still provide 80% of its original charge capacity after 300 complete charge/discharge cycles (1,000 cycles on newer MacBooks). If you’re starting to notice a decreased charge time for your battery, the first place to go is System Profiler→Power (see Figure 4-2).
The Power section of System Profiler tells you the full charge capacity of your battery, how many cycles your battery has been through, and the condition of your battery. If the cycle count is getting up to the rated maximum for your battery, it is likely time to think about getting a new battery. If the cycle count is low but the battery is still running out of juice prematurely, you can try a few steps:
- Calibrate the battery
Inside every MacBook battery is a microcontroller that tells your computer just how long it is going to last until it runs out of juice. Over time, this estimation can get farther and farther from real-world performance. To get the computer and the microcontroller on the same page, you need to recalibrate the battery from time to time. To do this, fully charge the battery and keep it plugged into the power adapter for two more hours. Then unplug the power adapter and fully drain the battery. When the warning pops on the screen alerting you to the fact that the battery is running dangerously low, save your work and keep on trucking. Let the computer sleep for more than five hours. Plug in the adapter and wait until the computer is fully charged. The battery indicator should be successfully recalibrated.
- Reset the SMC
SMC is short for the System Management Controller. This chip is responsible for hard drive spin-down, sleep and wake, and backlighting. A malfunctioning SMC can prevent the battery from charging. To reset the SMC (after you have shut down your Mac) remove the battery and unplug the power adapter from the computer. Hold the power button for five seconds. Replace the battery and plug in the power adapter. Restart the computer. This won’t work for a MacBook with an internal battery. For those models, shut the computer down and plug it into an adapter that is getting power. On the left side of the keyboard hold Left Shift-Control-Option and press the power button. Wait for five seconds and restart the computer.
If those remedies don’t restore your battery, it is likely time for a trip to your local Apple Store or authorized repair center. If your computer is under warranty, and your cycle count is low, Apple will probably replace the battery. If your cycle count is over the recommended number, and the performance degradation is within expectations, you’ll probably need to replace your battery or live with the reduced (and ever-shrinking) battery capacity.
Note
Like many computer makers, Apple has had its share of battery recalls. In some cases, batteries that pose a danger are recalled. In other cases, they are recalled for performance reasons. Regardless, you should check with Apple to see if your battery is under recall. It is likely that they will replace a battery under recall even for a computer that is out of warranty.
Display problems
Most Macs come with a built-in display that doesn’t require special configuration, so display problems are uncommon. When they do happen, it is often user error. The fix, while usually easy, isn’t readily apparent. Here are some things you can try:
- Fuzzy/tiny display
If your display is fuzzy (or everything is suddenly bigger than you remember), it’s possible that you or someone else changed the resolution of the display (on some systems, this may also manifest itself as a small screen with black bars around the border of the screen). Head to System Preferences→Displays and look for the monitor’s native resolution (on Macs with built-in displays, this will usually be the highest resolution available at the bottom of the list). Once you select the optimal resolution, you’ll be happy again.
- Your display moves with your mouse
I’ve received several panicked calls and emails about this issue. The weird thing is that it always happens when children under five are on your lap while you are using your computer. Is there some kid detection receiver in your Mac that turns on screen moves with mouse? Of course not. What has happened is your kid has depressed some keys while you were working (if you don’t have kids or lap cats, then it was probably you).
There are a couple of key combinations that will cause your Mac to zoom the screen (the most common is holding down Control while you zoom in or out with your mouse wheel or trackpad). Once you’re zoomed in, your mouse will suddenly be dragging the screen around. It is disconcerting if you are not expecting it. To turn it off, hold down Control and zoom out with your trackpad or mouse wheel. There is also another sequence of keyboard commands that may be invoked accidentally: Option-⌘-8 will toggle keyboard zooming on (or off), and holding down = or – while pressing Option-⌘ zooms in or out.
Startup Problems
A misbehaving application is bad enough, but a Mac that won’t start properly is truly disconcerting. The good news is that most problems are usually repairable. The general method of attack in this case is to get your Mac to a state where you can run Disk Utility and repair the drive. However, there are some situations where you can’t even get to that point.
Your Mac beeps at you instead of starting
If you’ve got a bad memory (RAM) module, you’ll need to open up your Mac and replace that module. On Intel Macs (PowerPC Macs have slightly different beeps, but they won’t run Snow Leopard), these startup beeps will tell you what’s up:
One beep | No RAM installed |
Three beeps | RAM does not pass integrity check |
Note
For memory-related errors, you should try installing some memory that you know is good to see if that resolves the problem. If you don’t have any spare memory lying around, try removing each RAM module and replacing them one by one until you’ve isolated the bad memory.
If you don’t know how to replace memory in your Mac, check the user guide that came with it. If your Mac is still under warranty, you can skip the manual investigation and bring it into an Apple Store for service.
Your hard drive is making noises
If you suspect a physical hard drive problem, you need to check things out quickly before they get much, much worse. A hard drive problem is often obvious if you hear a strange noise, but can also be indicated by the computer stalling for several seconds at a time (or making a clicking sound when stalling). If you’ve listened to the National Public Radio show Car Talk, you know that one of the highlights is when callers try to imitate the sounds their cars are making. Just as with a car, when a bad sound is emanating from your hard drive, it isn’t usually a good thing. If you’re inclined to identify the sound, head over to http://datacent.com/hard_drive_sounds.php and take a listen to the sounds of a dying drive, sorted by manufacturer.
Warning
If your hard drive is failing, you are likely to lose more data every moment it is running. If you do not have current backups, your best bet is to replace the drive immediately, and either seek a data recovery professional or, if you don’t have the money for that, install the damaged drive in an external drive enclosure and use the dd_rescue utility (http://www.gnu.org/software/ddrescue) to recover the data on the damaged drive.
If you aren’t hearing any obviously unusual sounds, but still suspect your hard drive is causing your problems, head to Disk Utility and check the S.M.A.R.T. status of the drive.
S.M.A.R.T. is yet another acronym (using a computer means loving acronyms) and this time the acronym is clever, if a little forced. S.M.A.R.T. stands for Self-Monitoring, Analysis, and Reporting Technology. The idea behind S.M.A.R.T. is that many hard disk failures are predictable, and that computer users, given a heads-up that their hard drive is on the verge of failing, will be able to recover data before the failure actually happens. You can discover your drive’s S.M.A.R.T status by opening Disk Utility (in /Applications/Utilities) and selecting the disk you are worried about. In the lower right side of the Disk Utility window, you’ll see S.M.A.R.T Status: you’ll either see Verified (everything is fine, as shown in Figure 4-3) or About to Fail. If you get the About to Fail notice, don’t waste any time; if your Mac is under warranty, take it into the Apple Store. Otherwise, back up as soon as possible and start pricing out the cost of a new drive.
Startup troubleshooting
Thankfully, the hardware failures just described are relatively rare. Much more common are software failures. Corrupt files, wonky login items, and even font problems can cause a startup failure. These issues are generally repairable, hopefully without data loss. Unfortunately, when you have one of these problems, the cause isn’t immediately obvious. When faced with a Mac that won’t boot, there are a few things you can try to get your Mac back to a usable state:
- Restart your Mac
A lot happens when Mac OS X starts up. It checks your Mac’s hardware, prepares the system software, and more. During the startup process, there are ample opportunities for something to go wrong, especially right after installing an update to Mac OS X or even an application. If your Mac won’t start, don’t panic; restart the machine and chances are everything will be fine.
Warning
If you see a flashing question mark when you try to start your Mac, it means that your Mac can’t find its startup disk. In this case, skip ahead to “Boot from another disk and run Disk Utility” at the bottom of this page.
- Safe Boot
If a simple restart doesn’t do the trick, it means you have problems that persist across restarts, so the next step is a Safe Boot. In Safe Mode all startup items are disabled, font caches are cleared, and some other possibly problematic items are avoided. More important, Safe Boot gives you a chance to run Disk Utility, uninstall any software that may be misbehaving, or back up your data before whatever is causing the problem gets worse. To get your Mac to boot into Safe Mode, hold down the Shift key after you hear the startup chime and release the key when you see the spinning wheel appear. Once the Mac is booted, run Disk Utility (located in the Utilities subdirectory of Applications).
Note
When you’re booting in Safe Mode, the Login window automatically appears even if you usually use Automatic Login on your Mac. Don’t be alarmed by the change, it is a sign that Safe Mode is working as expected.
- Boot from another disk and run Disk Utility
If all else fails, try starting from another disk with Mac OS X on it. If you have one, you can use an external drive with Mac OS X installed on it. Otherwise, use your Snow Leopard Install DVD or the Restore DVD that shipped with your Mac. To force your Mac to boot using the optical drive, press and hold C while starting. To choose a different drive (an external disk), hold the Option key while starting to get a list of all available startup drives.
Note
If you start from your Snow Leopard or Mac Restore DVD, you’ll find yourself in the Mac OS X Installer. To launch Disk Utility, click the Tools menu on the menu bar and select Disk Utility.
This section emphasized Disk Utility because all Macs come with the handy program. There are several (often more powerful) disk repair programs available from third parties, such as DiskWarrior and TechTool Pro.
Reset your PRAM
This troubleshooting step gets its own section only because it’s one of the oldest troubleshooting techniques in Mac history.
PRAM (parameter random access memory) is where your Mac stores many of its hardware settings. Resetting the PRAM almost never resolves a startup issue, but it is something Apple support usually asks you to do when troubleshooting a problem (and it does, in some rare cases, help). To reset the PRAM, turn on your Mac, immediately press and hold the Option-⌘-P-R keys, and continue to hold the keys until your Mac restarts and your hear the startup chime a total of three times. If you reset the PRAM, you may have to reconfigure some of the system settings (date, time, and possibly keyboard/mouse settings if you’ve customized them).
AppleJack
It seems as though computer problems happen at the worst possible times. Whether this is some intrinsic law of the universe or perceptual defect common to all of us doesn’t make any difference when you’re on the road, especially if your Mac won’t start and you don’t have a startup disk. With a little preplanning (and zero expense) you can add an emergency utility that will help you fix your Mac when it won’t boot normally.
AppleJack works by taking advantage of a feature called single user mode. Single user mode is a different way of booting your Mac. Instead of the usual highly visual interface you’ve come to expect, single user mode gives you a command prompt and a plain text screen. Not very exciting, but single user mode only loads the very basic parts of Mac OS X, so chances are good that single user mode will work even if your Mac won’t boot. Once you’re in single user mode, AppleJack can repair your troublesome disk.
For AppleJack to work its magic, you’ll have to take the 30 or so seconds it takes to install AppleJack. Do it now so it will be there when you need it. Head to http://sourceforge.net/projects/applejack to download the program and while you’re there, take a few minutes to read all about the project at AppleJack’s project page: http://applejack.sourceforge.net/.
To start your computer in single user mode, hold down ⌘-S as the
computer boots. If it’s in good enough shape to start in single user
mode, you’ll get a shell prompt where you can type commands. To run
AppleJack, type applejack
and press Enter or
Return. AppleJack can run any of the following tasks or run all of
them in sequence:
Repair disks
Repair permissions
Cleanup cache files
Validate preference files
Remove swap files
AppleJack can be a real lifesaver if you don’t have a startup disk with you and things go wrong, so it is worth your time to install it right this second!
Get Mac OS X Snow Leopard Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.