就像在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?
我通过运行解决了这个问题
并重新启动,以便 udev 不会尝试加载 nvidia 模块。
到目前为止,一切都很好,尽管我怀疑这可能对图形做了一些我不知道的事情。
解决方法
启动后不久,运行以下命令:
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
它在我的戴尔笔记本电脑上工作,所有问题都消失了。
我几乎遇到了确切的问题。这终于为我解决了:
编辑:重新启动后问题又回来了。我还没有解决方案