linux ubuntu systemd-udevd进程 cpu占用过高 解决方法

ubuntu 18.04 systemd-udevd进程CPU占用特别高,禁用WiFi可以解决,如下:


执行 udevadm monitor ,不断输出如下信息:

UDEV  [13756.376116] bind     /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
KERNEL[13756.380620] bind     /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
KERNEL[13756.381300] unbind   /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
UDEV  [13756.381674] unbind   /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
KERNEL[13756.392446] bind     /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
KERNEL[13756.393308] unbind   /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
UDEV  [13756.393898] bind     /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
KERNEL[13756.397263] bind     /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
KERNEL[13756.398300] unbind   /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)
UDEV  [13756.398561] unbind   /devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0 (usb)

执行 dmesg 输出内容如下:

[13756.340234] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.346204] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.354209] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.362221] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.367210] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.375214] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.381236] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.393229] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.398213] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.407212] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.413235] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.425200] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.430295] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.438214] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.443217] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[13756.454226] usb 8-2.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71

执行 sudo /lib/systemd/systemd-udevd -D ,会发现持续输出如下信息:

RUN 'hid2hci --method=dell --devpath=%p' /lib/udev/rules.d/97-hid2hci.rules:11
starting 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0'
seq 5913 queued, 'bind' 'usb'
'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0'(err) 'error: switching device '/sys//devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0' failed.'
seq 5914 queued, 'unbind' 'usb'
Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0' failed with exit code 1.
seq 5893 processed
seq 5894 running
IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:14
RUN 'hid2hci --method=dell --devpath=%p' /lib/udev/rules.d/97-hid2hci.rules:11
Process '/usr/sbin/obex-check-device 413c 8156' failed with exit code 1.
RUN 'VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers' /lib/udev/rules.d/60-virtualbox.rules:2
IMPORT builtin 'path_id' /lib/udev/rules.d/71-seat.rules:51
RUN 'uaccess' /lib/udev/rules.d/73-seat-late.rules:17
handling device node '/dev/bus/usb/008/017', devnum=c189:912, mode=0660, uid=0, gid=46
set permissions /dev/bus/usb/008/017, 020660, uid=0, gid=46
creating symlink '/dev/char/189:912' to '../bus/usb/008/017'
starting 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0'
starting 'VBoxCreateUSBNode.sh 189 912 e0 vboxusers'
seq 5915 queued, 'bind' 'usb'
'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0'(err) 'error: switching device '/sys//devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0' failed.'
seq 5916 queued, 'unbind' 'usb'
Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0' failed with exit code 1.
seq 5894 processed
'VBoxCreateUSBNode.sh 189 912 e0 vboxusers'(err) '/lib/udev/VBoxCreateUSBNode.sh: 35: test: Illegal number: e0'
seq 5895 running
RUN 'hid2hci --method=dell --devpath=%p' /lib/udev/rules.d/97-hid2hci.rules:11
starting 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0'
seq 5917 queued, 'bind' 'usb'
'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0'(err) 'Can't claim interface: Device or resource busy (16)'
'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0'(err) 'error: switching device '/sys//devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0' failed.'
Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2.2/8-2.2:1.0' failed with exit code 1.

这种情况,一般都算由于 Dell Wireless 370 Bluetooth 或者 Dell Wireless 1397 WLAN 驱动导致的,如下:

解决方法如下:

sudo rm -rf /lib/udev/rules.d/97-hid2hci.rules

执行完成后,就可以不禁用无线网卡了。

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值