100% CPU usage with Nvida drivers

Hi, i am a linux newbie and have EndeavourOS installed on a late 2013 Macbook Pro which has a 750M NVidia card (as well as onboard graphics). When i first installed i didn’t opt for the NVidia drivers and everything worked fine apart from dragging UI windows around and scrolling wasn’t very smooth.

I thought the slowness was probably down to the generic video driver (Nouveau?) so decided to re-install with the NVidia option and everything was perfect (or so i thought). After a few minutes i noticed that the fan on the laptop was constantly running and a little investigation revealed that one of the CPUs was permanently at close to 100%.

The offending process was:-

[root]kworker/0:2+kacpi_notify

I then did a little digging online and found this article about a similar issue in Ubuntu

The output from grep . -r /sys/firmware/acpi/interrupts/ revealed that the count for /sys/firmware/acpi/interrupts/gpe16 was non-zero and increasing rapidly (this was just after a few seconds), i’m not sure what this number represents but i’m guessing it is bad ?:-

sys/firmware/acpi/interrupts/gpe16: 1326 STS enabled unmasked

I then disabled gpe16 as suggested in the article using the command below (as root):-

echo disable >sys/firmware/acpi/interrupts/gpe16

This solved the problem for me (the count ceased to increase and cpu usage returned to normal):-

/sys/firmware/acpi/interrupts/gpe16: 1668 STS disabled unmasked

I haven’t noticed any side affects, everything seems to be working perfectly and i really like EndeavourOS, hopefully this might help others who encounter a similar issue.

A couple of questions:-

  1. How do issues like this get fed back for fixing in a future release ?

  2. What is the best way of executing the “echo disable >sys/firmware/acpi/interrupts/gpe16” command once a boot time only, i currently have it wrapped up in a c program owned by root and executing via a sudo command in /etc/profile but this seems to get executed more than once for example when using su - ?

Thanks in advance.

1 Like

Thanks for the tip and your hard work!

There probably are many ways to implement this, but a systemd timer and service is the first that comes to mind. Systemd timer has lots of features. The trigger at boot could be for example OnBootSec=10sec (but don’t take that as the only choice!).

More info about this with:

   man systemd.timer

Note also that in folder /usr/lib/systemd/system there are lots of real life examples of systemd services and timers. Reading them can give you much help and ideas.
A systemd timer+service is typically just two small files.

For having this in the future release: if you can create (for example) a working systemd service+timer, then we can consider adding that to our repo (but no promises yet! :wink: ). Or, you might want to publish it yourself in the AUR (Arch User Repository).

2 Likes