如何启用 nvidia-persistenced.service?

如何启用 nvidia-persistenced.service?

我正在尝试在配备 GTX 1060 的 Ubuntu Budgie 17.10 上安装 CUDA。我在这部分说明上卡住了:

http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#power9-setup

我已将示例粘贴到指定文件中。当我尝试运行

sudo systemctl enable nvidia-persistenced

我得到:

The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified.

作为参考,这是我的文件的确切内容:

[Unit] 
Description=NVIDIA Persistence Daemon
Wants=syslog.target 

[Service] 
Type=forking
PIDFile=/var/run/nvidia-persistenced/nvidia-persistenced.pid
Restart=always
ExecStart=/usr/bin/nvidia-persistenced --verbose
ExecStopPost=/bin/rm -rf /var/run/nvidia persistenced 

[Install] 
WantedBy=multi-user.target

我对这些文件一无所知,这就是我只是复制和粘贴的原因 - 所以如果你能告诉我哪里出了问题我会很高兴!

答案1

我可能有点晚了,但我希望这对其他人有所帮助。

据我所知,您没有 POWER9 系统,除非您的系统是超级计算机。

根据这个关联

作为一名Linux新手,我也在这个问题上困惑了很长时间。

希望我能帮上忙。

答案2

您可能需要在进行更改后先重新加载 systemd 管理器配置。

sudo systemctl daemon-reload

然后您可以尝试启用/启动该服务。

相关内容