I'm using:
- Alienware M14xR2 laptop running Ubuntu 14.04
- 2 * DELL U2412M monitors attached via HDMI and Mini Display Port
- Optimus graphics (Intel + nVidia GeForce GT 650M) running with nvidea-340 and nvidia-prime, with Prime setup in nvidia-settings GUI to use the NVidia GPU
- built-in laptop monitor disabled
Unfortunately, the monitors only work successfully in the default mirrored setup - I have the following issues trying to get a dual external screen extended desktop to work:
- nvidia-settings GUI can only see one monitor on the X Server Display Config page. System Display GUI can see both displays but can only mirror the displays successfully. By fiddling with Display GUI and ARandR, I temporarily managed to get an extended desktop working, but NVidia GUI still only sees one of the monitors and if I try to reboot with 2 monitors attached, the GUI is totally glitched and unusable after login.
- During boot, the system just uses the left monitor (via HDMI i/f) for display, so I presume this is treated as the primary display. However, after boot, it appears the system switches to using the Display Port for the primary display and the system will not let me have the Ubuntu launcher only on the left (HDMI) display. The only options that work are for having the launcher on both or just on the right (Display Port) monitor. I tried to forcefully fix the issue with the primary monitor incorrectly being set to the right monitor by changing the primary monitor switch in ~/.config/monitors.xml, however this does not work and causes both monitors to appear at strange resolutions and glitch badly with uncoordinated mouse input.
Running /usr/lib/nvidia-340/bin/nvidia-xconfig --query-gpu-info
gives
Number of GPUs: 1
GPU #0:
Name : GeForce GT 650M
UUID : GPU-...
PCI BusID : PCI:1:0:0
Number of Display Devices: 1
Display Device 0 (DFP-0):
EDID Name : DELL U2412M
Minimum HorizSync : 30.000 kHz
Maximum HorizSync : 83.000 kHz
Minimum VertRefresh : 50 Hz
Maximum VertRefresh : 61 Hz
Maximum PixelClock : 170.000 MHz
Maximum Width : 1920 pixels
Maximum Height : 1200 pixels
Preferred Width : 1920 pixels
Preferred Height : 1200 pixels
Preferred VertRefresh : 60 Hz
Physical Width : 520 mm
Physical Height : 320 mm
Running xrandr --query
gives
Screen 0: minimum 8 x 8, current 3120 x 1920, maximum 16384 x 16384
DP-0 connected primary 1200x1920+1920+0 left (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 60.0*+
...
DP-1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected
1600x900 60.0 + 40.0
...
DP1 disconnected
DP2 disconnected
HDMI1 connected 1920x1200+0+0 518mm x 324mm
1920x1200 60.0*+
...
HDMI2 disconnected
VGA1 disconnected
VIRTUAL1 disconnected
Running lspci | grep VGA
gives
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 650M] (rev a1)
My xorg.conf is almost empty but I believe 14.04 automatically detects those settings.