About once or twice a day, something odd happens with my mac:
- My wifi behaves like it can’t talk to my router.
kernel_tasktakes up 80-90% of my first core.
I’ve use MenuMeters and Hot to try and figure out what’s happening. My first guess was that the laptop was overheating. I put my laptop on a Wii balance board I’ve rigged up as a cooling pad and I thought that would fix it but it kept happening. After installing MenuMeters and Hot, I can see that temperature does not seem to correlate with my wifi issues.
This was taken during a disconnect. Of note in the image is MenuMeter indicating that wifi seems disconnected (the gray network indicators that say “0B/s” to the far right of the menu bar). Not pictured, if I click on the wifi icon I can see that it’s still connected to my home wifi without a warning, as if everything was fine. Also note that MenuMeters shows my first CPU is working really hard (green is user space, red is kernel). Hot claims my CPU is 76C but not throttled (“throttled to 100%” i.e. no throttling). I’ve seen my CPU hit 85C with no impact to wifi. If I wait it out without restarting, it’ll remain disconnected for 10-30 mins before everything seems to sort itself out. It’ll reconnect on it’s own at full speed.
This is an image of
sudo htop sorted by
kernel_task is always eating up a lot of a single core’s processing power every time I disconnect. As soon as I begin a network action that begins to take a long time (and ultimately never connects), I can reliably look up at MenuMeters and see the first core is working hard in kernel space. The pie chart between Hot and the CPU meters is my memory. In other situations where I had a memory leak, I’ve seen a slice of that pie grow until it takes up the whole circle. That does NOT happen during these disconnects. My wifi is working right now and the pie chart in my menu bar looks exactly like the one pictured mid-disconnect.
There’s dozens of devices on my network. Phones, other people working, game consoles, TVs, whatever. They all continue to transfer over the network unaffected by whatever my laptop is dealing with. Turning the wifi off and back on seems to do nothing. Giving my laptop more air doesn’t seem to change anything. I have 3 things plugged into my laptop: a charging cable, and a dongle that has an HDMI cable plugged in as well as a USB headset. The dongle is plugged in on the left side of the laptop and the charger is plugged in on the right (advice I saw on a page claiming the issue was thermal cooling) but I have not noticed a change in behavior after changing my setup in this way.
I’m a backend developer so I have things like docker and kubernetes installed but the network disconnects don’t seem correlated with any user actions at all.
I’m out of ideas. I have no clue what process owns the kernel task or what it’s trying to do. Any help debugging this would be greatly appreciated!