in linux

How to disable discrete graphics card in fedora ?

Whenever Linux and nVidia Optimus technology comes into picture, there is always pain in that. When I switched to Linux from windows on my optimus enabled laptop, I found lot of power consumption and heat dissipation.

Only way to stop that was to disable discrete graphics card. After wasting time on that for hours, I finally found the workaround to do that.

Disabling the discrete nvidia graphics card

  1. Get the source

Download bbswitch source code from https://github.com/Bumblebee-Project/bbswitch/downloads

  1. 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,

To Get the status of the card

cat /proc/acpi/bbswitch

The output should be like this :

  0000:01:00.0 OFF

That’s it!

Now you may want to automate the above steps on startup. To automate this on startup add the following lines in /etc/rc.d/rc.local

#!/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