1

I have an old MacBook Air 13" from 2013. It has been working flawlessly up to maybe 6 months ago, where it started being insanely slow. I have identified the cause to be the dreaded kernel_task, that uses all my CPU.

The problem starts right after booting (maybe even during booting, it is very slow as well). The system CPU usage is constantly at 65-85%, where the free CPU can be 0.2-25%. The kernel_task is a 200-1000%. As it starts during booting, I don't believe it is actually high temperatures. Also the fan is very silent and the computer does not appear hot. There is no difference if I am on battery or power source. Ambient temperature is probably 21oC. When starting the Mac, I have to hold the start button until the apple logo appears, as it otherwise won't start.

Here is a view of the activity monitor: enter image description here

What I have tried so far:

  • Reset SMC
  • Reset PRAM
  • De-dust the macbook
  • Update to the latest IOS
  • Reset to factory settings and remove everything
  • Deactivate turbo boost

What I have tried for screening the problem

  • Run "sudo powermetrics --samplers smc" in terminal. CPU thermal level: 150. CPU die temperature: 50oC. Fan: 1200 RPM
  • Run intel power gadget

enter image description here

  • Install Macs fan control and set to a high speed for a period, to cool the computer. Did not stop the kernel_task.

  • Boot in safe mode (still occurred).

  • Apple diagnostics only gave PPT002 "Battery functions normally, but the voltage is lower than when it was new"

What can I do to make my computer usable again? Resetting it did improve, as I before generally had <1% CPU available, but it is still not doing great.

8
  • Does this still occur in Safe Mode (boot with Shift key held down)?
    – pion
    Dec 21, 2021 at 8:40
  • It still occurs in safe mode, no difference there. Dec 21, 2021 at 8:54
  • Not sure if related, but I can add that I have to hold down the start button when booting the computer until the start-up sound is more or less done and the apple logo appears. It also makes a loud sound, like winding or something, which I do not believe is from the speakers Dec 21, 2021 at 8:56
  • @BastianBorumAndersen Can you elaborate on what you mean by have to hold down the start button? Do you mean that the computer won't boot unless you press AND hold the button? Does it suddenly turn off if you release the button prematurely?
    – pion
    Dec 21, 2021 at 9:12
  • Exactly Pion. I have to press and hold down for maybe 5-10s? Otherwise it immediately goes to black. Not sure if it is related though Dec 21, 2021 at 9:47

1 Answer 1

3

Since there is no clear hint as to what's causing kernel_task to use >200% CPU at boot, we need to start at first principles and examine what the kernel is doing. The way to do this is by collecting and analyzing a spindump. To do this:

  1. Run the following Terminal command to enable kernel symbolication:

     sudo nvram boot-args="keepsyms=1"
    

    Make sure to copy-paste this so that you're entering straight quotes rather than curly/“smart” quotes. (If you get a general error, you will first need to disable System Integrity Protection. You can re-enable it after you're done with this investigation.)

  2. Reboot your machine and don’t open any apps except for Terminal.

  3. In Terminal, enter the following command, press Return, type in your password, but do not press Return again yet:

     sudo spindump -reveal -noProcessingWhileSampling
    
  4. Perform the minimum actions that are necessary in order to put the system into its high-CPU usage state. In your case maybe this just means waiting a few moments.

  5. As soon as you begin to feel the slowness, go to the Terminal window where you entered your password and press Return so that the command begins to execute. Do not do anything else on the computer while it's running, otherwise you will distort the data collection.

  6. After waiting for >10 seconds to collect a sample and another minute or two to symbolicate and format, you’ll get a file in /tmp/spindump.txt that contains a stackshot of every process.

  7. Upload the file to PasteBin or some equivalent place and add the link to it to your original question. We can take a look at it and come up with next steps for the investigation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .