I have a laptop with Ubuntu 15.04 on it and Nvidia video card GT840M. I've installed video driver in a way like this:
sudo apt-get purge nvidia*
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-340
sudo apt-get install nvidia-settings
sudo nvidia-xconfig
After that I've installed bumblebee and primus
sudo apt-get install bumblebee
sudo apt-get install bbswitch-dkms
sudo apt-get install primus
sudo systemctl enable bumblebeed
In /etc/modules-load.d/modules.conf
I've added lines
i915
bbswitch
And in /etc/modprobe.d/nouveau.conf
I've added line
blacklist nouveau
Almost everything works fine. In nvidia-settings (sudo gksu nvidia-settings
) I selected CPU I want to use Intel (power saving mode)
and my discret video card is off by default (as I wanted, because I need my laptop at the university where I don't have a lot of sockets to charge it and turned on video card uses a lot of energy). When I start my PC and type lspci -v
I have a message
03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev ff) (prog-if ff)
!!! Unknown header type 7f
Which says that my card is turned off -- everything is fine now.
The problem is
when I try to use my card, e.g. primusrun firefox
it turns on and when I stop firefox it doesn't turn off back. So I keeps turned on and uses a lot of power. The only way to turn it off back is
# echo OFF > /proc/acpi/bbswitch
But I don't want to do it all the time I use it. How can do it automatically?
This problem has occured only when I started to use Ubuntu 15.04. Before it (I had Ubuntu 14.10) it worked fine.