I have reinstalled Ubuntu 12.04 to make a new attempt in getting the dual monitor working with my nvidia optimus. I already installed bumblebee.
But still it isn't working as it should. The monitor from the laptop has not the right configuration and neither has the external Monitor (which runs with VGA). And if I try to change the resolution I get black screens and can't do anything against it. If I reboot though the old settings are back. I have searched a lot for a solution and tried quite a few things but nothing has changed. Any ideas what I can do to get this thing working?

2 Answers 2


There are still issues to work out with optimus, like what David Airlie calls "reverse optimus" to make HDMI and other video outputs work straight from the nVidia card:

Please join this team if you are new by clicking on the "Join Team" link at the right of the Launchpad page. It's important to have as many users in the community as possible to request for appropriate support, even if you found a non-obvious way to make it work for you.


Checkout my scripts to enable/disable external monitors:


# You will need latest NVIDIA drivers installed. At the time of writing, version is 331.20. 
# On ubuntu 13.10, it looks like this:
sudo add-apt-repository ppa:xorg-edgers/ppa 
sudo apt-get update 
sudo apt-get install nvidia-331

# Now we need to install bumblebee:
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get install bumblebee bumblebee-nvidia bbswitch-dkms

# Reboot

# Intel-virtual-output tool

# First, you will need latest xf86-video-intel driver installed (2.99). Ubuntu 13.10 comes with it,
# so you don’t need to update driver in that case. However, what made all of this possible is the 
# latest release of intel-virtual-output tool, which comes bundled with xf86-video-intel driver 
# source. But, ubuntu’s package does not bundle it, and we need to compile it from source. One 
# MAJOR thing to note here is: DO NOT compile it from ubuntu’s deb-src package. That package is old,
# and current release has some major fixes for the tool that we will actually need in order to have
# everything working properly. So lets do it:

sudo apt-get install git xorg-dev git autoconf automake libtool
cd /usr/src
git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-intel
cd xf86-video-intel 
cd tools
sudo cp intel-virtual-output /usr/bin/ 
sudo chmod +x /usr/bin/intel-virtual-output

# Install augtool:
sudo apt-get install augeas-tools

Write this contents to the file /etc/bumblebee/dual-monitor/disable.aug:

set /augeas/load/PHP/incl[last()] /etc/bumblebee/bumblebee.conf
set /augeas/load/Xorg/incl[last()] /etc/bumblebee/xorg.conf.nvidia
set /files/etc/bumblebee/bumblebee.conf/bumblebeed/KeepUnusedXServer false
set /files/etc/bumblebee/bumblebee.conf/driver-nvidia/PMMethod auto
set /files/etc/bumblebee/bumblebee.conf/driver-nouveau/PMMethod auto
set /files/etc/bumblebee/xorg.conf.nvidia/ServerLayout/Option[last() + 1] "AutoAddDevices"
set /files/etc/bumblebee/xorg.conf.nvidia/ServerLayout/Option[last()]/value "false"
set /files/etc/bumblebee/xorg.conf.nvidia/ServerLayout/Option[last() + 1] "AutoAddGPU"
set /files/etc/bumblebee/xorg.conf.nvidia/ServerLayout/Option[last()]/value "false"
set /files/etc/bumblebee/xorg.conf.nvidia/Device/Option[last() + 1] "UseEDID"
set /files/etc/bumblebee/xorg.conf.nvidia/Device/Option[last()]/value "false"
set /files/etc/bumblebee/xorg.conf.nvidia/Device/Option[last() + 1] "UseDisplayDevice"
set /files/etc/bumblebee/xorg.conf.nvidia/Device/Option[last()]/value "none"

Write this contents to the file /etc/bumblebee/dual-monitor/enable.aug:

set /augeas/load/PHP/incl[last()] /etc/bumblebee/bumblebee.conf
set /augeas/load/Xorg/incl[last()] /etc/bumblebee/xorg.conf.nvidia
set /files/etc/bumblebee/bumblebee.conf/bumblebeed/KeepUnusedXServer true
set /files/etc/bumblebee/bumblebee.conf/driver-nvidia/PMMethod none
set /files/etc/bumblebee/bumblebee.conf/driver-nouveau/PMMethod none
rm /files/etc/bumblebee/xorg.conf.nvidia/ServerLayout/Option[. = "AutoAddDevices"]
rm /files/etc/bumblebee/xorg.conf.nvidia/ServerLayout/Option[. = "AutoAddGPU"]
rm /files/etc/bumblebee/xorg.conf.nvidia/Device/Option[. = "UseDisplayDevice"]
rm /files/etc/bumblebee/xorg.conf.nvidia/Device/Option[. = "UseEDID"]

Write this contents to the file /usr/local/bin/nvidia-enable:


sudo augtool --noload --file /etc/bumblebee/dual-monitor/enable.aug
sudo modprobe bbswitch
optirun true

Write this contents to the file /usr/local/bin/nvidia-disable:


PID=$(ps ax | grep Xorg | grep :8 | grep -v grep | awk '{print $1}')

# Kill the second X server.
if [ ! -z $PID ]; then
   sudo kill -15 $PID

# Now you need to turn off nvidia card completely.
if lsmod | grep -q nvidia; then
  sudo rmmod nvidia
sudo tee /proc/acpi/bbswitch <<<OFF
sudo augtool --noload --file /etc/bumblebee/dual-monitor/disable.aug
sudo service bumblebeed restart

Set perms:

sudo chmod +x /usr/local/bin/nvidia-enable
sudo chmod +x /usr/local/bin/nvidia-disable

Now you are ready to run: nvidia-enable and nvidia-disable to enable and disable Nvidia discrete card and external displays.

Original article that gets most of the credits.

  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – Stormvirux
    Apr 12, 2014 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.