With a new version of the kernel (2.6.28) and of Xorg (1.6.3), I am able to have a dual screen with my Intel GM45 graphics card. The monitors are plugged on the HDMI-1 and HDMI-2 ports of the docking station.
Note: you may be impacted by this bug.
the RandR way (recommended)
LVDS -> Dual head (docked)
You have to activate HDMI-1, desactivate LVDS, and then activate HDMI-2. Then you put HDMI-2 at the right of HDMI-1. I recommend arandr for this. If you don't desactivate LVDS , you will get the error:xrandr: cannot find crtc for output LVDSTo automate, here is a small shell script:
#!/bin/sh
xrandr --output HDMI-1 --auto
xrandr --output LVDS --off
xrandr --output HDMI-2 --auto
xrandr --output HDMI-2 --right-of HDMI-1
Dual head -> LVDS (before undocking)
To undock the laptop, first desactivate HDMI-2 and then activate LVDS. Here is a small script:
#!/bin/sh
xrandr --output HDMI-2 --off
xrandr --output LVDS --auto
xrandr --output HDMI-1 --off
the xorg.conf way
You can have dual head on startup with xorg.conf:
Section "Monitor"
Identifier "Monitor1"
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Monitor2"
Option "RightOf" "HDMI-1"
Option "DPMS"
EndSection
Section "Device"
Identifier "intel"
Driver "intel"
Option "AccelMethod" "UXA" # with kernel > 2.6.28 and the new graphics stack of Linux (GEM memory management)
Option "monitor-HDMI-1" "Monitor1"
Option "monitor-HDMI-2" "Monitor2"
## Note that LVDS is automatically switched off
EndSection