Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I stop all processes using CUDA in Linux without rebooting? [closed]

Tags:

Is it possible to stop all running processing using the GPU via CUDA, without restarting the machine?

like image 664
Christopher Dorian Avatar asked Dec 04 '10 15:12

Christopher Dorian


People also ask

How do I restart my Nvidia driver Cuda without rebooting?

Replacing the nvidia driver itself can indeed be done without reboot with "sudo rmmod nvidia" & "sudo nvidia-smi". You should anyway make sure that no current cuda processes are running.


1 Answers

The lsof utility will help with this. You can get a list of processes accessing your NVIDIA cards with:

lsof /dev/nvidia* 

Then use kill or pkill to terminate the processes you want. Note that you may not want to kill X if it's running. On my desktop system, both X and kwin are also accessing the GPU.

like image 88
i_grok Avatar answered Sep 24 '22 07:09

i_grok