Ubuntu 18.04 systemd-udevd使用高CPU,与wifi冲突


26

我最近从Kubuntu 17.10切换到Kubuntu 18.04(新安装)。问题在于该进程systemd-udevd一直在运行,并消耗90-100%的CPU负载。摆弄所有设备后,我发现这是因为WiFi!打开WiFi后,该过程开始运行,CPU负载达到100%。但是,每当我关闭WiFi时,它就会降为零!top开启WiFi时的结果如下:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                           
  338 root      20   0   94336  51744   3120 S  44.7  0.6   0:35.50 systemd-udevd                                                     
  24957 root    20   0   67936  25248   2860 R  40.4  0.3   0:23.85 systemd-udevd                                                     
  328 root      19  -1  150720  53068  52264 S   4.3  0.7   0:07.61 systemd-journal

并运行:strace -p 338反复进行以下输出:

strace: Process 338 attached
strace: [ Process PID=338 runs in x32 mode. ]
strace: [ Process PID=338 runs in 64 bit mode. ]
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}, {EPOLLIN, {u32=4010060672, u64=94544830180224}}], 11, 0) = 2
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=484799898}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=112300760}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=112454363}) = 0
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}, {EPOLLIN, {u32=4010060672, u64=94544830180224}}], 11, 0) = 2
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=485376240}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=112893238}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=113047679}) = 0
recvmsg(7, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="", iov_len=0}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=24957, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, MSG_DONTWAIT) = 0
recvmsg(7, {msg_namelen=0}, MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=-853365251, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base="libudev\0\376\355\312\376(\0\0\0(\0\0\0\315\0\0\0\5w\305\345\261\2Ge"..., iov_len=40}, {iov_base="ACTION=unbind\0DEVPATH=/devices/p"..., iov_len=205}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, 0) = 245
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}], 11, 0) = 1
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=495431807}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=123814890}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=123945023}) = 0
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=0x000001}, msg_namelen=128->12, msg_iov=[{iov_base="unbind@/devices/pci0000:00/0000:"..., iov_len=8192}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=0, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, 0) = 243
getrandom("\x9c\x6d\x41\x2b\xb5\xf0\xf1\x9a\x32\xb3\x4a\x73\xee\x04\xff\x90", 16, GRND_NONBLOCK) = 16
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=126971116}) = 0
getrandom("\xaf\x35\x7a\x36\x01\x32\xa6\xe6\x13\x46\x4e\x22\xcc\x48\x77\x9b", 16, GRND_NONBLOCK) = 16
getrandom("\x48\x0b\xeb\xf1\xf0\x1c\xf1\x78\x89\xb7\x48\xe1\x84\x38\xc9\x3c", 16, GRND_NONBLOCK) = 16
getrandom("\x11\x06\x8c\x4a\xeb\xff\x84\x8e\x0c\x09\x00\x84\x62\x74\xfc\xd7", 16, GRND_NONBLOCK) = 16
getrandom("\xb5\x8e\x19\x16\xad\xf6\x16\x7e\x21\x66\x90\x12\x2d\x43\x46\x45", 16, GRND_NONBLOCK) = 16
getrandom("\x84\x7d\x47\x96\x50\x36\xad\x28\x06\x6e\xed\x33\xe0\x05\x57\x20", 16, GRND_NONBLOCK) = 16
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}, {EPOLLIN, {u32=4010060672, u64=94544830180224}}], 11, 0) = 2
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=504542288}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=131992368}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=132096027}) = 0
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}, {EPOLLIN, {u32=4010060672, u64=94544830180224}}], 11, 0) = 2
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=504955877}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=132438717}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=132555928}) = 0
recvmsg(7, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="", iov_len=0}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=24957, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, MSG_DONTWAIT) = 0
recvmsg(7, {msg_namelen=0}, MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=-853365251, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base="libudev\0\376\355\312\376(\0\0\0(\0\0\0\23\1\0\0\5w\305\345\261\2Ge"..., iov_len=40}, {iov_base="ACTION=bind\0DEVPATH=/devices/pci"..., iov_len=275}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, 0) = 315
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}], 11, 0) = 1
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=512870505}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=140367037}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=140494166}) = 0
recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=0x000001}, msg_namelen=128->12, msg_iov=[{iov_base="bind@/devices/pci0000:00/0000:00"..., iov_len=8192}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=0, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, 0) = 311
getrandom("\x21\xcd\x52\xae\x20\xa4\xe9\x0f\x2c\x3f\x68\x8a\x77\x65\xfb\x22", 16, GRND_NONBLOCK) = 16
getrandom("\xb5\x1f\x43\xf7\x14\x3e\x29\x6c\xdd\x95\xd5\x64\xec\xec\x66\xca", 16, GRND_NONBLOCK) = 16
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=141295429}) = 0
getrandom("\xe7\x73\x2e\xc2\x5d\x71\x93\x8a\xd0\xf4\x5f\xd7\x91\x1f\x7b\x00", 16, GRND_NONBLOCK) = 16
getrandom("\xe4\xd4\xd3\x2c\xa2\xa1\x0c\x96\x6e\x6a\x34\x9c\x50\x06\x3d\x43", 16, GRND_NONBLOCK) = 16
getrandom("\xb0\x7f\xf7\x93\x1f\xa6\x6d\x2e\x01\xfb\x21\x97\x4b\xe8\x85\x14", 16, GRND_NONBLOCK) = 16
getrandom("\x3f\x94\x2b\x17\x01\x8f\x88\x2e\x08\xa0\x9d\xd0\xef\x4f\x0e\x9a", 16, GRND_NONBLOCK) = 16
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}, {EPOLLIN, {u32=4010060672, u64=94544830180224}}], 11, 0) = 2
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=519062044}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=146474265}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=146513033}) = 0
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}, {EPOLLIN, {u32=4010060672, u64=94544830180224}}], 11, 0) = 2
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=519231922}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=146636530}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=146675297}) = 0
recvmsg(7, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="", iov_len=0}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=24957, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, MSG_DONTWAIT) = 0
recvmsg(7, {msg_namelen=0}, MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=-853365251, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base="libudev\0\376\355\312\376(\0\0\0(\0\0\0\315\0\0\0\5w\305\345\261\2Ge"..., iov_len=40}, {iov_base="ACTION=unbind\0DEVPATH=/devices/p"..., iov_len=205}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, 0) = 245
epoll_wait(10, [{EPOLLIN, {u32=4010170080, u64=94544830289632}}], 11, 0) = 1
clock_gettime(CLOCK_REALTIME, {tv_sec=1524848329, tv_nsec=525080911}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1045, tv_nsec=152528058}) = 0
clock_gettime(CLOCK_BOOTTIME, {tv_sec=1045, tv_nsec=152611810}) = 0
....

运行udevadm monitor重复打印以下内容:

KERNEL[1464.842652] bind     /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0 (usb)
KERNEL[1464.844393] unbind   /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0 (usb)
UDEV  [1464.845340] bind     /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0 (usb)
KERNEL[1464.857728] bind     /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0 (usb)
KERNEL[1464.858361] unbind   /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0 (usb)
....

并且运行journalctl反复返回:

Apr 27 05:22:09 amir-pc systemd-udevd[359]: Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3
Apr 27 05:22:09 amir-pc upowerd[1339]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0
-- Logs begin at Fri 2018-04-27 05:22:09 +0430, end at Fri 2018-04-27 21:37:15 +0430. --
Apr 27 05:22:09 amir-pc systemd-udevd[359]: Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3
Apr 27 05:22:09 amir-pc upowerd[1339]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0
Apr 27 05:22:09 amir-pc systemd-udevd[359]: Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3
Apr 27 05:22:09 amir-pc upowerd[1339]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0
....

运行dmesg收益:

[  441.582359] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  441.582361] usb 3-1.3: Product: Dell Wireless 370 Bluetooth Mini-card
[  441.582363] usb 3-1.3: Manufacturer: Dell Computer Corp
[  450.803644] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.811642] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.819653] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.826650] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.833668] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.841644] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.848630] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.856628] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.863632] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.871611] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.881629] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.888616] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.896634] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.903596] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.910611] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.917595] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.926603] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.933598] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.942616] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.949606] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.957363] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.964607] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.973581] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.980582] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.987582] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  450.994561] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  451.004574] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  451.009525] ERROR @wl_cfg80211_scan : 
[  451.009527] WLC_SCAN error (-22)
[  451.010550] usb 3-1.2: usbfs: USBDEVFS_CONTROL failed cmd hid2hci rqt 33 rq 9 len 4 ret -71
[  451.020078] usb 3-1: USB disconnect, device number 14
[  451.020081] usb 3-1.1: USB disconnect, device number 15
[  451.076974] usb 3-1.2: USB disconnect, device number 16
[  451.077105] usb 3-1.3: USB disconnect, device number 19
[  796.468102] usb 3-1: new full-speed USB device number 20 using uhci_hcd
[  796.672318] usb 3-1: New USB device found, idVendor=0a5c, idProduct=4500
[  796.672322] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  796.672325] usb 3-1: Product: BCM2046B1
[  796.672328] usb 3-1: Manufacturer: Broadcom
[  796.674239] hub 3-1:1.0: USB hub found
[  796.676385] hub 3-1:1.0: 3 ports detected
[  796.976059] usb 3-1.1: new full-speed USB device number 21 using uhci_hcd
[  797.109323] usb 3-1.1: New USB device found, idVendor=413c, idProduct=8157
[  797.109332] usb 3-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  797.116785] input: HID 413c:8157 as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/0003:413C:8157.000B/input/input25
[  797.176461] hid-generic 0003:413C:8157.000B: input,hidraw0: USB HID v1.11 Keyboard [HID 413c:8157] on usb-0000:00:1a.0-1.1/input0
[  797.256314] usb 3-1.2: new full-speed USB device number 22 using uhci_hcd
[  797.396307] usb 3-1.2: New USB device found, idVendor=413c, idProduct=8158
[  797.396315] usb 3-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  797.405072] input: HID 413c:8158 as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/0003:413C:8158.000C/input/input26
[  797.464858] hid-generic 0003:413C:8158.000C: input,hidraw3: USB HID v1.11 Mouse [HID 413c:8158] on usb-0000:00:1a.0-1.2/input0
[  797.564507] IPv6: ADDRCONF(NETDEV_UP): wlp4s0: link is not ready
[  797.944045] usb 3-1.3: new full-speed USB device number 23 using uhci_hcd
[  803.296508] usb 3-1.3: unable to read config index 0 descriptor/all
[  803.296515] usb 3-1.3: can't read configurations, error -110
[  803.376039] usb 3-1.3: new full-speed USB device number 24 using uhci_hcd
[  808.672986] usb 3-1.3: unable to read config index 0 descriptor/all
[  808.672993] usb 3-1.3: can't read configurations, error -110
[  808.673984] usb 3-1-port3: attempt power cycle
[  809.280029] usb 3-1.3: new full-speed USB device number 25 using uhci_hcd
[  809.340944] usb 3-1.3: New USB device found, idVendor=413c, idProduct=8156
[  809.340948] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  809.340951] usb 3-1.3: Product: Dell Wireless 370 Bluetooth Mini-card
[  809.340954] usb 3-1.3: Manufacturer: Dell Computer Corp
[ 1337.985097] perf: interrupt took too long (2508 > 2500), lowering kernel.perf_event_max_sample_rate to 79500
[ 1387.269440] perf: interrupt took too long (3140 > 3135), lowering kernel.perf_event_max_sample_rate to 63500
[ 1454.553305] perf: interrupt took too long (3927 > 3925), lowering kernel.perf_event_max_sample_rate to 50750
....

并且运行/lib/systemd/systemd-udevd -D反复返回以下结果:

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
starting 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0'
seq 284188 queued, 'bind' 'usb'
seq 284189 queued, 'unbind' 'usb'
'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0'(err) 'error: switching device '/sys//devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0' failed.'
Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0' failed with exit code 1.
seq 284184 processed
seq 284185 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:1a.0/usb3/3-1/3-1.2/3-1.2:1.0'
seq 284190 queued, 'bind' 'usb'
seq 284191 queued, 'unbind' 'usb'

我刚安装的Kubuntu使用的是内核版本4.15.0-20-generic,我的笔记本电脑是Dell Studio XPS1640。WiFi使用的是bcmwl-kernel-source 6.30.223.271+bdcom-0ubuntu4驱动程序(降级为以前的可用驱动程序无法解决问题)。

值得一提的是,没有连接USB设备,只有无线鼠标,这没问题(断开连接不会影响问题)。但是如前所述,关闭WiFi总是会使高CPU负载消失。

Answers:


22

我在Dell XPS Studio 1340上安装了Ubuntu 18.04 LTS(AMD64),但遇到了同样的问题。我已经通过从BIOS完全禁用蓝牙来解决问题。我知道这不是解决方案,而是解决方法,但是它对我有用,因为我很少使用蓝牙。

它看起来像是内核或systemd中的错误,但尚未修复:


不幸的是,由于php和mysql库中的某些冲突,我不得不降级到17.10,所以我无法测试建议。但是看来,提出的解决方案解决了这个问题。所以我接受它作为正确的答案。感谢您的输入。
Firouziam

我重新安装了kubuntu 18.04进行了测试。它工作正常,现在cpu风扇像婴儿一样在睡觉!感谢您的建议。
Firouziam

1
在Dell Inspiron上经历过同样的事情。它也影响着Kali Linux Rolling :(
Neo Elit

禁用蓝牙解决了我的运行OpenSUSE(内核4.17.14)的Precision M4400的问题。谢谢!
Helrich

18

解决方法:

引导后立即运行以下命令:

sudo systemctl stop systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket
sudo systemctl start systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket

它可以在我的戴尔笔记本电脑上使用。


确认这也对我有用。在我的情况下,错误与蓝牙无关,而与重复执行的某些nvidia卡有关。
astrojuanlu

据我了解,在正确发现所有硬件之前,如果没有可用的过程且不会重新初始化,则绑定/取消绑定开始执行。停止并启动后,它完成了所有步骤。可能是启动顺序问题。
YS古普塔'18

5

正如前面的答案中已经提到的,它与最佳的 Dell Wireless 370蓝牙无关,我的Dell Studio XPS 1645也受到它的影响。

不仅蓝牙支持已经坏了几年,现在内核驱动程序中还出现了一个新问题,影响了CPU使用率。

我只想补充一点,而不是删除/lib/udev/rules.d/97-hid2hci.rules文件,最好创建一个空文件:

touch /etc/udev/rules.d/97-hid2hci.rules

这样可以保证在bluez软件包更新后该问题不会再次出现。

附带一提,我已经在ebay上花了一两英镑买了一个蓝牙加密狗,但我当然希望笔记本电脑能够按预期工作。


谢谢。本周,ubuntu 18.04必须进行了一次bluez更新,因为CPU问题返回了,此规则文件也是如此。我将按照您的建议创建虚拟文件。
user795750

5

就我而言,这个问题是由于bluez。打开Synaptic软件包管理器并搜索bluez,然后将其卸载。您的问题将得到解决。


4

我正在将Dell Studio 1737从Ubuntu 16.04升级到18.04,并找到了类似问题的答案。

我的系统很旧,在关闭之前几分钟不能忍受100%的CPU,因此我什至还没有看到18.04登录屏幕。这是一个艰难的过程!

ctrl+ alt+ f2给了我一个终端登录名,并top显示systemd-udevd是100%CPU。

less /var/log/syslog

显示

Process 'hid2hci --method=dell failed

一遍又一遍地。

hid2hci是蓝牙过程,而BT不是我需要的东西,它已被禁用。好奇。

我的近期目标是延长对这台计算机的访问。毫无疑问,专家最终会提出适当的解决方案,但我在Manjaro论坛上找到了这篇文章

我发现移除后该问题消失了/lib/udev/rules.d/97-hid2hci.rules(由bluez软件包提供)他们所指的设备包括Dell触摸板……我不知道触摸板与蓝牙有什么关系,或者为什么bluez在配置它们。

所以我mv“d /lib/udev/rules.d/97-hid2hci.rules...并重新启动后,sytemd-udevd目前表现良好。

只能将其视为临时解决方案,并且我不知道此更改是否会影响wifi或触摸板(我都不使用),或造成其他问题,但是我的处境比以前少了许多几个小时前!


4

我想我已经找到答案了。

/lib/systemd/systemd-udevd -D

应该在包含“ ... / 97-hid2hci.rules:”的无穷循环中打印垃圾:

如果是这样,请编辑 /lib/udev/rules.d/97-hid2hci.rules

并添加

ACTION=="add" 

在上述命令提到的行的前面。

它应该是这样的(我使用的是fedora 28,但问题看起来相同):

ACTION=="add", 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"

通过以上修复,一切都可以在我的旧Dell上完美运行。希望能有所帮助;)


我可以确认这在Latitude E5500上可以部分使用。高CPU使用率已经消失,实际上可以在设置中切换BT。奇怪的是,即使BT明确亮起(蓝色指示灯点亮,并且可以找到机器),设置菜单仍坚持BT已关闭,因此无法配对任何设备。
petkov.np

好了,这解决了这个问题。但是我可以知道确切添加的内容ACTION=="add"吗?
rootkea

0

您的设备或任何设备上的蓝牙应用程序确实与您的手机相同,您必须事先安装了第三方应用程序或升级了可处理蓝牙设备的应用程序bluez ...因此,重新启动后,它触发了蓝牙软件以发现任何范围内的蓝牙设备,但均未找到,因此可以重申...至少在我看来,它似乎正在遵循此确切程序

由于这条线,您的WiFi功能达到了100%

Dell Wireless 370 Bluetooth

Bluez应用程序正在寻找一个不存在的无线驱动程序,它可能已经消耗了更多的内存和处理能力。我相信您已经解决了问题;做得好!

如您所见,USB设备文件系统控件的USB文件系统由于未响应而失败,该命令正在使用(cmd)

有Android和IOS应用程序可通过人机交互(hci)隐藏称为keepsafe(hid)的视频和图像,而rqt是ROS的软件框架,用于管理屏幕上的各种窗口。

[450.803644] USB 3-1.2:USBFS:USBDEVFS_CONTROL失败cmd hid2hci rqt 33 rq 9 len 4 ret -71


0

我有一个我认为是相关的问题。在我做了一些清除过时的软件后,新安装的Xubuntu 18.04 i386系统无法启动。由于我的Dell Inspiron-530没有WiFi和蓝牙,因此我卸载了所有这些东西。然后,在冷启动期间,m / c会挂起,从而消耗cpu的负载并在项圈下变热。引导至恢复模式表明systemd-journald中存在错误(屏幕滚动得太快时看不到它是什么),并且每22秒挂起一条消息,指出cpu#0卡住并引用了systemd-udevd377。看到该线程中的所有内容后,我设法从实时DVD引导中完全关机,并通过恢复模式启动了桌面。看着突触,我发现尽管我离开了,但还是意外地删除了libbluetooth3-dbg我执行清除操作时的libbluetooth3。如果您尝试取出libbluetooth3,则它将取出网络管理器,但libbluetooth3-dbg没有此类警告。重新安装libbluetooth3-dbg解决了该问题。

我提供此信息是希望它可以为其他可能遇到类似问题的人提供一些启发。

g

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.