Linux 4.20 Fixing Bug Where Plugging In A MacBook Pro Leads To Excessive CPU Usage
The upcoming Linux kernel that will be at either version 4.20 or 5.0 is going to fix a kernel issue that dates back at least a year where plugging-in or even unplugging recent Apple MacBook Pro laptops will lead to excessive CPU resources being consumed... Basically, the charging/uncharging event change for these recent MBP laptops was causing issues within the kernel -- adding to the list of problems Linux faces trying to run on recent Apple hardware.
If booting the recent MacBookPro13 or MacBookPro14 hardware with the power cable already attached or not changing the power states, the Linux power management code has behaved fine. But a kernel bug opened up last December was started when a user realized excessive interrupts were being caused after plugging into power on an already booted MacBook Pro. The report mentioned, "as soon as I plug in the power the interrupt count starts to increase by about 5000/second...When this happens, the CPU starts spending about 20% in interrupts, and it leads to other issues such as unloading modules taking very long (1 minute) (the longer this has been going on, the longer the module unload takes)."
Well, issues (un)plugging laptops sort of defeats much of the purpose of a portable computer... Nearly one year later, this problem has been tracked down. A fix has been queued into the Linux power management subsystem's "-next" tree ahead of Linux 4.20~5.0 kernel. The patch message on the fix explains:
The one line fix is queued for the next Linux kernel release to take care of this problem. But with recent MacBook Pro laptops there are still other problems ranging from touchpad/trackpad not working out of the box, wireless issues, no mainline Touch Bar driver, and other problems. It seems the days are long gone when modern Apple MacBook Pros would play nicely out-of-the-box with Linux distributions. If you want a nice quality Linux laptop in 2018, you're best off looking at the Linux-friendly Dell XPS laptops or generally respectable Lenovo ThinkPads.
If booting the recent MacBookPro13 or MacBookPro14 hardware with the power cable already attached or not changing the power states, the Linux power management code has behaved fine. But a kernel bug opened up last December was started when a user realized excessive interrupts were being caused after plugging into power on an already booted MacBook Pro. The report mentioned, "as soon as I plug in the power the interrupt count starts to increase by about 5000/second...When this happens, the CPU starts spending about 20% in interrupts, and it leads to other issues such as unloading modules taking very long (1 minute) (the longer this has been going on, the longer the module unload takes)."
Well, issues (un)plugging laptops sort of defeats much of the purpose of a portable computer... Nearly one year later, this problem has been tracked down. A fix has been queued into the Linux power management subsystem's "-next" tree ahead of Linux 4.20~5.0 kernel. The patch message on the fix explains:
On Apple machines, plugging-in or unplugging the power triggers a GPE for the EC. Since these machines expose an SBS device, this GPE ends up triggering the acpi_sbs_callback(). This in turn tries to get the status of the SBS charger. However, on MBP13,* and MBP14,* machines, performing the smbus-read operation to get the charger's status triggers the EC's GPE again. The result is an endless re-triggering and handling of that GPE, consuming significant CPU resources.
The one line fix is queued for the next Linux kernel release to take care of this problem. But with recent MacBook Pro laptops there are still other problems ranging from touchpad/trackpad not working out of the box, wireless issues, no mainline Touch Bar driver, and other problems. It seems the days are long gone when modern Apple MacBook Pros would play nicely out-of-the-box with Linux distributions. If you want a nice quality Linux laptop in 2018, you're best off looking at the Linux-friendly Dell XPS laptops or generally respectable Lenovo ThinkPads.
17 Comments