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 know the best ways to troubleshoot them. Troubleshooting is what this chapter is about, and itâs a great reason to keep this book in your pocket!
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 can be easily addressed or diagnosed by following the steps in this chapter. If the information here doesnât resolve things, you could have a unique issue, in which case a trip to the Apple Store or a call to Apple is in order.
Note
You can find a complete list of technical support numbers for Apple at http://www.apple.com/support/contact/phone_contacts.html. In the United States, the number is 1-800-275-2273.
One of the most common problems on a Mac is an application that isnât behaving as expected. This problem comes in many forms: an application that unexpectedly quits repeatedly, simply stops responding, or just doesnât perform the way it normally does. This section suggests ways to resolve all these issues and more.
Occasionally, an application will simply stop reacting to anything. Your mouse or trackpad will still work, and 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âs an easy fix. Simply right-click or Control-click the stalled applicationâs icon in the Dock to bring up its Dock menu (Figure 4-1). If you see âApplication Not Respondingâ in faint text at the top of the menu, youâll also see a Force Quit option. Select Force Quit and Mac OS X will kill the program.
You may also need another way to kill applications, 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 dialog box either by selecting âForce Quit or using the key combo Option-â-Esc. You can also try holding down Shift as you click the menu, then select Force Quit [application name] to kill the frontmost application.
Thereâs some good news when it comes to force-quitting applications in Lion. In previous versions of OS X, any changes you made between the last time you saved a document and the moment the application started misbehaving were gone forever. But Lion includes Auto Save, a new feature that automatically saves your work as you go. So if youâre forced to quit an application, Lion preserves the work youâve done since the last time you saved.
Warning
For the time being, âSave early, save oftenâ is still good advice, since Lionâs Auto Save feature only works with applications specifically built with Auto Save in mind. That means that work you do in apps designed for Lion will be saved, but applications that havenât been updated for Lion wonât automatically save your work.
The Finder is just another program, so it can get hung up, too. If that happens, either head to âForce Quit or use the key combination â-Option-Esc. If nothing happens, try clicking the Dock or some other application first, and then use the menu or â-Option-Esc to invoke the Force Quit dialog box.
Note
When you select an application in the Force Quit dialog box, the dialog boxâs button reads âForce Quit.â However, if you select the Finder, the button reads âRelaunchâ instead. Why the change in nomenclature? Unlike every other application, the Finder will be restarted immediately after itâs forced to quit.
If you suspect something is eating up too much processor time or too many system resources (because your Mac is running really slowly, say, or the fans are running at full speed for no obvious reason), Force Quit wonât help you figure out which application is hogging all the resources. Instead, open Activity Monitor (ApplicationsâUtilitiesâActivity Monitor), click its CPU tab, and then 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.) When you identify a suspect, single-click the renegade processâs name and then click the big red Quit Process button in the upper-left 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 in helping your computer operate normally. Hereâs a rule of thumb: if you donât recognize the name of the program as an application that you launched, donât kill it. Instead, do a Google search on its name (for good measure, include the terms âMac OS Xâ and âcpu,â too). Chances are good youâll find a solution for whatever is causing that process to use up so much CPU time.
It seems like computers never have enough USB ports, so most of us end up using USB hubs (or 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 Information (itâs in the /Applications/Utilities folder) and look at the USB Device Tree (click USB in the list on the left), the hub shows up, but not the device.
Often the problem is that 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 port). Switching to a powered hub 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 your various USB devices around. If any of them can run off of their own external power supply rather than taking power from the USB port, that may help as well (sometimes these power supplies are sold separately; check with the deviceâs manufacturer).
The second method of attacking USB device problems is a little more involved. First, shut down your Mac and unplug all the USB devices (even the ones that use external power supplies). Reboot your Mac, and then plug them back in one at a time while watching at the USB Device Tree (itâs updated quickly so youâll see each device appear as itâs plugged in) to see which device isnât playing nicely with others.
Sometimes going through this process results in all of the devices suddenly working. But if you figure out that only a certain device isnât working, the fix may be to install a new driver for it. Check the manufacturerâs website for updates.
MacBook users are faced with a problem that desktop users donât have to worry about: the battery. The goal of most Apple batteries is to still provide 80% of the original charge capacity after a certain number of cycles (charges and discharges). The number of cycles varies depending on your machine. For Lion-capable MacBooks, the cycle count is either 750 or 1000 cycles (depending on the model). If you notice your battery isnât holding a charge for as long as it used to, the first thing to do is launch System Information (ApplicationsâUtilitiesâSystem Information) and then click Power in the list on the left; see Figure 4-2.
The Battery Information list includes your batteryâs full charge capacity, how many cycles itâs been through, and its condition. If the condition is listed as Replace Soon or something equally ominous, itâs 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, here are a couple of things you can try:
- Calibrate the battery
Inside every MacBook battery is a microcontroller that tells your computer how long the battery 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 so, fully charge the battery and then keep your computer plugged into the power adapter for two more hours. Next, unplug the power adapter and fully drain the battery. When a warning pops up alerting you that the battery is running dangerously low, save your work and keep on trucking until your computer automatically goes to sleep. Then let the computer sleep for more than five hours to make sure every drop of power is gone. Finally, plug in the power adapter and let your computer fully charge. The battery indicator should now be successfully recalibrated.
- Reset the SMC
SMC is short for the System Management Controller, a chip thatâs responsible for hard drive spin-down, sleep and wake, and backlighting. A malfunctioning SMC can prevent the battery from charging, so you need to reset the SMC. How you do that depends on whether your MacBook has an internal or external battery. If it has an external battery, shut it down, unplug the power adapter from the wall and the computer, and then remove the battery. Next, press the power button for five seconds. After that, replace the battery, plug in the power adapter, and then restart the computer. If your MacBook has an internal battery, shut the computer down and plug it into an adapter that is getting power. On the left side of the keyboard, hold down Left Shift-Control-Option and then press the power button. Keep these buttons depressed (including the power button) for five seconds and then release them all simultaneously. Pat yourself on the back for pulling off an impressive feat of manual dexterity and then press the power button to restart the computer.
If those remedies donât restore your battery, itâs 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 have the battery replaced or live with the reduced (and ever-shrinking) battery capacity.
Most Macs come with a built-in display that doesnât require special configuration, so display problems are uncommon. When they do happen, theyâre often caused by user error. The fix, while usually easy, isnât readily apparent. Here are some things to try:
- Fuzzy/tiny display
If your display is fuzzy or everything is suddenly bigger than you remember, itâs possible that someone changed the displayâs resolution (on some systems, this may also manifest itself as a small screen with black bars around its edges). Head to ApplicationsâSystem PreferencesâDisplays and look for the monitorâs native resolution (on Macs with built-in displays, this is usually the highest resolution available at the top of the list). Once you select the optimal resolution, things should look normal 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âre using your computer. Is there some kind of kid detector in your Mac that causes this? Of course not. Your kid just pressed 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 or trackpad. Once youâre zoomed in, your mouse will suddenly start dragging the screen around, which 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 are a couple of other key sequences that can be invoked accidentally: Option-â-8 toggles keyboard zooming on and off, and holding down = or â while pressing Option-â zooms in or out, respectively.
A misbehaving application is bad enough, but a Mac that wonât start properly is truly disconcerting. The good news is that most such problems are 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.
If your Mac just beeps when you try to start it up, itâs trying to tell you something: one beep means thereâs no memory (RAM) installed, and three beeps means your RAM doesnât pass integrity check. (This goes for Intel Macs only; Power PC Macs have slightly different beeps, but they canât run Lion.) The problem could be a bad RAM module, so youâll need to open up your Mac and replace the module.
Try installing some memory that youâre certain is fully functional 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 module.
Note
If you donât know how to replace memory in your Mac, check the user guide that came with it. Or if your Mac is still under warranty, just take it into an Apple Store for service.
If you suspect youâve got a physical hard drive problem, you need to check things out quickly before they get much, much worse. If you hear a strange noise coming from your machine, thatâs an obvious sign of a hard drive problem; but these problems can also be indicated by the computer stalling for several seconds at a time (or making a clicking sound when stalling).
Just as with a car, when a bad sound is emanating from your hard drive, itâs usually a bad thing. If youâve ever 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. If youâre inclined to try identifying your hard driveâs sound by ear, head over to http://datacent.com/hard_drive_sounds.php and take a listen to the sounds of dying drives, sorted by manufacturer.
Warning
If your hard drive is failing, youâre likely to lose more data every moment itâs running. If you donât 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 GNU ddrescue 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 (ApplicationsâUtilitiesâDisk Utility) and check the S.M.A.R.T. status of the drive.
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 computer users, if 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 and selecting the disk youâre worried about in the list on the left. In the lower-right part of the Disk Utility window, youâll see the S.M.A.R.T. Status (Figure 4-3): either Verified (everything is fine) 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 an Apple Store; otherwise, back up your data as soon as possible and start pricing out a new drive.
Warning
S.M.A.R.T. isnât perfect (thatâs no surpriseânothing is). You can have a problematic drive that S.M.A.R.T. wonât recognize. So if youâre having consistent problems and S.M.A.R.T. keeps telling you everything is fine, donât discount the drive as the source of the problems after youâve exhausted other fixes.
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 computer 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 you install an update to Mac OS X or even an application. If your Mac wonât complete the startup sequence, donât panic; simply restart the machine by holding down the power button until you hear a chime; chances are everything will be fine.
- 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 your Macâs 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 (ApplicationsâUtilitiesâDisk Utility).
- Restart in Recovery Mode
Before Lion, one remedy to try when your Mac went bad was to boot from the DVD you either got with your Mac or purchased when you upgraded to Snow Leopard. But since you donât use any physical mediaâDVD or otherwiseâwhen you install Lion, this trick wonât work anymore. Fortunately, Apple realizes that, when problems occur, you might need to boot your Mac from a different source than usual, so Lion includes Recovery Mode.
Note
You need to be connected to the Internet to use Recovery Mode to reinstall Lion. The Reinstall Lion option will download every byte of the Lion installer, so you might want to try other fixes before going through with the entire process.
Recovery Mode allows you to boot from a virtual partition called Recovery HD. When you boot into Recovery Mode, youâll find yourself running a special system that lets you restore your Mac from a Time Machine backup, reinstall Lion, use Safari to look for solutions to your problem online, or run Disk Utility. (Donât be afraid to launch Safari even if youâre not connected to the Internet; thereâs a static web page with basic instructions that automatically opens when you launch Safari.)
Note
You can only run one application at a time in Recovery Mode, so if youâre running Disk Utility, say, you canât also launch Safari. Being aware of this limitation can save you some frustration and endless restarts.
In addition to Recovery Modeâs obvious choices, you can also run Firmware Password Utility, Network Utility, and Terminal by visiting the Utilities drop-down menu at the top of the screen. With all of these options, most users will find the choices presented in the Mac OS X Utilities window sufficient to fix their Mac woes.
Hereâs how to boot your Mac in Recovery Mode (the process should be familiar if youâve booted Macs from alternative disks before): hold down the Option key while starting your Mac. Youâll be presented with a screen that shows all the viable startup partitions available. Choose Recovery HD and youâll be well on your way to diagnosing (and hopefully fixing) whatever problem is currently plaguing your Mac.
Note
If you have a brand-new Mac (one that came with Lion installed), you have one more trick you can use: Internet Recovery. If something terrible happens to your machine (a massive hard drive failure, say) or you want to install Lion onto a completely blank hard drive, hold down the Option key while starting your Mac, and then choose Internet Recovery. Once you tell your computer which network to use, it will boot from Appleâs servers. Once booted, your Mac will download the Recovery HD image from Apple. After that, the process is the same as for a standard Lion reinstall.
This section emphasized tools that come with Lion because, well, if youâve installed Lion, you have access to these tools. But you should be aware that these tools arenât the only ones available when things go wrong. There are several disk repair programs available (many of which are more powerful than Disk Utility) from third parties, such as DiskWarrior (http://www.alsoft.com/DiskWarrior) and TechTool Pro (http://www.micromat.com).
This maneuver 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âs 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 Option-â-P-R, and continue to hold the keys until your Mac restarts and you hear the startup chime a total of three times. After you do this, you may have to reconfigure some of the system settings (like date, time, and possibly keyboard/mouse settings if youâve customized them).
Get Mac OS X Lion 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.