解决方法

解决方法

Ubuntu 18.04 systemd-udevd 使用高 CPU,与 wifi 冲突,我还遇到了 systemd-udevd CPU 使用率不断上升的问题,这个问题只能通过 (sudo) 终止特定进程来暂时解决。不过,我的问题不是与 wifi 有关,而是与 NVIDIA 显卡有关:

阅读时udevadm monitor会重复出现如下行:

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)

并检查less /var/log/syslog给出重复的版本:

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.

驱动程序是最新的,笔记本电脑上的所有其他软件都已升级(今天)到最新版本,所以我不确定是什么导致了这个问题。我的图形没有任何问题(除了由于此过程导致 CPU 使用率升高时出现延迟),所以我很困惑。

我怎样才能停止这种重复,从而停止消耗 CPU?

答案1

我通过运行解决了这个问题

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

并重新启动,这样 udev 就不会尝试加载 nvidia 模块。

到目前为止一切顺利,不过我怀疑这可能对图形产生了一些我不知道的影响。

答案2

解决方法

启动后立即运行以下命令:

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

它在我的戴尔笔记本电脑上运行良好,所有问题都消失了。

答案3

我遇到了几乎完全相同的问题。这最终为我解决了这个问题:

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

编辑:重启后问题又出现了。我还没有解决方案

相关内容