Skip to content

Instantly share code, notes, and snippets.

@meowtochondria
Created April 25, 2022 20:47
Show Gist options
  • Save meowtochondria/fa176732ef3b6daf805e97ad9c33e0cf to your computer and use it in GitHub Desktop.
Save meowtochondria/fa176732ef3b6daf805e97ad9c33e0cf to your computer and use it in GitHub Desktop.
CPU fan running hot with no real load

My linux laptop has had its fan constantly running every time i unplug and plug in my dock. It used to happen when my wired network port was not detected, but today it was detected but the fan was still running hot. So I spent some time and figured out a workaround.

Issue: ACPI keeps firing General Purpose Events which kernel does not really know how to handle. According to internet, this usually happens due a bug in BIOS or hardware.

Fingerprints:

  1. Fan is spinning a lot even with no apparent load.
  2. CPU usage is not too high. Internet had CPU usage quite high... like 90%. For me, it was just 1%
  3. kworker/??:??kacpi_notify is taking up 1% CPU.
  4. systemd-udevd process is churning in your fav process monitor. I used KDE's System Monitor utility.

Workaround:

  1. Find which General Purpose Event (gpe) are firing for you:
    /bin/sudo watch grep -r enabled /sys/firmware/acpi/interrupts/
    Example output:
    Every 2.0s: grep -r enabled /sys/firmware/acpi/interrupts/
    
    /sys/firmware/acpi/interrupts/gpe1D:       0         enabled      unmasked
    /sys/firmware/acpi/interrupts/ff_pwr_btn:       0  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe66:       7  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe46:       0  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe44:       0  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe6E: 1304750  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe62:       0  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe30:       8  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe6F:     223  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe6D:       0  EN     enabled      unmasked
    /sys/firmware/acpi/interrupts/gpe61:       4  EN     enabled      unmasked
    
  2. Notice the ones whose number keeps climbing. From above output, it is /sys/firmware/acpi/interrupts/gpe6E.
  3. Disable that/those interrupt(s).
    /bin/sudo -s
    echo "disable" > /sys/firmware/acpi/interrupts/gpe6E
    

You can also add this to a systemd unit and set it to start automatically on boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment