You are not logged in.

#1 2019-12-09 10:24:04

Abominas
Member
Registered: 2017-12-15
Posts: 3

High CPU usage from i2c_hid by irq/138-NPCE038 after linux 5.4.1

Hello,

I'm using a Lenovo Yoga 720-15IKB laptop, about 3 years old.
This Saturday, I noticed that the process "irq/138-NPCE038" is using at least 10% of my CPU at all times. It makes my battery last about half as long, because the laptop heats up enough to turn the fans on.

I googled "NPCE038" but the only relevant result (out of the 4 that show up) was an irc log, where the user, DebianTux, had a similar problem. They mentioned their issue being related to iio-sensor-proxy, but when I tried installing that package, it didn't fix the issue.

I checked dmesg, and found NPCE038 related i2c_hid. When I tried "rmmod i2c_hid", the CPU usage went back down, but this disabled the touchpad. This September, I replaced my old mouse with a G502 hero, but I'm pretty sure this is not the cause of the issue. For one, I leave the laptop idle often, and until this weekend, the CPU usage has been 0-0.75%. Also, I have Gentoo installed on another partition of the same laptop, and the issue is not present when I boot to it. Of course, I could be totally wrong.

I've uploaded dmesg's output and the contents of /proc/interrupts here: https://pastebin.com/nEfCYtkE
Please let me know if you need any other logs or if I should try any commands.

Does anyone know how to fix this? Is it a hardware/driver issue, or is it related to a recent update?

Edit: I used ALA and found that the issue was introduced on 12/03/19. I uploaded pacman's logs from updating to and from 12/02 to 12/03 in this pastebin: https://pastebin.com/3yzmgR3g

So now the issue appears to have been started by linux version 5.4.1.arch1-1. How can I fix this?

Thanks

Last edited by Abominas (2019-12-10 07:02:52)

Offline

#2 2019-12-11 20:32:30

Abominas
Member
Registered: 2017-12-15
Posts: 3

Re: High CPU usage from i2c_hid by irq/138-NPCE038 after linux 5.4.1

Bump.
I'm currently looking through i2c-hid-core.c. These commits look interesting:

commit fd70466d37bf3fe0118d18c56ddde85b428f86cf
Author: Kai-Heng Feng <kai.heng.feng@canonical.com>
Date:   Thu Nov 7 22:28:11 2019 +0800

    HID: i2c-hid: Reset ALPS touchpads on resume
   
    Commit 52cf93e63ee6 ("HID: i2c-hid: Don't reset device upon system
    resume") fixes many touchpads and touchscreens, however ALPS touchpads
    start to trigger IRQ storm after system resume.
   
    Since it's total silence from ALPS, let's bring the old behavior back
    to ALPS touchpads.

commit 0c8432236dea20a95f68fa17989ea3f8af0186a5
Author: Aaron Ma <aaron.ma@canonical.com>
Date:   Thu Nov 14 03:12:47 2019 +0800

    HID: i2c-hid: fix no irq after reset on raydium 3118
   
    On some ThinkPad L390 some raydium 3118 touchscreen devices
    doesn't response any data after reset, but some does.
   
    Add this ID to no irq quirk,
    then don't wait for any response alike on these touchscreens.
    All kinds of raydium 3118 devices work fine.

Hopefully I'll find the issue, but if anyone knows an easier way to fix please let me know.

Offline

#3 2019-12-11 20:54:44

loqs
Member
Registered: 2014-03-06
Posts: 19,097

Re: High CPU usage from i2c_hid by irq/138-NPCE038 after linux 5.4.1

If backporting those commits does not work https://bbs.archlinux.org/viewtopic.php … 6#p1877006 contains a setp by step to bisect 5.3 to 5.4.
Edit:
Possibly related:
https://bugzilla.kernel.org/show_bug.cgi?id=205745
https://bugzilla.kernel.org/show_bug.cgi?id=205793

Oh and welcome to the forums and please do not bump topics.

Last edited by loqs (2019-12-12 00:03:47)

Offline

#4 2019-12-12 01:00:06

Abominas
Member
Registered: 2017-12-15
Posts: 3

Re: High CPU usage from i2c_hid by irq/138-NPCE038 after linux 5.4.1

Sorry about that bump. But thanks for the great guide, and also for looking into this!

Yeah, those bugs seem related to my issue, but my touchpad works the same as usual with the current i2c_hid, it's just NPCE0388 that's causing problems. I don't know yet if the device still works on 5.4, since I've only had time to test using 5.3. But I turned on the debug parm for i2c_hid, and now I think NPCE0388 is the accelerometer and ambient light sensor, because NPCE0388 generates a burst of dmesg events when I shine a light or tilt the laptop.

On a sort-of unrelated note, I noticed that even without the irq issue, on linux 5.3 NPCE0388 takes a steady stream of about 8-10 inputs per second. I'm a noob when it comes to drivers, but that can't be good for batterly life, right? I haven't had time yet to figure out if that's abnormally high compared to the other drivers.

I'll have time to bisect later when I get home.
But since the issue definitely seems driver-related, I'm wondering if I can somehow disable just that device, until a patch comes out that fixes this?

Offline

#5 2019-12-12 14:53:38

MONVMENTVM
Member
Registered: 2007-10-06
Posts: 50

Re: High CPU usage from i2c_hid by irq/138-NPCE038 after linux 5.4.1

Yeah... blacklist that i2c_hid module and use libinput instead. smile

Offline

Board footer

Powered by FluxBB