Ubuntu 18.04 systemd-udevd uses high CPU, conflict with nvidia graphics [duplicate]

Like in Ubuntu 18.04 systemd-udevd uses high CPU, conflict with wifi, I also have issues with an increasing CPU use of systemd-udevd, which is only temporarily resolved by (sudo) killing the specific process. However, my issue is not with the wifi, but with NVIDIA graphics:

Reading udevadm monitor gives repeated lines like:

KERNEL[408.860342] remove   /module/nvidia (module)
KERNEL[408.901437] add      /module/nvidia (module)
KERNEL[408.916478] remove   /module/nvidia (module)
UDEV  [408.944573] add      /module/nvidia (module)
UDEV  [408.969459] remove   /module/nvidia (module)
KERNEL[409.039276] add      /module/nvidia (module)
KERNEL[409.060769] remove   /module/nvidia (module)

and checking the less /var/log/syslog gives repeated versions of:

May 13 00:09:28 Lenovo-ideapad-100-15IBY kernel: [28462.698688] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
May 13 00:09:28 Lenovo-ideapad-100-15IBY kernel: [28462.699064] NVRM: No NVIDIA graphics adapter found!
May 13 00:09:28 Lenovo-ideapad-100-15IBY kernel: [28462.699186] nvidia-nvlink: Unregistered the Nvlink Core, major device number 240
May 13 00:09:28 Lenovo-ideapad-100-15IBY systemd-udevd[17923]: Process '/sbin/modprobe nvidia-modeset' failed with exit code 1.
May 13 00:09:28 Lenovo-ideapad-100-15IBY kernel: [28462.776222] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
May 13 00:09:28 Lenovo-ideapad-100-15IBY kernel: [28462.776574] NVRM: No NVIDIA graphics adapter found!
May 13 00:09:28 Lenovo-ideapad-100-15IBY kernel: [28462.776690] nvidia-nvlink: Unregistered the Nvlink Core, major device number 240
May 13 00:09:28 Lenovo-ideapad-100-15IBY systemd-udevd[17923]: Process '/sbin/modprobe nvidia-drm' failed with exit code 1.
May 13 00:09:28 Lenovo-ideapad-100-15IBY systemd-udevd[17923]: Process '/sbin/modprobe nvidia-uvm' failed with exit code 1.
May 13 00:09:28 Lenovo-ideapad-100-15IBY systemd-udevd[17923]: Process '/usr/bin/nvidia-smi' failed with exit code 12.
May 13 00:09:28 Lenovo-ideapad-100-15IBY systemd[1]: nvidia-persistenced.service: Start request repeated too quickly.
May 13 00:09:28 Lenovo-ideapad-100-15IBY systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
May 13 00:09:28 Lenovo-ideapad-100-15IBY systemd[1]: Failed to start NVIDIA Persistence Daemon.

The drivers are up-to-date, and all other software on the laptop has been upgraded (today) to the latest versions, so I'm not sure what could be causing this issue. I'm not having any problems with the graphics (apart from lag when the CPU usage gets high because of this process), so I'm at a loss.

How can I stop this repeating, and thus swallowing CPU?


I solved this problem by running

sudo mv /lib/udev/rules.d/71-nvidia.rules ~

and rebooting, so that udev doesn't try to load the nvidia module.

So far, so good, though I suspect this has probably done something to the graphics that I won't be aware of.


Workaround

Soon after booting, run the following commands:

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

It worked in my Dell laptop, and all the problems are gone.


I had nearly the exact problem. This finally solved it for me:

sudo apt-get remove nvidia*
sudo apt-get install --reinstall nvidia-driver-390

Edit: After rebooting the problem came back. I don't have a solution yet