For almost 11 months, i.e., from June’12, since i switched over to Linux Fedora from Windows, I have been having a lot of issues with my discrete nvidia graphics card. By issues, I mean huge amount of power consumption followed by heating.
After googling, I found that the default nouveau driver, which comes with my Linux distro, ain’t any good for the nvidia optimus technology, which results in an unnecessary drain of battery power. The battery lasted only for about an hour or so, and i had to use a cooling pad to keep my laptop cool.
I looked up the nvidia website, and downloaded the linux nvidia driver, but unfortunately, the driver didnt work, and I was welcomed with a system crash. (Now I fully support Linus Torvalds’s comment on nvidia)
However, I survived the crash because I previously had a backup of the nouveau driver and recovered my Fedora system.
When I diagnosed the power consumption using powertop, found that, the drain was almost 42W. At this juncture, it was getting really frustrating, and I blamed myself for buying a laptop with an nvidia card.
Yesterday, while i was again searching for some tool to fix this nvidia issue, I came across a really impressive project, https://github.com/Bumblebee-Project/bbswitch which saved my laptop from getting thrown away 🙂
Disabling the discrete nvidia graphics card
1. Get the source
Download the latest bbswitch source code from https://github.com/Bumblebee-Project/bbswitch/downloads
2. Unpack the archive
gzip -c bbswitch-x.y.z.tar.gz | tar xf -
3. Install dkms if you dont already have it
sudo yum install dkms
4. Change to the source directory
5. Compile and install bbswitch
make -f Makefile.dkms
6. Unload the nouveau driver
modprobe -r nouveau
7. Load bbswitch
8. Switch off the card
tee /proc/acpi/bbswitch <<< OFF
Now you are done switching off the graphics card, but still its good to double check for confirmation:
Get the status of the card
The output should be like this :
Automate the process on startup
You might want to automate this process on startup or else you will have to do this manually every time you boot into Linux
What i did was, i made use of the rc.local file in /etc/rc.d
This is what my rc.local file looks like:
#!/bin/sh #Turn off the nvidia graphics card modprobe -r nouveau modprobe bbswitch tee /proc/acpi/bbswitch <<< OFF
Note: To turn on the device :
tee /proc/acpi/bbswitch <<< ON
Note: To uninstall the bbswitch module :
make -f Makefile.dkms uninstall
Now, after switching off the graphics card, powertop shows me a discharge rate of about 10 – 15 W, and my battery lasts for almost 3:30 hours.
Hope this helps all those people stuck with the nvidia graphics card. 🙂