This question has been asked many times here and in other forums. I tried everything I could find, nothing works.

I'm trying to use my NVIDIA GT540M on Ubuntu instead of Intel Graphics, but I have two screens: my laptop screen and a external monitor (HDMI).

If I uninstall the nvidia drivers, the external monitor works again (because Intel is being used).

When I install the drivers to use the nvidia card, the external monitor doesn't work. Nvidia X Server Settings doesn't recognize it and neither Ubuntu settings. If I set Intel Graphics on Nvidia X Server Settings, the external monitor doesn't work too. The only way it works is if I uninstall the driver completely.

I'm using the 367.57 driver.

xrandr output

Screen 0: minimum 8 x 8, current 1366 x 768, maximum 16384 x 16384
LVDS-1-1 connected primary 1366x768+0+0 344mm x 194mm
   1366x768      60.06*+
   1360x768      59.80    59.96  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   960x600       60.00  
   960x540       59.99  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   800x512       60.17  
   700x525       59.98  
   640x512       60.02  
   720x450       59.89  
   640x480       60.00    59.94  
   680x384       59.80    59.96  
   576x432       60.06  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
VGA-1-1 disconnected
HDMI-1-1 disconnected
DP-1-1 disconnected

lspci | grep VGA output

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev a1)


Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"

Section "Device"
    Option         "Coolbits" "28"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"

Section "Screen"
    Identifier "intel"
    Device "intel"

Section "Device"
    Option         "Coolbits" "28"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "CoolBits" "31"
    Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x2; PowerMizerDefaultAC=0x2"
    Option "OnDemandVBlankInterrupts" "true"

The line Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x2; PowerMizerDefaultAC=0x2" is needed because my GPU needs to be underclocked to work properly. Works fine on my laptop screen, I believe it's not the problem. If I remove the line, the screen freezes 10 seconds after login.

I have tried to

  • somebody made a few notes here about dual screen/external monitor setup with your 540M this might help try reading it http://www.linlap.com/alienware_m11x – WooJoo Feb 27 '17 at 1:05
  • @WooJoo unfortunately, the instructions on that page enable the external screen and disables the laptop screen. In my case, I want to keep both working, because I use the second monitor as extended screen. – Henrique Arthur Feb 27 '17 at 19:17

I fixed the problem by returning to Ubuntu GNOME 16.04, for some reason it doesn't work on Ubuntu 16.10.

I did a clean install, installed nvidia drivers, and used the same xorg.conf described in the question. The second monitor was recognized on reboot by the System Settings and NVIDIA X Settings.

This also fixed a long-time problem that I had, which was the mouse blinking (even if I disabled the ghost monitor - more info on Mouse cursor flickering and disappearing)

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.