I've got bumblebee 3.0 installed, I started chromium-browser with optirun and although I have closed chromium off, the card is still on. How can I know which process is using nvidia module that prevents the card from switching off?

root@magneto:/# cat /proc/acpi/bbswitch 
0000:01:00.0 ON
root@magneto:/# tee /proc/acpi/bbswitch <<<OFF
root@magneto:/# cat /proc/acpi/bbswitch 
0000:01:00.0 ON
root@magneto:/# dmesg |tail -1
[92040.608982] bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF

2 Answers 2


I've noticed that Flash sometimes turns the card automatically on and then loads the driver. If the module is not used you can safely unload it after which you manually disable the card:

sudo rmmod nvidia
sudo tee /proc/acpi/bbswitch <<<OFF

If the driver cannot be unloaded, it will display:

ERROR: Module nvidia is in use

There is not much that you can do about that. A CUDA application of Xorg server is possible using it. You can check it with:

lsof -n -w -t /dev/nvidia*

It'll return a PID list unless you remove -t.

  • I killed the process, rmmod'ed the nvidia modules and did a 'tee' again and it's now off. Thanks!
    – 719016
    Mar 4, 2012 at 12:46

Just to add on to the awesome answer by @Lekensteyn, if you want to kill all the processes that are using your nvidia modules to free them up, you can run the following:

sudo kill -9 $(lsof -n -w -t /dev/nvidia*)

This was able to solve the CUDA error: all CUDA-capable devices are busy or unavailable error for me! Specifically I was able to unlock nvidia-modeset and nvidia-uvm for use in GPA-intensive processing in Jupyter Notebook, hope this helps anyone else who runs into a similar issue!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .