Ubuntu 18.04 /w Macbook Pro: Kworker keeps hogging up my CPU

Just thought of dropping a question since this problem seems to have been around for quite some time.

Just now I have installed the new Ubuntu 18.04 on my Macbook Pro, and I notice the kworker hogging up a lot of CPU:

3411 root      20   0       0      0      0 R  84,4  0,0   6:12.23 kworker/0:0

Here's some other info about my setup:

lsb_release -a:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:        18.04
Codename:       bionic

uname -a:

Linux MacbookPro 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Now I searched Google for answers on this problem and found plenty, actually. The answer in this thread did the trick for me: Why does kworker cpu usage get so high?

All I had to do was disable gpe06 and the hogging kworker-process was gone. First I looked for the gpe causing the high CPU load:

grep . -r /sys/firmware/acpi/interrupts/

Then going through the list and finding the gpe that hogs up the resources and disabling it:

cp /sys/firmware/acpi/interrupts/gpe06 /root/gpe06.backup
echo "disable" > /sys/firmware/acpi/interrupts/gpe06

My problem is that when I boot the machine, the damned kworker is running again. I know I can just disable it each time manually, but was wondering if there's a better solution for this? I tried following the instructions on the Ask Ubuntu thread I linked above, but it seems to be an outdated guide on how to get this running on startup.

So, how do I make this a permanent solution so I don't have to disable the gpe06 each time I start the laptop?


Solution 1:

According to this : https://www.reddit.com/r/Ubuntu/comments/7uwz3r/1604_lts_vs_1710_on_2015_macbook_pro/dto1mtb/

this following "tricks" works fine for me (same machine, same problem, same gpe) :

sudo -s
crontab -e

and add this following line at the end :

@reboot echo disable > /sys/firmware/acpi/interrupts/gpe06