Apple hardware functional test does not start. Collecting diagnostics on macOS using the command line. What to do with Apple Diagnostic Codes

Fair, not overpriced or understated. There should be prices on the Service website. Necessarily! without "asterisks", it is clear and detailed, where it is technically possible - the most accurate, final.

With the availability of spare parts, up to 85% of complex repairs can be completed in 1-2 days. Modular repairs take much less time. The website lists the approximate duration of any repairs.

Warranty and liability

Any repairs must be guaranteed. Everything is described on the website and in the documents. The guarantee is self-confidence and respect for you. A 3-6 month warranty is good and sufficient. It is needed to check quality and hidden defects that cannot be detected immediately. You see honest and realistic terms (not 3 years), you can be sure that they will help you.

Half of the success in Apple repair is the quality and reliability of spare parts, so a good service works with suppliers directly, there are always several reliable channels and your own warehouse with proven spare parts of current models so that you do not have to waste extra time.

Free diagnostics

This is very important and has already become a good form for the service center. Diagnostics is the most difficult and important part of the repair, but you shouldn't pay a dime for it, even if you don't repair the device as a result.

Repair in service and delivery

Good service appreciates your time, therefore offers free shipping... And for the same reason, repairs are carried out only in the workshop of the service center: correctly and according to technology, it can only be done at a prepared place.

Convenient schedule

If the Service works for you, and not for itself, then it is always open! absolutely. The schedule should be convenient so that you can be in time before and after work. Good service works both on weekends and on holidays. We are waiting for you and working on your devices every day: 9:00 - 21:00

The reputation of professionals consists of several points

Age and experience of the company

Reliable and experienced service has been known for a long time.
If a company has been on the market for many years, and it has managed to establish itself as an expert, people turn to it, write about it, recommend it. We know what we are talking about, since 98% of incoming devices in the SC are being restored.
We are trusted and transferred by other service centers for difficult cases.

How many masters in directions

If several engineers are always waiting for you for each type of equipment, you can be sure:
1. there will be no queue (or it will be minimal) - your device will be taken over immediately.
2. You are handing over your Macbook to a Mac repair expert. He knows all the secrets of these devices

Technical literacy

If you ask a question, a specialist must answer it as accurately as possible.
So that you have an idea of ​​what exactly you need.
They will try to solve the problem. In most cases, the description tells you what happened and how to fix the problem.

Today we'll talk about collecting diagnostics in macOS

Information about the computer and programs

If you select "About This Mac" from the "Apple" menu, and then click on the "System Report" button, you will see a bunch of all kinds of information about your computer. So, the system_profiler utility is the same, but a hundred times more detailed.

If you call system_profiler without parameters, then the information will be displayed in full, which in my case means 3.8 MB of text. So I recommend that you write something like system_profiler> ~ / Desktop / profile.txt right away, or use grep to find the line you want.

MAC Diagnostics

Among what system_profiler will spit out, you will find information not only about the system and devices, but also about all programs, drivers, plugins, libraries and fonts. At the same time, parts of the system logs and a bunch of crap will be displayed.

If all this does not interest you, write system_profiler -detailLevel mini, and then you will get only information about the computer.

You can also add the -xml parameter to make it easier to process the received information in the script.

Directory service

The dscl utility - Directory Services Command Line is responsible for communicating with the directory service; it replaced netinfo. Has it smelled of sysadmin tricks? So it is, and we will not dwell on them in detail.

To seed a couple of commands: dscl. -list / Users will list all users, and dscl. -read / Users /<имя пользователя>- information about the user in the form of XML. Even a file with an avatar is encoded inside!

By the way, if you run dscl without parameters, it will enter interactive mode, where you can use the familiar cd and ls commands to navigate, and view the contents of the branches with the read command.

Directory Services caches and user list

Another utility is attached to dscl - dscacheutil, it is responsible for working with the caches of the directory service. You probably know it much better than dscl, because long time it was the one that had to be run to reset the DNS cache.

By the way, in latest versions macOS, this does not work, and instead of dscacheutil -flushcache, you now need to write killall -HUP mDNSResponder.

MAC Diagnostics

As for dscacheutil, it is convenient to use it to display a list of users: dscacheutil -q user. Unlike what dscl produces, the result is much easier to read.

Read and (not) reset values ​​in NVRAM

Each "poppy" has a non-volatile memory, which stores variables important for the operation of a computer. What exactly is there? The nvram command will help you find out: write nvram -xp, and you will see everything.

There are both harmless things like the sound level and the latest keyboard layout, as well as more interesting things like the Find My Mac key and completely mysterious EFI parameters.

They are all in binary, and the only piece of description I could find is in a leaked CIA document posted on WikiLeaks.

Parameters can be set with the nvram command<переменная>=<значение>, remove with the command nvram -d<переменная>or load from file using nvram -f<файл>.

You can reset everything by typing nvram -c. But usually the NVRAM parameters are reset only if something went wrong and the computer does not boot. To do this, press Alt-Cmd-P-R immediately after switching on and hold for 20 s.

Please note: if you change the parameters with the nvram utility, they will not be written to the non-volatile memory immediately, but only when the computer is turned off in normal mode.

RAM statistics

There are many ways to see how much RAM is loaded. Perhaps the easiest one is to open the "Memory" section in the "System Monitor": the most useful parameters are presented there in a visual form. From command line the best is to use top.

If you need the most detailed information then you can refer to vm_stat. The disadvantage of this utility is that all values ​​are given in 4 KB pages. However, it is not so difficult to recount, and there are a lot of scripts on the Internet - for example, this one-liner in Perl converts everything into megabytes.

You can also use vm_stat to track changes in memory load over time. To do this, enter vm_stat -c<число> <секунды>, where the first parameter is the number of measurements, and the second is the interval between them.

Flushing the disk cache in memory

Temporarily get a couple of extra gigabytes random access memory the purge command helps. It is called from root, has no parameters and resets the disk cache, bringing it to the state in which it was after the OS was loaded. But usually the memory manager does not need such help - he himself will gradually unload the excess if the RAM runs out.

The help says that purge is generally needed mainly for testing, but who knows how life will turn out?

Tracking accesses to the file system

The fs_usage command, run without parameters from root, displays a record of each access to the file system. This is necessary in cases where a program crashes on startup or produces cryptic error messages. If the problem is that one of the files is damaged, then you can find it with fs_usage.

In order to have less digging through the output, limit messages to one process by writing its name after fs_usage. If you only know the ID, enter sudo fs_usage pid.

Another useful parameter is -f, after which you can set a filter for network operations (-f network), with files (-f pathname will add a column with the path), and so on. If the text does not fit into the line, add -w.

As you know, Apple pays a lot of attention to the organization of maintenance and repair of its devices ... while they are under warranty. If the warranty period for your MacBook has expired, then its repair can result in a serious amount. You may be charged a few hundred dollars for some trivial problem.

Therefore, let's deal with those problems that we can fix ourselves. Here I have collected all important information to repair a MacBook with your own hands. It also comes in handy for desktop users. Mac computers.

Before you start: backing up

If your MacBook started to work with problems and you are going to deal with them, then before proceeding with action, create backup all important information.

I hope you already know how to use Time machine... Use this utility to create a copy of your Mac on external storage or online storage. Ok, let's start searching MacBook malfunctions and fix them.

1. Download updates and check for viruses

In the first step, make sure that your computer has current versions software... Download the latest updates for your operating system, applications, component firmware ... absolutely everything. Run App Store and go to the "Updates" section. If for some software product the update is ready - install it.

If you installed some programs not through the App Store, then run each of them separately and check if they are ready to update.

After updating the programs, run an anti-virus scan (after updating the anti-virus) to make sure that there are no viruses and other malware that could be the source of problems with your computer. You can also use a program to find and remove adware, such as Adware Mdic. Just don't use MacKeeper for this.

Many users still live in the dark and believe that viruses do not threaten Macs. But the situation has changed a long time ago, and unwanted programs displaying ads can easily be found on your system.

After updating and checking for viruses, restart your computer. It is possible that it will work without problems.

2. MacBook diagnostics

If the problem persists on your Mac, then you need to find out the source. First, you need to decide on the category of the problem: software or hardware. To test the hardware, you need to run Apple Diagnostics (or Apple Hardware Test, depending on the age of your computer). To do this, we will use the following algorithm:

  1. Turn off your MacBook and disconnect all peripherals from it (except network adapter, mouse, keyboard, and Ethernet connector).
  2. Hold the D key until the Apple Diagnostics download begins.
  3. Select a language and press the Enter button.
  4. If your Mac was released earlier than 2013, then select “Perform extended testing” and click “Test”.

The procedure for diagnosing the hardware filling of the computer will begin. This may take a long time - be patient. At the end of the diagnosis, a table with information about the found problems with the hardware will appear on the screen. Write it all down somewhere and restart your computer.

OS X's built-in Disk Utility detects a number of issues related to file system especially if they are related to access rights.

If these diagnostic tools do not find anything, then you will have to use an alternative method. Explore "Mac OS X Troubleshooting" - in this document, Apple has compiled good advice help you find the source of your computer problems. Having discovered it, you may yourself understand the further strategy. MacBook repair or you will have to look for relevant information on thematic forums.

If you still don't know how to get full functionality back to your Mac, read on.

3. Problematic programs

Let's start with what is easier. As a rule, problems with software are solved cheaper and faster.

Correcting access rights

Incorrect access rights often create problems that are difficult to explain. Fixing them in many cases allows you to quickly solve seemingly incredibly difficult problems. Launch Disk Utility (Applications -> Others) and click the Check Permissions button.

The utility will almost certainly find several objects, the permissions to which it will advise you to fix. After it completes its work, click the "Fix access rights" button. If the list of fixes is long enough, this procedure will take several minutes. You can relax and have a cup of coffee for now.

Resetting PRAM and SMC

Random access memory that is written to system parameters(PRAM) and System Management Controller (SMC) are responsible for many important things in your Mac. To reset PRAM, do the following:

  1. Turn off your computer.
  2. Press the computer power button.
  3. Press the Command, Option, P, and R buttons at the same time until the gray screen appears.
  4. Hold these buttons until you hear the computer boot sound again.
  5. Now release the buttons.

Resetting the SMC depends on the type of computer you are using. On a MacBook with a removable battery:

  1. Turn off your computer.
  2. Unplug the AC adapter.
  3. Remove the battery.
  4. Press and hold the power button for five seconds.
  5. Reinsert the battery.
  6. Turn on your computer.

On a MacBook with a non-removable battery:

  1. Turn off your computer.
  2. Connect the AC adapter.
  3. On the built-in keyboard, press the Shift, Control, and Option buttons on the left and the power button at the same time.
  4. Release Shift, Control and Option at the same time.
  5. Turn on your computer.

On Mac Pro iMac with Intel processor, Mac Mini with an Intel or Xserve processor on Intel:

  1. Turn off your computer.
  2. Unplug the power cord.
  3. Wait fifteen seconds.
  4. Plug in the power cord.
  5. Turn on your computer.

Removing problematic programs

If you still haven't gotten your MacBook to work properly, and you suspect a particular program is causing problems, then try uninstalling it and see if your computer works better after that. If this is the case, try installing this program again. Sometimes this is all there is to do to repair your MacBook. If you still have problems, then try a few more things.

Reinstall OS X

We are moving on to decisive action. Sometimes in operating system a serious problem arises that can only be fixed by reinstalling. That's why you backed up your Mac at the beginning of this article.

If you have OS X Yosemite installed (you've already upgraded your Mac), then proceed as follows:

  1. Restart your MacBook.
  2. When you see a gray screen, press and hold Command + R.
  3. Options should appear, among which select "Install OS X" (Install OS X).
  4. Follow the instructions on the screen.
  5. The operating system will reinstall. See if the problem is gone.

4. Hardware problems

If your MacBook has a hardware problem and you want to fix it yourself, you will have to use online resources filled with useful information... The Apple Diagnostics or Apple Hardware Test information should be a starting point (assuming the utility is running and the computer display is running, of course). Sometimes diagnosing problems in hardware can be very difficult and will require professional skills and tools.

Collecting information

Before you start repairing your MacBook hardware, you should prepare well and assemble necessary information... There are quite a few resources on the Internet about Mac repair. I recommend starting with iFixIt, Instructables, and YouTube. Before disassembling your MacBook case, read or view the instructions carefully and make sure you have everything you need.

MacBook Repair Tools

Unfortunately, to repair Apple laptops, you will need tools that are not included in the traditional home kit. In the iFixIt online store and in local hardware markets, you can find almost everything you need: ingenious screwdrivers, soldering tools and special kits.

You can also search Amazon and eBay for the repair fixtures you need. In the latter case, the prices may pleasantly surprise you (only delivery is likely to cost a pretty penny). Used tools are unlikely to lose their functionality after repairing one or two computers.

Where to get spare parts

On eBay, you can find not only tools, but also replacement parts for MacBooks, from motherboards to displays. You can also buy a faulty Mac at a low cost, in which we will find many working parts to repair. iFixIt also sells Mac parts.

Before buying, check a hundred times that this is exactly the part you need. Protect yourself from incompatibility issues. If you are not sure about the exact name of this part, on your MacBook go to the Apple Menu (in the upper left corner of the screen) -> About this Mac -> System Report and find a description of the required component there (of course, if the computer turns on) ...

Get down to business!

If you know what to do, have prepared the tools and the necessary parts, then it's time to start repairing your MacBook. Re-read necessary instructions... Protect Yourself From Potential Impact electric shock and proceed.

Be patient. Repairing a modern computer is a very delicate task, there are many small and fragile parts, and some of them can be irreparably damaged by static electricity. Be extremely careful when working with the battery and microcircuits.

Or maybe a service center?

Fixing a MacBook takes time, patience, and sometimes a lot of money - but it comes with a return to computer performance and increased self-esteem.

I recommend taking on major repairs only if you like digging into the filling. electronic devices... After solving serious hardware problems with Macs a few times, you will be transferred to the group of favorites.

But for most of us, you should outsource your Mac major repairs to a trained professional. You can try to take the relevant courses yourself. But they are unlikely to seem simple to you. Therefore, most users entrust the repair of their MacBook to a professional. Yes, you will give more money, but you will receive qualified help.

In what situation are you ready to fix your computer yourself? And when would you prefer to entrust its repair to a qualified person? Share your opinion in the comments.

Used to diagnose hardware problems on Macs manufactured before June 2013. But if your device is younger, ANT will no longer start on it: instead, the computer will use the Apple Diagnostics program.

In fact, both programs are not much different from each other. Unless Apple Hardware Test has a simpler and older interface, while Apple Diagnostics has everything done in a new "flat" stylish design. In addition, the latter is adapted for latest computers Apple both diagnoses and diagnoses problems with internal computer hardware components such as motherboard, memory and devices wireless.

If you think your Mac is having hardware problems, there is convenient way check it out.

To get started, turn off your computer and turn it on while holding down the D key until the Apple Diagnostics boot screen appears.


After that, select a language - this will make it easier to work with the program.


The basic test takes two to three minutes. If no problems are found, you will see a corresponding message. But if there are problems, the system will not only find them, but also describe in detail what could be the matter, and for some problems it will offer solutions before contacting service center.


Under each error, you will find its unique code - if the problem is serious, it is better not to self-medicate. For warranty computers, you need to contact, tell her the error code, after which the specialists will tell you what to do next. Do not despair if your Mac is no longer under warranty - as a rule, they know all the error codes and will be able to immediately tell you how much a repair might cost.


To exit Apple Diagnostics, shut down your computer. If you want to immediately contact the company's support, click "Get started".

If you begin to notice malfunctions in your Mac (for example, it began to freeze or reboot on its own), the first thing to do is to identify the cause of the malfunctioning.

In this case, you can immediately take the laptop to an Apple service center, if, of course, there is one nearby, or try to deal with the trouble yourself. Let's take a look at how to check your Mac at home.

Built-in Mac diagnostics

Malfunctions that can occur in the operation of a Mac can be grouped into two groups:

  • software - caused by incorrect installation of the OS or additional software;
  • hardware - consists in the failure of a certain laptop module (HDD, video card, RAM, etc.).

To fix a software failure, you just need to remove the software that led to it, or reinstall the system. Hardware problems, on the other hand, require a more rigorous approach, which consists in repairing or replacing a non-working element.

To detect hardware damage Apple equipped their computers with built-in diagnostics. Notebooks manufactured prior to June 2013 can be tested using the Apple Hardware Test (AHT) utility. On later Mac models, this app is called Apple Diagnostics. There is no fundamental difference between these programs, since they start and work in the same way. The only thing to consider is that to use Apple Diagnostics, you need to connect your PC to the Internet via wireless network or Ethernet.

Testing a Mac with AHT or Apple Diagnostics

Before starting the Mac diagnostics, you must disconnect all peripherals from the laptop (speakers, web-camera, printer, etc.), except for the optical pointing device, keyboard and network adapter. It will not be superfluous to connect a power source.

Further actions will be as follows:

The duration of the test depends on the configuration of the MacBook and averages 2-3 minutes. Mac diagnostic results can be seen in the corresponding window.

Error codes

If the Mac diagnostic program detects a problem with the hardware of the laptop, then you will see an error code, the reasons that caused it, and possible options solutions. The decryption of the received code can be found on the Internet in Russian at the link.

If the damage is serious and cannot be repaired by yourself, you should contact the nearest Apple Service Center. At the same time, trusting a MacBook with ordinary repair shops, albeit reliable, is not worth it, because the repair of Apple equipment requires a specific approach and the presence of special skills from the master.

If your MacBook is under warranty, you will need to contact Apple Support online with the error code. After that, the company's specialists will tell you how to proceed and whether you need to contact the service center.