Disable your discrete nvidia card in Linux Fedora


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

cd bbswitch-x.y.z

5. Compile and install bbswitch

make -f Makefile.dkms

6. Unload the nouveau driver

modprobe -r nouveau

7. Load bbswitch

modprobe 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

cat /proc/acpi/bbswitch

The output should be like this :

0000:01:00.0 OFF

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:

#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. 🙂


3 thoughts on “Disable your discrete nvidia card in Linux Fedora

  1. Anonymouse

    I’m getting this when entering “make -f Makefile.dkms”:

    Building module:
    cleaning build area…
    make KERNELRELEASE=3.13.6-200.fc20.x86_64 KVERSION=3.13.6-200.fc20.x86_64…(bad exit status: 2)
    Error! Bad return status for module build on kernel: 3.13.6-200.fc20.x86_64 (x86_64)
    Consult /var/lib/dkms/bbswitch/0.5/build/make.log for more information.
    make: *** [build] Errore 10

    as of Fedora 20, updated on 26/03/2014. I tried with bbswitch-0.5.
    So Bumblebee does not support this kernel? That’s… unfortunate.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s