3

after either primusrun <any application> or optirun <any application> and then quitting, the discrete nVidia graphics card is still running.

optirun --status prints after everything is closed:

Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is on.

Is there any specific reason for this behavior?

Packages installed include bumblebee lib32-virtualgl lib32-nvidia-utils lib32-mesa-libgl mesa-demos bbswitch primus lib32-primus

My distro is Arch (Graphics: Intel HD 4000/ nVidia GT 750M).

Thanks in advance! :)

Alex
  • 335
  • 1
  • 4
  • 15

1 Answers1

3

I'm also using Arch and had the same problem a few weeks ago. I'm not a expert but I'd like to share what I did to turn it off.

I searched the internet for some solution and I read from one article I found (can't remember the URL) that bbswitch somehow fails to unload the nvidia module after activating the nvidia gpu when using optirun or primusrun.

In my case, from a fresh reboot of my laptop, nvidia gpu is powered down (which is what I'm expecting). Then if I run the command:

$ lsmod | grep nvidia  

It returns nothing. But if I use optirun or primusrun, then run the above command again, I get the following:

nvidia_modeset        708608  0
nvidia               8704000  1 nvidia_modeset  
drm                   286720  7 i915,drm_kms_helper,nvidia  

And if I run a command to check if the nvidia gpu is turn on using the command below:

$ cat /proc/acpi/bbswitch  

It tells me that the nvidia gpu is is ON even though I'm done using optirun or primusrun.

To turn the nvidia gpu OFF, do the following:

Unload the nvidia module.

# modprobe -r nvidia_modeset  

Then turn off nvidia gpu.

# tee /proc/acpi/bbswitch <<< OFF
devpro101
  • 31
  • 4
  • Thanks for this, I'll try this out as soon as i get my machine back in a few days :) – Alex Jan 01 '16 at 10:28
  • Okay i tried this out and it works. However is there a more permanent solution, so that the graphics card is turned off every time automatically? Like executing this script every time no more applications use bumblebee anymore? – Alex Jan 02 '16 at 11:50
  • By the way blacklisting `nvidia_modeset` did not help. (I created a file `/etc/modprobe.d/blacklist.conf` containing `blacklist nvidia_modeset`.) – Alex Jan 02 '16 at 15:32
  • Yeah I tried that too but didn't work..right now all I'm doing is manually turning it off, I'm also interested how on how to make it automatically turn off... – devpro101 Jan 03 '16 at 10:54