Disable the Optimus discrete graphics GPU in Ubuntu using bbswitch

I’ve recently made the mistake of purchasing the Asus K56VM laptop.

Asus K6VM (vicpc)

I call this purchase a mistake because as well as an excellent spec (3rd gen. i7 processor, excellent screen), this laptop also comes with nvidia’s Optimus graphic card setup.

Optimus Prime (Wikipedia)

In case you’re not familiar with the Optimus setup, it basically means that your laptop contains 2 graphic cards – 1 that’s built in to the Intel processor, and 1 discrete standalone. Given the proper drivers, and taking into account workload and power consumption, your OS can seamlessly toggle between the 2 cards.

If you use Windows as your OS, everything works nice and dandy; If you use a Linux-based OS, you’re in for a world of pain:

  • Both GPUs are on and active.
  • The HDMI output is “hardwired” to the discrete GPU.
  • The VGA output is “hardwired” to the internal GPU.
  • Only the VGA output works by default.
  • You can work with only one output at a time.
  • You can only toggle between outputs using an external project such as Bumblebee.

THAT’S RIGHT BROTHER, A WORLD OF PAIN

So I decided to just go and disable the nvidia GPU and exclusively use the internal one; this will save me from a lot of hassle and waste of power.

Installing bbswitch

bbswitch is a sub-module of the Bumblebee project; it allows you to easily activate and disable the discrete GPU.
Because bbswitch operates as a kernel module, we’ll install it using the DKMS framework so that the module will also survive kernel upgrades.

We will first add the Bumblebee PPA to APT’s repository list:

root@mandromeda:~# apt-add-repository "deb http://ppa.launchpad.net/bumblebee/stable/ubuntu YOUR_UBUNTU_VERSION_HERE main"

root@mandromeda:~# apt-add-repository "deb-src http://ppa.launchpad.net/bumblebee/stable/ubuntu YOUR_UBUNTU_VERSION_HERE main"

Update APT’s indices:

root@mandromeda:~# apt-get update

And then install bbswitch:

root@mandromeda:~# apt-get install bbswitch-dkms

Permanently switching off the discrete card

Now we need to make sure that none of nvidia’s driver modules are loaded (both original and alternative), and we will then configure the bbswitch module to switch off the discrete GPU when loaded.

Edit /etc/modprobe.d/blacklist.conf by appending to it:

# Blacklist the alternative nvidia module
blacklist nouveau

# Blacklist the original nvidia module
blacklist nvidia

Then edit /etc/modules by appending to it:

# Switch off discrete GPU
bbswitch load_state=0

Applying the changes

Finally we will apply the changes we made to the kernel module configurations.

Update the initial ramdisk by running:

root@mandromeda:~# update-initramfs -u

Then restart. The discrete GPU should now be permanently disabled.

Advertisements

5 thoughts on “Disable the Optimus discrete graphics GPU in Ubuntu using bbswitch

  1. (for power users in Linux), can you not also just do it the other way around?
    ie: “… DISABLE that Intel-piece-of-crap, and just exclusively use nvidia GPU ? ”
    Or,
    is the fate of all Linux users forever stuck with “optirun “, all the effin’ time… 😦

    Either way, Mr Torvalds was right-on with what he said about Nvidia “FU” !

  2. I preferred to disable the nivida card because I don’t need a strong GPU in my work. Using it exclusively meant emitting more heat and consuming more power

  3. Ok, stupid question here. What do you mean by permanently? Does that mean if I disable it, will it be disabled in Windows system too?

    I have a Dell inspiron 15 7559 laptop. I ran into the problem of booting into black screen. Installing drivers form nvidia.com created even more problems. So I am also deciding to disable it. But the thing is I have a dual boot system and do gaming in windows and if I disable the nvidia card in such a way that it is gone in windows too then the laptop will be piece of junk and I would have to cry a lot.

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