14

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?

user36196
  • 534
  • 3
    How? This was asked in May and the other asked three weeks ago so this was first – user36196 Sep 29 '18 at 09:12
  • I see. My apologies for not picking this up. However, allow the comment as it points to a related answer that has a valid fix. – crafter Sep 30 '18 at 15:18
  • It doesn't matter which question was first - if they are duplicates, the better one with more votes and views can be the target and the other closed against it. But this question doesn't seem to be a duplicate of that one, and there is no need for the comment to link it, because that question mentions this one in its body @crafter so they are linked in the sidebar – Zanna Sep 30 '18 at 19:34
  • Just a heads-up: A few days ago, an apt dist-upgrade installed nvidia-driver-410 (version 410.104-0ubuntu0~18.04.1) and the problem disappeared from my system. Up to that point, I used Y S Gupta's workaround. – Hermann Apr 22 '19 at 19:37

3 Answers3

8

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.

user36196
  • 534
  • That solution works if you do not need the Nvidia-driver.

    In case you have a laptop with Thunderbolt-3 and an Nvidia card in an external GPU housing (such as the Razer Core), doing this will make it impossible to use the Nvidia card when connected to the Razer Core.

    – Christian Hujer Aug 28 '18 at 21:38
7

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.

Uri Herrera
  • 14,866
Y S Gupta
  • 499
0

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

  • 1
    Just the remove command seems to have solved the issue for me (I don't have a nvidia card, but had one in the previous computer where I took over the HD from).... – Stefan Haustein Jun 16 '18 at 09:47