Ubuntu – After upgrade from Ubuntu 16 to 18.04, systemd-udevd uses 100% CPU

18.04cpu loadnvidia

Since I upgraded from Ubuntu 16 to 18.04, CPU usage is high. Sometimes 100% cpu usage, and when that happens we can't do anything. If we check on the process systemd-udevd, we find it is using 100% CPU. I have followed an answer to this question: Ubuntu 18.04 systemd-udevd uses high CPU, conflict with nvidia graphics but now I can't use any browser.

I ran the command sudo mv /lib/udev/rules.d/71-nvidia.rules ~ and now I can't install a new browser or use the old one, and I still have this 100% CPU issue.

Here's a detailed list of my system hardware

Note: I have installed Mint 19 version and found the same issue. I just downgraded to Mint 18.3 and CPU and memory usage are fine. Many others also reported the same issue.

Best Answer

I also faced the same issue after upgrade on my DELL laptop.

My workaround

Soon after booting, stopping and starting systed-udev eliminates all bind and unbind problems and response drastically improves. I used the following two commands in sequence:

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

My understanding

Before all hardware is discovered properly, bind/unbind starts executing when no procedures are available and does not get reinitialized. After stopping and starting, it gets all the procedures in place. Probably, this is a boot sequence problem.