index.html

Solution to kacpid high CPU usage

字数统计: 183阅读时长: 1 min
2020/01/08 Share

Locate the problem

I have observed that something on my laptop occasionally hog up one of my CPU core.

By list the processes, I believe the kacpid is responsible for this.

To find the culprit behind the process, watch -n "cat /proc/interrupts"

It is confirmed that the ACPI has some problem.
Now list the detail of acpi interrupts: for f in /sys/firmware/acpi/interrupts/*; do echo -ne "$f:\t\t" && cat $f; done

Found it! GPE 0x6F has obviously abnormal value.

Solution

First use a temporary solution to see if it solve the symptom.

1
2
sudo -s
echo "disable" > /sys/firmware/acpi/interrupts/gpe6F

The CPU usage drops to normal immediately.

But the above fix won’t be persist after reboot. You can add that command to a boot-up script, but it’s better to mask the interrupts use a kernel option.

1
2
3
4
sudo nano /etc/default/grub
# Add the option to the following line
GRUB_CMDLINE_LINUX_DEFAULT="acpi_mask_gpe=0x6F"
update-grub

Reboot.
Now verify the option has taken effect: cat /sys/firmware/acpi/interrupts/gpe6F
1
2
# It should display masked
0 enabled masked

Done.

EOF

CATALOG
  1. 1. Locate the problem
  2. 2. Solution