I'm using Ubuntu 12.04 on a DELL XPS with NVIDIA Optimus. I know that questions related to this have been asked several times, and I followed many tutorials and instructions but couldn't make this work.
I tried to install several different versions of NVIDIA proprietary drivers (xswat, xorg edgers, download directly through the site etc.) and none would work (NVIDIA module never gets loaded, and I can't even open nvidia-settings).
I read that NVIDIA drivers are incompatible with this hybrid architecture, so I don't care if I'll use the NVIDIA or Intel card (I'm not using this laptop for gaming, no need for super graphics), I just want the second monitor to work.
I also tried manually changing the xorg.conf file, based on a sample xorg.conf I've found here but it didn't work, so I rolled back the changes; I don't know if the problem was that I just don't know how to properly configure this file, or it wouldn't work regardless of the change made. Removing xorg.conf also doesn't work (i.e. Ubuntu works normally, but still no second monitor).
Here are the outputs of my environment, please let me know if you need anything else:
$ lspci -v | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev a1) (prog-if 00 [VGA controller])
$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 32767 x 32767
LVDS1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.0*+ 59.9
1680x1050 60.0 59.9
1600x1024 60.2
1400x1050 60.0
1280x1024 60.0
1440x900 59.9
1280x960 60.0
1360x768 59.8 60.0
1152x864 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
$ lshw -c display
PCI (sysfs)
*-display UNCLAIMED
description: VGA compatible controller
product: GF108 [GeForce GT 540M]
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
configuration: latency=0
resources: memory:f0000000-f0ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:3000(size=128) memory:f1000000-f107ffff
*-display
description: VGA compatible controller
product: 2nd Generation Core Processor Family Integrated 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:53 memory:f1400000-f17fffff memory:e0000000-efffffff ioport:4000(size=64)
/etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 310.44 (buildmeister@swio-display-x86-rhel47-07) Wed Mar 27 15:56:20 PDT 2013
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "built-ins"
EndSection
Section "Module"
Load "extmod"
Load "dri2"
Load "record"
Load "dbe"
Load "glx"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "InputDevice"
Identifier "Touchpad"
Driver "synaptics"
Option "Device" "/dev/input/mouse1"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.06"
Option "MaxSpeed" "0.12"
Option "AccelFactor" "0.0010"
Option "SHMConfig" "on"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "AccelMethod" # <str>
#Option "Backlight" # <str>
#Option "DRI" # <str>
#Option "ColorKey" # <i>
#Option "VideoKey" # <i>
#Option "Tiling" # [<bool>]
#Option "LinearFramebuffer" # [<bool>]
#Option "SwapbuffersWait" # [<bool>]
#Option "TripleBuffer" # [<bool>]
#Option "XvPreferOverlay" # [<bool>]
#Option "HotPlug" # [<bool>]
#Option "RelaxedFencing" # [<bool>]
#Option "ZaphodHeads" # <str>
#Option "TearFree" # [<bool>]
#Option "PerCrtcPixmaps" # [<bool>]
#Option "FallbackDebug" # [<bool>]
#Option "DebugFlushBatches" # [<bool>]
#Option "DebugFlushCaches" # [<bool>]
#Option "DebugWait" # [<bool>]
#Option "BufferCache" # [<bool>]
Identifier "Card0"
Driver "nvidia"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
parts of /var/log/Xorg.0.log (let me know if you need the full content)
[ 26.008] (II) intel(0): Output HDMI1 has no monitor section
[ 26.120] (II) intel(0): Output HDMI1 disconnected
[ 25.876] (II) Module glx: vendor="NVIDIA Corporation"
[ 25.876] compiled for 4.0.2, module version = 1.0.0
[ 25.876] Module class: X.Org Server Extension
[ 25.876] (II) NVIDIA GLX Module 310.44 Wed Mar 27 15:10:55 PDT 2013
[ 25.876] (II) Loading extension GLX
[ 25.876] (II) LoadModule: "dri"
[ 25.876] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[ 25.876] (II) Module dri: vendor="X.Org Foundation"
[ 25.876] compiled for 1.11.3, module version = 1.0.0
[ 25.876] ABI class: X.Org Server Extension, version 6.0
[ 25.876] (II) Loading extension XFree86-DRI
[ 25.876] (II) LoadModule: "nvidia"
[ 25.991] (WW) Warning, couldn't open module nvidia
[ 25.991] (II) UnloadModule: "nvidia"
[ 25.991] (II) Unloading nvidia
[ 25.991] (EE) Failed to load module "nvidia" (module does not exist, 0)
[ 25.991] (==) Matched intel as autoconfigured driver 0
[ 25.991] (==) Matched vesa as autoconfigured driver 1
[ 25.991] (==) Matched fbdev as autoconfigured driver 2
[ 25.991] (==) Assigned the driver to the xf86ConfigLayout
[ 25.991] (II) LoadModule: "intel"
[ 25.991] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 25.991] (II) Module intel: vendor="X.Org Foundation"
[ 25.991] compiled for 1.11.3, module version = 2.21.6
[ 25.991] Module class: X.Org Video Driver
[ 25.991] ABI class: X.Org Video Driver, version 11.0
[ 25.991] (II) LoadModule: "vesa"
[ 25.992] (WW) Warning, couldn't open module vesa
[ 25.992] (II) UnloadModule: "vesa"
[ 25.992] (II) Unloading vesa
[ 25.992] (EE) Failed to load module "vesa" (module does not exist, 0)
[ 25.992] (II) LoadModule: "fbdev"
[ 25.992] (WW) Warning, couldn't open module fbdev
[ 25.992] (II) UnloadModule: "fbdev"
[ 25.992] (II) Unloading fbdev
[ 25.992] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 25.992] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[142.165188] add /devices/virtual/net/lo/queues/rx-0 (queues)
KERNEL[142.165252] add /devices/virtual/net/lo/queues/tx-0 (queues)
UDEV [142.165547] add /devices/virtual/net/lo/queues/tx-0 (queues)
UDEV [142.165571] add /devices/virtual/net/lo/queues/rx-0 (queues)
Please help me, I don't want to get back to Windows!
udevadm monitor
and then connect/disconnect your external monitor. Do you get any event (should be something likeUDEV [????.????] change /devices/?????/drm/card0 (drm)
)?udevadm monitor
, when connecting the cable. The strange thing is that if I disconnect and connect again, I don't see any new events, just the first one - is this normal? Oh, and "Detect Displays" still doesn't detect anything.