Closed khfeng closed 5 years ago
Thanks!
I also added the following, or your change to debian/nvidia-compute-utils-430.nvidia-persistenced.service will be overwritten, when generated from debian/templates/nvidia-compute-utils-flavour.nvidia-persistenced.service.in:
index 5062a09..6ddf3b0 100644
--- a/debian/templates/nvidia-compute-utils-flavour.nvidia-persistenced.service.in
+++ b/debian/templates/nvidia-compute-utils-flavour.nvidia-persistenced.service.in
@@ -1,6 +1,7 @@
[Unit]
Description=NVIDIA Persistence Daemon
Wants=syslog.target
+StopWhenUnneeded=true
[Service]
Type=forking
This is also part of the new "430" branch now.
Didn't spot this, thanks!
Make sure each rule is comma seperated.
Use DEVPATH=="/bus/pci/drivers/nvidia", which is added after nvidia driver probes and binds to the device, to prevent any race condition.
Use TAG+="systemd" and ENV{SYSTEMD_WANTS} to let systemd manage the service.
Now systemd knows the persistenced service depends on sys-bus-pci-drivers-nvidia.device, we can use StopWhenUnneeded=true to let systemd stop the service once sys-bus-pci-drivers-nvidia.device disappears.