From 97925d20910cda0e7e39d00b73fc16144b0ef2f0 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sun, 25 Feb 2024 14:19:54 +0800 Subject: [PATCH] =?UTF-8?q?services:=20nvidia:=20No=20longer=20unload=20?= =?UTF-8?q?=E2=80=98nvidia=5Fuvm=E2=80=99=20module=20on=20powering=20off.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shepherd now handles kernel processes properly, no longer need to unload the module here. * nongnu/services/nvidia.scm (nvidia-shepherd-service)[requirement]: Remove 'user-processes. [one-shot?]: Set to #t. [stop]: Remove field. Signed-off-by: John Kehayias --- nongnu/services/nvidia.scm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nongnu/services/nvidia.scm b/nongnu/services/nvidia.scm index e69c420..13fa8b1 100644 --- a/nongnu/services/nvidia.scm +++ b/nongnu/services/nvidia.scm @@ -28,19 +28,16 @@ (define (nvidia-shepherd-service config) (let ((nvidia-driver (nvidia-configuration-driver config)) - (nvidia-smi (file-append nvidia-driver "/bin/nvidia-smi")) - (rmmod (file-append kmod "/bin/rmmod"))) + (nvidia-smi (file-append nvidia-driver "/bin/nvidia-smi"))) (list (shepherd-service (documentation "Prepare system environment for NVIDIA driver.") (provision '(nvidia)) - (requirement '(udev user-processes)) + (requirement '(udev)) + (one-shot? #t) (start #~(lambda _ (when (file-exists? #$nvidia-smi) - (system* #$nvidia-smi)))) - (stop - #~(lambda _ - (system* #$rmmod "nvidia_uvm"))))))) + (system* #$nvidia-smi)))))))) (define nvidia-service-type (service-type