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