Learn Troubleshooting Basics

If I were teaching you how to cook, I’d start by making sure you knew the basic techniques you’d be repeating many times: how to julienne vegetables, deglaze a pan, cream butter, roast poultry, and so on. That way, when we got to specific recipes later, I could simply say, “sweat the aromatics in butter and purée the tomatoes” without having to explain the meanings of words like “sweat,” “aromatics,” and “purée.”

I want to do the same thing in this chapter: make sure you have a grasp of certain procedures that come up in many different Mac troubleshooting tasks. Then, when I describe the specific steps you’ll follow to solve various problems, I can say, “start up in safe mode” without having to spell out that process every time. And of course, you can always follow links back here if you need a reminder of what I’m talking about.

If you’ve been using Macs for a while, you may raise your eyebrows at some of the procedures just ahead. “Restart Your Mac? Is he kidding? Who doesn’t know how to restart a Mac?” But please read those sections anyway, because they include details that may not be obvious (such as what to do if the usual means of restarting doesn’t work).

Force-Quit an App

When an app gets stuck and its regular Quit command won’t work, you can usually quit it using the macOS Force Quit feature. To do this, choose Apple  > Force Quit (or press ⌘-Option-Escape), select the app you want to quit, and click Force Quit. You can then close the Force Quit Applications window.

Sometimes, an app keeps running even after you use the Force Quit command. When this happens, a second attempt at force-quitting nearly always does the trick. Close the Force Quit Applications window if it’s still open, and repeat the force-quit procedure.

If even the second attempt doesn’t work, or if you can’t bring up the Force Quit Applications window, your best bet is to Restart Your Mac.

Restart Your Mac

Restarting is the most powerful Mac troubleshooting technique I know. This simple procedure can resolve a huge variety of crashes, hangs, and other problems. It may not be the first thing you should try (because it sometimes takes a few minutes), but it should certainly be high on your list.

When the need to restart arises, try each of these methods in turn until you succeed:

  1. The menu command: Choose Apple  > Restart. When the confirmation alert appears, click the Restart button.

    macOS then instructs all running apps and background processes to quit. After a few seconds (or as long as a few minutes if whatever’s running takes a while to respond), the screen goes blank, the startup chime plays, and the Mac restarts.

    In some situations, restarting in this way isn’t possible. Perhaps the Apple  menu won’t drop down, or your Mac is completely frozen and won’t respond at all. Or maybe the Restart command appears to take, but 10 minutes later the machine is still chugging away. When this happens, move on to the next step.

  2. The keyboard shortcut:

    • If your keyboard has a power button, hold down ⌘ and Control and press the power button.

    • If your keyboard doesn’t have a power button, hold down ⌘ and Control and press the eject key (typically found in the upper-right corner of the keyboard; if it’s not labeled, try either F12 or F15). Usually this method causes your Mac to restart immediately (which means you’ll lose any unsaved work).

  3. The brute-force method: If neither of the above methods is successful, press and hold the Mac’s power button (sometimes the power button on older Apple monitors works too) for approximately 10 seconds, or until the power light goes out completely. (If you don’t hold it long enough, you may just put your Mac to sleep, as indicated by a pulsating power light.) Then press the power button again to turn your Mac back on.

Log In to Another User Account

Earlier, I suggested setting up an additional administrative account that you can use for troubleshooting (see Set Up Another User Account). You should log in to that account if you suspect that some app or process in your main user account is causing problems with your Mac. To do this:

  1. Choose Apple  > Log Out Username. Do not use Fast User Switching (that is, choosing a different username from the user menu, which leaves the first account logged in), as software launched from your current account could potentially cause system-wide problems.

  2. Select the secondary user account (or enter its name), enter its password, and press Return.

  3. Check to see if whatever problem you were experiencing still exists. If not, you know that something in your previous user account (most likely something within your main user account’s home folder) is the cause of the problem.

  4. When you’re done with your test, repeat these instructions to log in under your normal account.

Start Up from Another Volume

If your main startup volume has problems that can’t be repaired while macOS is running from it—or if the drive dies completely and you need to start from a bootable duplicate—use one of these procedures to start up from another volume.

Start in Recovery

Restart while holding ⌘-R to start from the hidden Recovery HD volume (see Acquire a Secondary Startup Volume); this puts you into macOS Recovery (or OS X Recovery). Once in Recovery, you can select Disk Utility (the most common option), Restore from Time Machine Backup, Reinstall macOS (or OS X), or Get Help Online, and then click Continue.

But wait! It gets even more interesting. As I mentioned earlier, all Macs introduced in 2011 or later, as well as some 2010 Macs, also support Internet Recovery. (See a list of pre-2012 Macs that can be made to support Internet Recovery via a firmware update on Apple’s Computers that can be upgraded to use OS X Internet Recovery page.) This means that as long as your Mac is connected to the internet, you can boot it and use Recovery even if your disk is damaged or missing (or you installed a new, completely blank disk).

The way it works is that when you restart while holding down ⌘-R, your Mac first looks for a valid Recovery HD volume; if it can’t find one (because it’s missing or the portion of the disk it sits on is damaged), your Mac connects to Apple’s servers, downloads a new Recovery HD disk image, and boots from that. (If you use Wi-Fi to connect to the internet, you may be prompted to select a network and enter a password.) To read more about Internet Recovery, see the heading “If you can’t start up from macOS Recovery” in Apple’s support article About macOS Recovery.

Start from a Local Volume

If your secondary startup volume is on another hard drive or SSD, a flash drive or SD card, an Apple USB Software Reinstall Drive, or a partition of your main disk, follow these steps:

  1. If you haven’t already done so, attach the drive to your Mac.

  2. Restart, holding down the Option key until icons for all the valid startup volumes appear on the screen; this screen is what Apple calls Startup Manager. (If your Mac refuses to display the startup volumes, restart again, this time holding down ⌘-Option-Shift-Delete.)

  3. Using the mouse or trackpad, or the arrow keys on the keyboard, select the volume from which you want to boot. Then press Return.

Start from a CD or DVD

Current Mac models no longer include optical drives, but if you have an older Mac with a built-in SuperDrive (or a newer Mac with an external SuperDrive), you can—if none of the other options are available—start up from a boot CD or DVD included with your Mac by following these steps:

  1. If your Mac is running, insert the disc containing a bootable copy of macOS. Then choose Apple  > Restart, immediately hold down the C key on the keyboard, and skip to step 3.

  2. If your Mac is off, press the power button and immediately insert the disc. (On some Macs, you may have to press the Eject key on your keyboard to open the drive tray. Do this, and insert the disc, as quickly as you can.) As soon as you’ve done so, hold down the C key on the keyboard.

  3. When the gray Apple logo appears in the center of the display, release the C key.

Keep in mind that the startup process takes considerably longer with a CD or DVD than it does with a hard disk or SSD.

Start from a Remote Disc

A few of the earliest Mac models to omit the built-in optical drive included a USB Software Reinstall Drive to be used in lieu of a startup CD or DVD, but if you don’t have such a drive, you still have another option. Most Macs with no optical drive can boot over an Ethernet or Wi-Fi network from a startup CD or DVD loaded on another computer—Mac or PC—on your network.

To do this, you must first install the Remote Disc software (included with your Mac, or downloadable from Apple’s Downloads page) on the other computer, following the directions on Apple’s Use the CD or DVD drive from another computer with your Mac page. Then, insert the disc you want to boot from in the other computer. On your Mac, select that disc in System Preferences > Startup Disk and restart.

Run Disk Repair Utilities

All the disk repair utilities I mention in this book are easy to use. In general, it’s simply a matter of booting from a secondary volume, running the app (some of them launch automatically), selecting a drive (or volume), and clicking a button. (Some apps let you choose among a variety of tests to perform; when in doubt, run them all!) Consult the documentation included with your utility for details.

As an example, here’s how to repair a disk in Disk Utility. The instructions differ depending on which version of the operating system you’re running.

Use Disk Utility in El Capitan or Later

If your Mac is running El Capitan or later, follow these steps:

  1. Open Disk Utility (in /Applications/Utilities).

  2. In High Sierra or later, if the sidebar shows only the volumes and not the drive itself, choose View > Show All Devices.

  3. In the sidebar, select your startup volume (if it’s not already selected, which it most likely is); see Figure 1. Note that, depending on your version of macOS and your settings in Disk Utility, volume names may be indented underneath the names of the physical devices on which they reside. For a disk formatted as APFS, however, select the top-level icon, not an indented container or volume.

    Figure 1: Select your startup volume (which may, as in this case, be the only available volume) in Disk Utility. This image shows Disk Utility in High Sierra; other versions look a bit different.
    Figure 1: Select your startup volume (which may, as in this case, be the only available volume) in Disk Utility. This image shows Disk Utility in High Sierra; other versions look a bit different.
  4. Click the First Aid button on the toolbar, then click Run. Disk Utility examines your disk and attempts to repair it if necessary.

  5. When the repair is finished, click Done and quit Disk Utility.

Use Disk Utility in Yosemite or Mavericks

In Yosemite or Mavericks, Disk Utility can’t repair the volume you booted from, so you’ll have to use a different procedure. Follow these steps:

  1. If your secondary startup volume (see Acquire a Secondary Startup Volume) is on a physical device (such as a hard drive, a flash drive, or an SD card), attach it now; if it’s on a CD or DVD, insert it now.

  2. Restart (see Restart Your Mac). If you’re using Recovery, hold down ⌘-R until the gray Apple logo appears; if you’re using a startup CD or DVD, hold down the C key instead. Otherwise, hold down the Option key until icons for all the valid startup volumes appear on the screen, select your secondary startup volume, and press Return.

  3. Locate and open Disk Utility. If you’re starting in Recovery, you can simply select it in the list that appears and click Continue. Otherwise, open it from /Applications/Utilities.

  4. In the list on the left, select your startup volume. Note that volume names are indented underneath the names of the physical devices on which they reside.

  5. Click Repair Disk.

Disk Utility examines your disk and attempts to repair it if necessary. When it’s finished, you can quit Disk Utility and restart your Mac normally.

Erase and Restore from a Backup

In the unlikely event that neither Disk Utility nor a third-party utility can repair the problems with your disk, you might be able to recover data from it using specialized data recovery software or an expensive data recovery service such as DriveSavers. But if you already have an up-to-date backup, neither of those approaches is worth your time or effort. Instead, you should erase the disk (assuming the hardware is still OK—see How to Tell Whether You Need a New Hard Drive) and start over:

  • If you have a bootable duplicate, the process is easy: start up from the duplicate, use Disk Utility to erase the malfunctioning disk, and then use your backup software to copy the backup back onto the erased disk.

  • If you don’t have a duplicate, make one if possible. (Read Back Up Your Mac Regularly.) If your Mac won’t boot normally, you might still be able to boot it in target disk mode if it has a USB-C, Thunderbolt, or FireWire port (refer back to Acquire a Secondary Startup Volume). To do this, restart and hold down the T key until the USB, Thunderbolt, or FireWire icon screensaver appears. Run the appropriate cable to another Mac, and use a tool like Carbon Copy Cloner or SuperDuper! along with an external hard drive attached to that Mac to make a duplicate of the ailing Mac’s disk. Assuming the ailing Mac’s disk is functional, use Disk Utility to erase the malfunctioning disk, and use your backup software to copy the backup back onto the erased disk.

  • If you have a Time Machine backup, you can restart while holding down ⌘-R to boot into Recovery, and click Restore from Time Machine Backup. Click Continue and follow the instructions to restore your latest backup.

  • If you can’t make a duplicate and don’t have a complete Time Machine backup, back up your files as best you can. Then restart while holding down ⌘-R to boot into Recovery, click Disk Utility, and then click Continue. In the list on the left, select the volume you want to erase. Volume names (there may be one or more per disk) are sometimes shown indented under the disk name, so be sure to select one of the indented icons if you have a choice. Click Erase, and confirm your selection. Be aware that this will erase everything on that disk—though at this point you may have no other choice. Then install macOS normally.

Repair Permissions

Every file on your Mac has a collection of settings specifying which users can perform various actions with it (including reading, writing, and executing). The files that make up macOS itself (including some Apple-installed apps) have very particular permission settings, and if they get changed from what they were originally, things can go wrong. For example, apps may refuse to open, printing may stop working, and you may even be unable to log in.

Permissions don’t change themselves. Something has to happen to change them—such as running an improperly written installer or doing injudicious fiddling in Terminal. But whatever the cause, out-of-whack permissions can be nasty.

Starting with El Capitan, Apple has addressed this long-standing problem in two ways. First, macOS now protects certain critical directories so that their contents (including permissions) can never be changed except by the Apple installer. Second, every time you run the Apple installer (such as when you update macOS to a newer version), the installer checks permissions for Apple-installed files and resets any that are incorrect. As a result, if you’re running El Capitan or later, there’s nothing more for you to do here (you can no longer repair permissions yourself), so you can skip ahead now to Start Up in Safe Mode.

If you’re still running Yosemite or Mavericks, however, it’s a different story. Disk Utility in Yosemite and earlier has a command to restore certain permissions to what they were originally. This command affects only about 50 software packages (including the core elements of OS X). It doesn’t change the permissions for any third-party software, and it only resets permissions to what they were originally—which could, in theory, have been wrong. So it’s not the cure-all that many pundits have proclaimed it to be, and I don’t recommend it as a preventive maintenance procedure. But it can solve real problems, including problems that involve third-party software (which depends on parts of macOS that must, in turn, have the correct permissions).

To repair your permissions, follow these steps:

  1. Open Disk Utility (in /Applications/Utilities).

  2. In the list on the left, select the volume whose permissions you want to reset, as shown in Figure 2, where I’ve selected my main startup volume. (Permissions can be repaired only for volumes containing a bootable copy of macOS.)

    Figure 2: Repair permissions by selecting a disk and clicking the Repair Disk Permissions button.
    Figure 2: Repair permissions by selecting a disk and clicking the Repair Disk Permissions button.
  3. On the First Aid pane, click Repair Disk Permissions.

Disk Utility displays messages about what permissions, if any, it resets in the status area.

Start Up in Safe Mode

As you use your Mac over a period of months and years, chances are you’ll install a variety of third-party software. Some of this software may include components that operate at a low level and must be running in the background all the time—things like drivers for third-party input devices, certain backup apps, audio capture software, and utilities that monitor your Mac’s performance. All these things may load and run every time your start your Mac, without your ever being aware of them. When they work, they’re great, but if something goes wrong with one of them, it’s not always clear what the problem is or how to turn off the offending software.

For reasons like this, Apple provides a special way to boot into macOS called safe mode; entering that mode is called performing a safe boot. A safe boot temporarily disables most of these third-party items (as well as several Apple products). It also disables any login items (apps or documents listed in System Preferences > Users & Groups > Login Items), which normally open when you log in. Safe mode also clears certain caches that would otherwise load at startup. By turning off all these items, you can eliminate many potential glitches, and if the problem you were experiencing stops after a safe boot, you have some important clues as to what the culprit is.

To perform a safe boot, restart your Mac and, as soon as the screen goes black and your Mac begins to restart, press and hold the Shift key until the login window appears. Your Mac will complete the startup process, which may take considerably longer than usual. You’ll eventually see the words “Safe Boot” on the screen—possibly within the login window, depending on which version of macOS you’re running.

Check Preference Files

When an app starts acting funny, one of the first things to suspect is a damaged preference file.

Before you can disable a preference file, you must find it—and that’s sometimes easier said than done. Most preference files live in one of five folders:

  • ~/Library/Preferences or /Library/Preferences

  • ~/Library/Application Support/app or developer name or /Library/Application Support/app or developer name

  • ~/Library/Containers/app name/Data/Library/Preferences, where app name is something like com.apple.mail (more on that format in a moment)

These folders can contain hundreds or even thousands of items, and they may not conform to any obvious organizational scheme.

Apple recommends that preference files follow a standard naming convention, known as reverse domain name style. You take a company’s domain name and reverse it—apple.com turns into com.apple—and then you add the name of the app. Finally, you add the extension plist (for property list). So, com.apple.mail.plist is the preference file for Mail, and com.microsoft.Word.plist is the preference file for Word. That’s a bit weird, but at least it makes sense.

Unfortunately, this system doesn’t always work, for one of these reasons:

  • Some developers use their own naming conventions.

  • Some apps have several different preference files, each for a different sort of data. These files might be stored in a folder inside your Preferences folders, or they might not—and if they are in a folder, there’s no telling what that folder might be named. (The name of the app and the name of the developer are two good initial guesses.)

  • Apps may change the formats or names they use for preference files from one version to the next, making it unclear which of several candidates is the right one.

  • Your Preferences folders may contain files that are not preference files—log files, lists of recently opened documents, and so on.

So, to locate the preference file for a given app, try each of these steps until you find it:

  1. Open ~/Library/Preferences and set the window to List View (choose View > As List). Click the Name column to sort the list by name.

  2. Scroll down to where the app’s name would be if it followed the reverse domain name style. Look for adjacent files, too, in case the app has more than one.

  3. Type a portion of the app’s name in the window’s Search field, or use the Find command (File > Find). If that yields no results, repeat with a portion of the developer’s name.

  4. If you find more than one potential match, check the modification date. Usually the file or folder modified most recently is the one you’re looking for.

  5. If you still haven’t found the file, repeat steps 1–4, but this time look in /Library/Preferences.

  6. Still no luck? Look in ~/Library/Containers/app name/Data/Library/Preferences, ~/Library/Application Support/app or developer name, or /Library/Application Support/app or developer name.

Once you’ve located the file, then what? Well, you could drag it to the Trash, but I wouldn’t. If the file isn’t faulty after all, you may find yourself having to reset lots of preferences for no good reason. In some cases, that might mean digging out your license code and re-entering your registration data. Instead, I suggest moving the file temporarily to your desktop. Follow these steps:

  1. If the app is running, quit it.

  2. Drag the preference file to your desktop.

  3. Clear the macOS system-wide preferences cache (so apps won’t continue to use the old values) in one of these ways:

    • Log out (choose Apple  > Log Out Username) and log back in.

    • Open Terminal (in /Applications/Utilities), type killall cfprefsd, and press Return.

  4. Open the app again. It creates a new, default preference file for itself.

  5. Test the app to see if the problem still exists. If not, the old preference file was probably at fault, so you can trash the one on your desktop. If the problem is still there, the preference file was probably good; you can quit the app and drag the file from your desktop back where it came from, replacing the preference file created in step 4. Having replaced the preference file, repeat step 3 to clear the cache again.

Reset NVRAM or SMC

Every Mac has at least two chips that store certain small bits of information even when the power is off. The ones we’re interested in here are NVRAM (non-volatile RAM) and SMC (system management controller). Although it’s uncommon, any of this memory can become corrupted, leading to various unpleasant symptoms:

  • NVRAM: Incorrect NVRAM settings can lead to problems with startup (selecting the wrong startup disk, for example), audio, or screen resolution. To reset your NVRAM, shut down your Mac. While holding down ⌘-Option-P-R (which stands for “parameter RAM”), turn on your Mac. Keep holding the keys for about 20 seconds and then release them. (If you have an older Mac that plays a startup chime, release the keys after you hear the second startup chime.) Then your Mac will continue booting normally.

  • SMC: If the SMC settings are wrong, your Mac may have problems turning on, sleeping, or waking up; excessive fan noise; unusually slow system performance; video display issues; incorrect light settings (for status and battery lights, keyboard backlighting, and screen backlighting); or, for portables, not recognizing or charging a battery. Reset instructions vary from one Mac to the next; see Apple’s support page How to reset the System Management Controller (SMC) on your Mac for details.

Use Activity Monitor

You may think that your Dock shows you all the apps that are currently running, but dozens or even hundreds of other background processes could be running too. Most of these are components of macOS that use system resources only when needed and stay out of the way the rest of the time. But sometimes a rogue program can start chewing up RAM or CPU cycles and not playing nice with others. If this happens, your whole Mac can slow down. To find out what’s happening behind the scenes, turn to Apple’s handy Activity Monitor, which you can find in /Applications/Utilities.

Activity Monitor can tell you all sorts of things about your CPU, RAM, disk, and network activity. But for troubleshooting purposes, I want to focus on just a couple of pieces of information.

The default view in Activity Monitor (Figure 3) lists all your current processes. Click one of the toolbar buttons (CPU, Memory, Energy, Disk, or Network) to select a category of information to view.

Figure 3: Among the many things Activity Monitor can show is which apps (even ones not normally visible) are using the most CPU power, RAM, and other system resources.
Figure 3: Among the many things Activity Monitor can show is which apps (even ones not normally visible) are using the most CPU power, RAM, and other system resources.

The best place to start is the CPU category, which shows the amount of processor power being devoted to various processes. You can sort and filter what you see in Activity Monitor in various ways. I typically click the % CPU column header to display processes in order of their CPU usage. (When the arrow in the header points down, the most CPU-intensive tasks appear at the top; to change the sorting direction, click the header.)

To see which processes are using the most RAM, first click the Memory button on the toolbar. Then, look in the Memory column (again, you can sort in ascending or descending order) to see which processes are using up the most RAM at the moment.

I should warn you not to jump to hasty conclusions based on what you see in Activity Monitor. The fact that a process is using a lot of CPU power or RAM for a while isn’t necessarily a problem, but it can be useful for identifying certain issues. For example, if you notice that a background app you installed and then forgot about is being a CPU or RAM hog, consider checking for an update or uninstalling it.

You can quit processes from within Activity Monitor too. To do so, select a process and click the X button on the toolbar. Then click Quit. (If that doesn’t stop the process, repeat the procedure, but click Force Quit.) If you’re not the process’s owner, Activity Monitor prompts you to enter an administrator password.

I won’t say much about the other Activity Monitor categories, just a quick mention:

  • Energy: If you’re using a laptop, this view’s Energy Impact column can help you figure out what’s using the most battery power.

  • Disk: See the amount of data each process is writing to or reading from your disk.

  • Network: See the amount of data each process is sending to (Sent Bytes) or receiving from (Rcvd Bytes) the internet.

Check Available Disk Space

macOS needs plenty of room on your startup volume for things like virtual memory swap files and software updates, and all sorts of bad things can happen if you have too little: kernel panics, crashes, hangs, slowdowns, and so on. My rule of thumb for adequate breathing room is to make sure your available disk space is at least 6 GB or twice the amount of RAM you have installed, whichever is larger, up to about 100 GB of available space—so, if you have 64 GB of RAM in your iMac, you don’t need 128 GB of available disk space. (Some people suggest leaving a certain percentage of your disk space, typically 10%, available, but this logic doesn’t scale well to very small or very large disks.) If necessary, delete unneeded files to free up extra space.

If you’re at a loss to know which files you can safely delete, allow me to offer some suggestions:

  • If you’re running 10.12 Sierra or later, choose Apple  > About This Mac, click Storage, and then click Manage to display the Storage Management window. Then, with Recommendations selected on the left, click Optimize in the “Optimize Storage” section (if a checkmark does not already appear there). Follow the prompts to permit macOS to delete already watched movies and TV shows, and Mail downloads; these items can be re-downloaded as needed.

  • Try any of several utilities that show you the size of each folder or file on your Mac, enabling you to quickly identify and delete large files you may not be aware of. For example:

    Although each of these utilities does things slightly differently (and I don’t have a favorite), GrandPerspective (Figure 4) is typical, giving you not only a graphical overview of file sizes but also a list of all folder sizes and an overview of space usage by file type.

    Figure 4: When you can’t figure out where all those large files are on your disk, consult a utility such as GrandPerspective.
    Figure 4: When you can’t figure out where all those large files are on your disk, consult a utility such as GrandPerspective.
  • Finding, and deleting, duplicate copies of files on your disk can sometimes free up a good bit of space with no downside at all. To locate duplicate files, you can use WhatSize (mentioned just previously) or utilities such as these:

  • Deleting caches is generally a safe choice, although it’s temporary and may slow down your Mac; see Clear Caches.

  • Check your downloads folder(s) to see if they contain anything you no longer need, such as installers for software you’ve already installed, and drag those items to the Trash. By default, Safari uses ~/Downloads for downloads, but you can check Safari’s current location for downloads by going to Safari > Preferences > General and looking in the “File download location” pop-up menu. Other web browsers may have different downloads folders; check their preferences for locations if you’re unsure. Mail downloads are stored in ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads.

  • Your ~/Documents (or iCloud Drive/Documents) folder probably contains some files you no longer need. Skim the contents of this folder and its subfolders, looking for documents you have no further use for, and drag them to the Trash.

  • Look in /Applications (and /Applications/Utilities) for any software that you’ve installed over the past year but never use. (Expired demo software, anyone?) While you’re at it, be sure to look through /Library, /Library/Application Support, ~/Library, and ~/Library/Application Support for folder names matching the apps you just removed, and delete them as well. Resist the temptation to delete Apple software that came with macOS, though; you may need it later.

    If you find it too cumbersome to uninstall software manually like this, or if you’re concerned that you might miss some pieces, try an uninstaller utility, such as one of the following:

When you finish deleting files, don’t forget to empty your Trash (choose Finder > Empty Trash or press ⌘-Shift-Delete). Until you do so, your Mac won’t free up the disk space occupied by the files.

Check Log Files

Many of the apps on your Mac continually record details about what they’re doing in log files. In particular, they tend to make log entries when they encounter errors or other unexpected situations. In addition, every time an app crashes, a system-wide process called CrashReporter records the details of that crash in its own log. Log files are therefore an excellent source of information about what might be causing whatever problem you’re experiencing.

Log files tend to contain a lot of highly technical data that looks like gibberish to the uninitiated. This data is useful to programmers, though, and if you contact a company’s tech support department to report a bug, they may ask you to send them one of your log files to help determine what the problem was. However, even without understanding all the ins and outs of an app’s workings, taking a quick glance at its log files can sometimes give you hints that will help you track down a problem.

The easiest way to view log files is with an app in /Applications/Utilities called Console. (It could just as easily be called Log Viewer; all it does is display logs and system status messages.) When you open it, it displays one or more windows like the one shown in Figure 5. On the left, the window lists devices and logs you can view; if this list isn’t showing, choose View > Show Sources or click the Show Log List button on the toolbar (depending on your version of macOS).

Figure 5: It’s not pretty, but Console can help you figure out why something went wrong by showing log files that apps create.
Figure 5: It’s not pretty, but Console can help you figure out why something went wrong by showing log files that apps create.

One particularly important log file that Console can show is called system.log, which tends to contain the most useful error messages generated by apps and macOS itself, going back to your last restart. (You may also have one or more older versions available; look in the log list under /var/log for files like system.log.0.bz2, where the number after log increases with older logs.) To display the contents of system.log, select it in the list on the left.

So you’ve opened this log, and now you’re thinking: “I don’t have a clue what I’m looking at or how to find what I’m looking for.” It may take some time and experience to get a feel for what’s truly helpful and what to do when you find it, but here are some tips to help you glean useful information from a log:

  • Start at the end. The most recent information is at the bottom, and it’s updated in real time. If you’ve just experienced a crash or other problem, information about it is likely to be near the bottom of one of the logs.

  • Filter. You can filter a log to display only the lines containing some string of text by typing in the Search or Filter field on the toolbar. For example, if you type error, Console displays only those lines with the word error in them somewhere. (That is, in fact, a highly useful place to start. Another useful term to filter for is fail. You can also search for the name of the misbehaving app.)

  • Repetition is significant. Repetition is significant. Pay special attention to lines that repeat many times. If you see the same error message (or similar messages) 50 times in a row, you know that an app is repeatedly trying and failing at some task. At the same time, some apps are simply chatty and fill logs with lots of messages that don’t indicate any problems.

  • Consult the oracle. If you see a phrase that suggests a problem but you don’t know what it means, try searching for it in Google (or your favorite search engine), enclosed in quotation marks. For example, suppose you have a log entry that reads:

    Apr 25 19:19:03 MacBook-Pro /Library/PreferencePanes/BusySync.prefPane/Contents/Resources/BusySync.app/Contents/MacOS/BusySync[411]: Warning: accessing obsolete X509Anchors.

    You might try searching the web for "Warning: accessing obsolete X509Anchors" (again, remember the quotation marks), which may list developer documentation on what that phrase means or reports from other people who have seen that message in their logs and have theories as to its significance.

  • Go back further. You can also look at older copies of system.log by navigating in the log list to /var/log.

  • Cast a wider net. Although system.log is the most useful log file, it doesn’t contain every log entry. Also look in other places in the Log list, such as /Library/Logs and ~/Library/Logs, for logs specific to an app (app-specific logs usually have the app’s name, or at least the developer’s name, in the log title). In addition, check in /Library/Logs/CrashReporter and ~/Library/Logs/CrashReporter for an app’s crash logs.

Clear Caches

Caches help apps load more quickly and run more efficiently by storing frequently used information. Usually, caches speed up your Mac and are therefore good to keep around. However, in certain situations, a cache can cause problems rather than solving them. If a cache file becomes damaged, for example, an app may crash or otherwise misbehave when it reads that file. Or, if a cache file grows too large, it may take longer to read it than it did to generate it in the first place.

Starting with 10.12 Sierra, macOS automatically deletes many caches once they’ve outlived their usefulness. If you’re using an older version of OS X, or if the automatic cache deletion is insufficient, you can delete caches manually.

Most of your caches live in one of three places: /Library/Caches, ~/Library/Caches, or ~/Library/Containers/app name/Data/Library/Caches/app name (where both instances of app name follow the reverse domain name style I explained in Check Preference Files). Any of these cache files can be deleted safely, because apps regenerate cache files automatically as needed. However, I recommend against wiping out caches indiscriminately, because intact caches (which will be most of them) do improve your Mac’s performance, and deleting them means that your Mac will have to recreate them.

When a troubleshooting procedure calls for clearing caches, follow these steps:

  1. Quit the app you’re troubleshooting, if it’s running.

  2. Look for a file or folder containing the name of the offending app. Look first in ~/Library/Caches and then in /Library/Caches and ~/Library/Containers/app name/Data/Library/Caches/app name. If you find it, drag it to the Trash. (In some cases, you may have to enter your administrator password when dragging cached files to the Trash.) Reopen the app and see if the problem still exists. If not, you’re done.

  3. If you’re having trouble with an app that’s part of Microsoft Office 2004, 2008, or 2011, consider deleting its font cache, which is stored separately from other caches. (This procedure does not apply to Office 2016 or later.) To do so, quit all your Office apps, navigate to ~/Library/Preferences/Microsoft, and drag the appropriate file to the Trash:

    • Office 2004: Office Font Cache (11)

    • Office 2008: Office 2008/Office Font Cache (12)

    • Office 2011: Office 2011/Office Font Cache

    Test to see if the problem has disappeared.

  4. macOS maintains a system-level font cache that numerous apps use. Bad font cache files have been implicated in many problems. To delete most of your font caches manually, you can open Terminal (in /Applications/Utilities) and type this, followed by Return:

    atsutil databases -remove

    Then restart your Mac, empty your Trash, and see if the problem still exists. However, be aware that after you delete these font caches, any fonts you’ve disabled in Font Book will be re-enabled.

  5. Delete your other system-wide caches—that is, everything else in /Library/Caches—and restart your Mac. Test once again to see if the problem is gone.

  6. As a last resort, delete the caches in /System/Library/Caches. (You’ll need to enter your administrator password to do so.) Restart your Mac.

Check Your RAM

macOS is picky about the quality of RAM in your Mac. If RAM is defective or even slightly out of spec, kernel panics or other crashes can result. RAM installed by Apple at the factory has a low incidence of failure, but if you’ve installed third-party RAM yourself (and especially if you used a cheaper brand), you’re at a greater risk for problems.

Several utilities can check your RAM to make sure it’s healthy:

  • Apple Diagnostics or Apple Hardware Test: These tools are not only free, one of them also came with your Mac (or can be run over the internet). Newer Macs include Apple Diagnostics, while older ones come with Apple Hardware Test. (Read on for instructions on how to use these.)

  • Atomic

  • TechTool Pro

  • Memtest OS X (only for Sierra and earlier)

  • Rember (a GUI utility based on Memtest OS X)

If you use a third-party tool, follow the instructions that came with it.

To run Apple Diagnostics or Apple Hardware Test, follow these steps:

  1. If you have a disc or USB drive with Apple Hardware Test on it, insert it into your Mac. If your Mac shipped after Lion was released and did not include external boot media, make sure the Mac is connected to the internet (via Ethernet) or that a Wi-Fi network connection is available.

  2. Choose Apple  > Shut Down and wait for your Mac to shut down completely.

  3. Press the power button to turn on your Mac, and immediately press and hold the D key until Apple Diagnostics starts or the Apple Hardware Test chooser screen appears, either of which may take a minute or more. If Apple Diagnostics or Apple Hardware Test can’t be found on any local media and you’re using a Wi-Fi connection, select a wireless network when prompted, and enter its password (if any).

  4. Select a language (using the mouse or the arrow keys) and click the right arrow button or press Return. (For Apple Diagnostics, you only need to do this the first time you run it.)

  5. For Apple Diagnostics:

    The test runs automatically, and takes just 2–3 minutes. At the end, it either says “No issues found” or lists any problems along with information on what you should do about them.

    For Apple Hardware Test:

    1. On the Hardware Tests tab, if there’s an Extended Test button, click it. If not, select the checkbox Perform Extended Testing (Takes Considerably More Time) and click Test.

    2. Kick back with a good book while you wait for the test to complete. The screen may say something like “Estimated time: 10–15 minutes, or longer depending on the amount of memory installed.” If your machine has lots of RAM, “or longer” could turn out to be hours.

    3. If the test uncovers no problems, the Test Results area either displays “No trouble found” or puts the word “Passed” next to all the applicable tests. If a problem does exist, a failure message appears along with advice for what to do next.

  6. Click Restart to restart your Mac.

If Apple Diagnostics, Apple Hardware Test, or another utility reports that you have defective RAM, the module in question must be replaced. If the module was installed by Apple and your Mac is still under warranty (or AppleCare+), Apple should replace it at no charge. If you purchased your RAM from another vendor, check their warranty terms. (Several RAM vendors offer lifetime warranties.)

Test for Reproducibility

You’ve heard the joke: “I said, ‘Doctor, it hurts when I do this.’ And the doctor said, ‘Then don’t do that.’” But, of course, any doctor truly would want to know what makes a symptom worse (or better). If you can clearly describe the circumstances under which some problem reliably occurs, you’ll be that much closer to a diagnosis. It’s not terribly helpful to know that your arm hurts “sometimes” or that Safari crashes “now and then.” But if your arm hurts only when you hold it at a certain angle or Safari crashes only when you visit a certain website, then you’re on to something.

Programmers love detailed reports about exactly how to reproduce a problem. If the programmers can get the problem to occur, they can usually fix it. If they can’t, they have to guess at the cause. If you report a bug to a software developer, giving information on reproducibility is important. But even if you’re just trying to work around it yourself, knowing where and when the problem occurs can help.

Testing for reproducibility isn’t as easy as it sounds, though, because sometimes problems seem to occur randomly or unpredictably. But you can get at least partway there with these suggestions:

  • Take notes. When you encounter a problem, think about the two or three things you did most recently, and write them down. For example, if Mail crashes, you might make a note of the fact that you just checked your email, and before that you added a new rule, and before that you did a search for messages from your boss. If the problem happens repeatedly, these notes can help you find patterns.

  • Narrow the scope. Let’s say a problem occurs when you have a dozen apps running. Try quitting half of them and see if the problem still occurs. If it does, quit half of the ones remaining, and so on; if it doesn’t, quit the ones currently running and relaunch the other half. Or, if a problem happens when you’re running macOS normally, try a safe boot (see Start Up in Safe Mode). If the problem goes away, you’ll know it was caused by some process that loads during startup or login.

    You’re trying to get the problem to occur under conditions as specific and repeatable as possible. To that end, it’s most helpful to change only one type of thing at a time. For example, if your Mac is doing something odd and you quit apps, reset your SMC, add RAM, and repair your disk before confirming that the problem has gone away, you’ll be unable to tell which of those procedures fixed it—and that can be quite important to know, especially if the problem happens again in the future.

  • Try other environments. If a problem occurs on your Mac, does it also happen on your spouse’s Mac? If your mouse is jittery when plugged into your keyboard’s USB port, is it also jittery when plugged directly into the Mac’s USB port? If a document looks weird in TextEdit, does it also look weird in Word? Try to test whether your problem appears under a variety of circumstances.

If you can reach the point where you can make a problem occur intentionally—always and only when you’re trying to reproduce it—you’re close to a solution. If the obvious remedies (such as disabling preference files, deleting caches, and starting up in safe mode) don’t work, you at least have solid information to provide to the developer’s tech support staff, which can help them solve your problem.

Get System Information

Many of the troubleshooting steps you may take (such as searching for information on Apple’s website or contacting tech support) require that you know exactly which version of macOS you’re running, among other details. If you don’t know which version of macOS is installed, choose Apple  > About This Mac (Figure 6).

Figure 6: Choose Apple  > About This Mac to display a window showing your Mac model, operating system version, and more. The window’s appearance varies by operating system version.
Figure 6: Choose Apple  > About This Mac to display a window showing your Mac model, operating system version, and more. The window’s appearance varies by operating system version.

When you’re talking to a developer’s tech support staff, they may ask you for more detailed information about your Mac, such as which third-party software is installed and what brand of hard drive it has. To get this information, use an Apple utility called System Information. You can open this utility by clicking System Report (or, in older versions of OS X, More Info) in the About This Mac window or by double-clicking System Information in /Applications/Utilities.

At this point, a technician may ask you to look for, and read off, certain information found in the app’s main window, or to save a file with all the details and send it in as an email attachment. To do this, choose File > Save, type a name, and choose a location, as shown in Figure 7. Click the Save button, and then attach the saved file to an email message.

Figure 7: You can save the entire System Information report about your Mac to send to a tech support representative.
Figure 7: You can save the entire System Information report about your Mac to send to a tech support representative.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset