I'm LUbuntu 22.04.2 LTS user. When I insert ERGO LTE USB Wi-Fi router WO2-CRC9, the laptop (HP Probook) stays very-very hot independently on the current load, the fan runs continuously, and the battery will discharge during 1...2 h instead of 5 h, even if the Wi-Fi function of the router is switched off.
The systemd-udevd process consumes near to 100% of the processor. The fragment of the "TOP" output is:
PID КОР. PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
**** root ** 0 154488 136432 4664 R 99,7 0,2 70:54.78 systemd-udevd
**** root ** 0 25060 4840 2272 S 22,3 0,0 15:36.65 systemd-udevd
...
The solution from https://unix.stackexchange.com/questions/233247/why-is-systemd-udev-pegging-my-cpu by editing /lib/udev/rules.d/69-libmtp.rules isn't helpful.
udevadm monitor
UDEV [104.881828] change /devices/pci0000:00/0000:00:08.1/0000:03:00.3/usb1/1-2/1-2:1.5/host0/target0:0:0/0:0:0:0/block/sr0 (block)
KERNEL[104.890895] change /devices/pci0000:00/0000:00:08.1/0000:03:00.3/usb1/1-2/1-2:1.5/host0/target0:0:0/0:0:0:0/block/sr0 (block)
KERNEL[104.898884] change /devices/pci0000:00/0000:00:08.1/0000:03:00.3/usb1/1-2/1-2:1.5/host0/target0:0:0/0:0:0:0/block/sr0 (block)
KERNEL[104.914578] change /devices/pci0000:00/0000:00:08.1/0000:03:00.3/usb1/1-2/1-2:1.5/host0/target0:0:0/0:0:0:0/block/sr0 (block)
#(infinite loop)
It appears that after disconnecting virtual CD-ROM with Windows drivers, UDEV tries to find it causing infinite loop.
The workaround is using the macro (After upgrade from Ubuntu 16 to 18.04, systemd-udevd uses 100% CPU) after each insertion of the modem, not at each system start:
#!/bin/sh
sudo systemctl stop systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket
sleep 5
sudo systemctl start systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket
This also allows remove and insert the modem without restarting. But the macro should be repeated. How to avoid the additional manual operations?
With best regards. Viktor.