14.10 Dual Monitors are displayed as distorted single screen mode

I have very recently updated my Ubuntu OS from 14.04 to 14.10. I am running on an optimus enabled laptop, with Intel 4000 graphics and an nVidia 640M.

           *-display
            description: VGA compatible controller
            product: GK107M [GeForce GT 640M]
            vendor: NVIDIA Corporation
            physical id: 0
            bus info: pci@0000:01:00.0
            version: a1
            width: 64 bits
            clock: 33MHz
            capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
            configuration: driver=nvidia latency=0
            resources: irq:51 memory:d0000000-d0ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:3000(size=128) memory:d1080000-d10fffff

        *-display
         description: VGA compatible controller
         product: 3rd Gen Core processor Graphics Controller
         vendor: Intel Corporation
         physical id: 2
         bus info: pci@0000:00:02.0
         version: 09
         width: 64 bits
         clock: 33MHz
         capabilities: msi pm vga_controller bus_master cap_list rom
         configuration: driver=i915 latency=0
         resources: irq:47 memory:d2000000-d23fffff memory:c0000000-cfffffff ioport:4000(size=64)

Display hardware printout from lshw

When I plug in my mini-DisplayPort -> VGA adapter to my external monitor, Ubuntu attempts to expand my desktop. The image now appears on both screens, but the image itself looks like a severely distorted view of a single screen. When I attempt to press anything within the screen, it does not press, probably because the mapping of the actual screen to what is being shown is off. However, I can press the settings icon in the top right on both screens fine. In addition, the log in screen behaves fine in dual screen mode. My main monitor (build in) is 1920x1080, and the monitor I am adding on is 1600x1200. Does anyone have any suggestions? So far, I have reinstalled all nVidia drivers.


This seems to be an issue with Compiz. I got it working with the following procedure:

On CompizConfig Settings Manager, go to "General Options", then "Display Settings" and do the following:

  • Uncheck "Deteck Outputs"
  • In the Outputs array, set the resolutions of each of your screens. The numbers after the resolution "1920x1080+0+0" are the offset. It's important to add this offset according to your needs. I have two full HD screens, so I added the following configuration: 1920x1080+0+0 1920x1080+1920+0

The second output has an offset of 1920, because it is on the right side of the first output, which has a width of 1920.

Credits to Rockwalrus for finding it out.