本文地址:blog.lucien.ink/archives/542

发现每次执行 nvidia-smi 都特别慢,发现是需要 nvidia-persistenced 常驻才可以,这个并不会在安装完驱动之后自动配置,需要手动设置一个自启。

cat <<EOF >> /etc/systemd/system/nvidia-persistenced.service
[Unit]
Description=NVIDIA Persistence Daemon
Wants=syslog.target

[Service]
Type=forking
ExecStart=/usr/bin/nvidia-persistenced
ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl start nvidia-persistenced
systemctl enable nvidia-persistenced
最后修改:2023 年 09 月 13 日
谢谢老板!