'Linux high cpu usage - htop shows 90% to 100% cpu usage

I installed a fresh Manjaro Linux on my laptop and it works okay but I noticed high CPU usage when i ran the htop command. One of the cores were constantly busy near 100% and the 2nd one was around 90% (I got 4 cores, the remaining 2 are running normally). The laptop is usable but my battery is draining faster than before.

I already found the solution and posting it below to hopefully help someone who is a Linux beginner like myself.



Solution 1:[1]

The solution was to create a systemd service that disables the problematic interrupt and executes automatically every time the system boots.

First I needed to identify the problematic interrupt by running:

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

I saw one of them (/gpe11) had this big number while all the others had 0

/sys/firmware/acpi/interrupts/gpe11:  7418350  STS disabled     unmasked

Then I created a service file:

$ cd /etc/systemd/system/
$ sudo touch disableInterrupts.service
$ sudo nano disableInterrupts.service

Then i wrote this inside disableInterrupts.service, pasted the path to the interrupt I found.

[Unit]
Description=Disables Interrupts

[Service]
ExecStart=/usr/bin/bash -c 'echo "disable" > /sys/firmware/acpi/interrupts/gpe11'

[Install]
WantedBy=multi-user.target

Then I enabled the service so it executes automatically when system is booted.

sudo systemctl enable disableInterrupts.service

Rebooted the computer and then run the htop again. CPU usage is normal now.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cpu1001