High cpu usage on kernel 4.14 and 4.15 from systemd-udevd which seems to be the synaptic touchpad driver

laptop
libinput
touchpad
dell

#1

Hi I’m looking for some assistance and not sure if this is a libinput, udev, or kernel driver bug but seems to be due to the synaptics touchpad. I submitted it bugs.manjaro.com about a month ago and it’s still and issue that the only solution I’ve found is reverting to the 4.13 kernels and only occurs on my laptop which is fairly old.

libinput Version: 1.9.3-1

Modalias

dmi:bvnDellInc.:bvrA11:bd03/31/2011:svnDellInc.:pnInspironN7010:pvrA11:rvnDellInc.:rn:rvrA11:cvnDellInc.:ct8:cvrA11:

It’s a Dell Inspiron 17R N7010

inxi -Fx
System:    Host: N7010 Kernel: 4.13.16-2-MANJARO x86_64 bits: 64 gcc: 7.2.0
           Desktop: KDE Plasma 5.11.4 (Qt 5.9.3) Distro: Manjaro Linux                                                                                      
Machine:   Device: portable System: Dell product: Inspiron N7010 v: A11 serial: N/A                                                                         
           Mobo: Dell model: N/A v: A11 serial: N/A BIOS: Dell v: A11 date: 03/31/2011                                                                      
Battery    BAT0: charge: 5.2 Wh 99.9% condition: 5.2/7.8 Wh (67%) model: SDI Dell status: Full                                                              
CPU:       Dual core Intel Core i5 M 460 (-HT-MCP-) arch: Nehalem rev.5 cache: 3072 KB                                                                      
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10110                                                                                
           clock speeds: max: 2534 MHz 1: 2534 MHz 2: 1199 MHz 3: 1999 MHz 4: 1199 MHz
Graphics:  Card: Intel Core Processor Integrated Graphics Controller bus-ID: 00:02.0
           Display Server: x11 (X.Org 1.19.5 ) driver: intel Resolution: 1600x900@60.28hz
           OpenGL: renderer: Mesa DRI Intel Ironlake Mobile version: 2.1 Mesa 17.2.6 Direct Render: Yes
Audio:     Card Intel 5 Series/3400 Series High Definition Audio driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.13.16-2-MANJARO
Network:   Card-1: Intel Centrino Advanced-N + WiMAX 6250 [Kilmer Peak] driver: iwlwifi bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: 00:23:15:20:9c:14
           Card-2: Qualcomm Atheros AR8152 v1.1 Fast Ethernet
           driver: atl1c v: 1.0.1.1-NAPI port: 2000 bus-ID: 04:00.0
           IF: enp4s0 state: down mac: f0:4d:a2:43:fd:cd
Drives:    HDD Total Size: 250.1GB (48.3% used)
           ID-1: /dev/sda model: Samsung_SSD_850 size: 250.1GB
Partition: ID-1: / size: 125G used: 106G (89%) fs: ext4 dev: /dev/sda3
           ID-2: swap-1 size: 8.37GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      No zfs RAID data available-other types not yet supported.
Sensors:   System Temperatures: cpu: 56.0C mobo: 0.0C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 204 Uptime: 40 min Memory: 2793.2/7784.7MB Init: systemd Gcc sys: 7.2.0
           Client: Shell (bash 4.4.121) inxi: 2.3.52 

I also have lots of other information gathered trying to figure this out but the short story is that the driver/device appears to be loading and unloading hundreds of times per second.

I’m hoping someone else can make sense of it and offer advice on submitting it to the correct place since I’m not sure how to classify it.

Journalctl 2 seconds - 220 lines long, as follows repeating

-- Logs begin at Thu 2017-11-23 21:16:31 EST, end at Tue 2017-12-05 13:23:29 EST. --
Dec 05 13:23:28 N7010 systemd-journald[229]: Suppressed 3094 messages from systemd-udevd.service
Dec 05 13:23:28 N7010 systemd-udevd[263]: Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0' failed with exit code 1.
Dec 05 13:23:28 N7010 systemd-udevd[263]: Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0' failed with exit code 1.
Dec 05 13:23:28 N7010 systemd-udevd[263]: Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0' failed with exit code 1.

udevadm info

P: /devices/platform/i8042/serio1/input/input9/event10
N: input/event10
E: DEVNAME=/dev/input/event10
E: DEVPATH=/devices/platform/i8042/serio1/input/input9/event10
E: ID_BUS=i8042
E: ID_INPUT=1
E: ID_INPUT_HEIGHT_MM=39
E: ID_INPUT_TOUCHPAD=1
E: ID_INPUT_TOUCHPAD_INTEGRATION=internal
E: ID_INPUT_WIDTH_MM=83
E: LIBINPUT_DEVICE_GROUP=11/2/7:isa0060/serio1
E: LIBINPUT_MODEL_JUMPING_SEMI_MT=1
E: LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD=1
E: LIBINPUT_MODEL_TOUCHPAD_VISIBLE_MARKER=1
E: MAJOR=13
E: MINOR=74
E: SUBSYSTEM=input
E: USEC_INITIALIZED=3971047

ps faux | grep systemd-udevd

root       254 99.3  1.5 195056 121328 ?       Rs   12:07  73:03 /usr/lib/systemd/systemd-udevd
root       257  0.0  0.0  84280  6936 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       258  0.0  0.1  84280  9572 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       259  0.0  0.1  84280  9084 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       260  0.0  0.1  84280  9180 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       261  0.0  0.1  80184  8140 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       262  0.0  0.0  80184  6712 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       263 29.6  0.1  80184  8876 ?        S    12:07  21:48  \_ /usr/lib/systemd/systemd-udevd
root       264  0.0  0.0  80184  7324 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       265  0.0  0.1  80184  8552 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       266  0.0  0.0  80184  7120 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       267  0.0  0.0  80184  7596 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       268  0.0  0.0  80184  6876 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       269  0.0  0.0  80184  7700 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       270  0.0  0.0  80184  7836 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       271  0.0  0.0  80216  7068 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd
root       272  0.0  0.0  80056  5916 ?        S    12:07   0:00  \_ /usr/lib/systemd/systemd-udevd

udevadm monitor for a really short time

grep -c bind touchpad-udev-issue-1.txt
1859

grep bind touchpad-udev-issue-1.txt |(head -2 && tail -2)
KERNEL[203.712698] unbind   /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0 (usb)
UDEV  [203.713554] unbind   /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0 (usb)
KERNEL[218.965080] unbind   /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0 (usb)
UDEV  [218.965590] unbind   /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0 (usb)

dmesg |grep -i synaptic

[    4.097005] psmouse serio1: synaptics: queried max coordinates: x [..5656], y [..4780]
[    4.165623] psmouse serio1: synaptics: Touchpad model: 1, fw: 7.4, id: 0x1c0b1, caps: 0xd04731/0xa40000/0xa0000/0x0, board id: 0, fw id: 630452
[    4.210207] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input9
[     6.954] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event14)
[     6.954] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
[     6.954] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput touchpad catchall"
[     6.954] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'
[     6.954] (**) SynPS/2 Synaptics TouchPad: always reports core events
[     6.955] (II) event14 - (II) SynPS/2 Synaptics TouchPad: (II) is tagged by udev as: Touchpad
[     6.955] (II) event14 - (II) SynPS/2 Synaptics TouchPad: (II) device is a touchpad
[     6.955] (II) event14 - (II) SynPS/2 Synaptics TouchPad: (II) device removed
[     6.986] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD, id 15)
[     6.986] (**) SynPS/2 Synaptics TouchPad: (accel) selected scheme none/0
[     6.986] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[     6.986] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[     6.987] (II) event14 - (II) SynPS/2 Synaptics TouchPad: (II) is tagged by udev as: Touchpad
[     6.987] (II) event14 - (II) SynPS/2 Synaptics TouchPad: (II) device is a touchpad
[     6.987] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/mouse2)
[  1302.018] (II) event14 - (II) SynPS/2 Synaptics TouchPad: (II) device removed
[  1304.331] (II) event14 - (II) SynPS/2 Synaptics TouchPad: (II) is tagged by udev as: Touchpad
[  1304.331] (II) event14 - (II) SynPS/2 Synaptics TouchPad: (II) device is a touchpad

Device information from libinput

Device:           SynPS/2 Synaptics TouchPad
Kernel:           /dev/input/event14
Group:            12
Seat:             seat0, default
Size:             84x39mm
Capabilities:     pointer 
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    none
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a

I have other things and perhaps missed some as well but would love any ideas and tips regarding the issue. Also it only seems to affect my laptop and no other installs. However I would find it hard to believe someone else is not having the issue too, or just is not on the new kernel yet with similar hardware.

Thanks in advance


#2

It doesn’t look like touchpad issue… You seem to have a wireless mouse, connected via usb adapter. Do you have an option to “disable touchpad when mouse connected” checked? If yes - uncheck it for now.

What is happening after hid2hci fail message?
journalctl -b | grep udevd -A 9 | tail


#3

Hi,
I’m a Gentoo user… but with the same problem… seems quite rare according to Google!

I found the problem went away after removing /lib/udev/rules.d/97-hid2hci.rules (provided by the bluez package)

# Variety of Dell Bluetooth devices - match on a mouse device that is
# self powered and where a HID report needs to be sent to switch modes
# Known supported devices: 413c:8154, 413c:8158, 413c:8162
ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", \
  ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \
  RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1"

The devices they refer there include the Dell touchpad… I have no idea what the touchpad has to do with bluetooth or why bluez is configuring them.


#4

Hi,
Have you add any other rule for udev?


#5

I can now confirm I was incorrect regarding the root cause. I had tried unplugging my mouse dongle, using rfkill on the devices (bluetooth, wifi, wimax), and a few other things with no effect. Until I disabled each one by one in the bios and can for sure now say that the bluetooth card is triggering the issue.

I do have that udev rule and noticed the same thing regarding the package around the time but forgot about adding that in.

yaourt -Qo /lib/udev/rules.d/97-hid2hci.rules
/usr/lib/udev/rules.d/97-hid2hci.rules is owned by bluez-hid2hci 5.47-3

Unfortunately life has gotten in the way for the last week to look at it further, but thank you for the replies. I will try to update again when I have some freetime.

I am interested in why it’s happening on 4.14 and 4.15 but not 4.13 and still want to look at the change logs as well. Regardless I can say 4.14 and 4.15 with bluetooth disabled in bios the load issue doesn’t exist. Also I believe it’s Dell 370 Bluetooth which is almost exactly the same as my Studio 1737 was except the interface, so I am curious if that is also affected.

I haven’t added any custom udev rules on this machine


#6

I had the same issue so i removed bluez-hid2hci to solve the problem but my bluetooth device wont work without this package.

Last kernel it worked fine was 4.9.xx
any kernel above this one has this cpu usage problem due to bluez-hid2hci =/

the process with high cpu usage was systemd-udevd

my newer laptop with a newer bluetooth device works without this package so no problem till now


#7

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.