Dynamic Dual monitor with Xrandr PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Bart Dorlandt   
Saturday, 19 July 2008 18:51

Due to a colleague of mine I had to figure out how to use a second monitor and instead of cloning the screen use it as an extension to the primary monitor.

So, I told him I already had something for that, but it was static (and after testing it again, it didn't even work anymore :( ). Here is a link to the configurations I used before on my Dell Latitude D610. But he didn't want it to be static or to restart gdm for it, so after some searching on google I found xrandr. These steps are tested on a Dell Latitude D610. This laptop has a intel video card (driver: intel). Intel also describes how to use the xrandr tool.

You can use xrandr -q to see information about the connected monitors. This is the output for my laptop with connecting an other monitors.

$ xrandr -q
Screen 0: minimum 320 x 200, current 3000 x 1200, maximum 3000 x 1200
VGA connected 1600x1200+1400+0 (normal left inverted right x axis y axis) 367mm x 275mm
1600x1200      60.0*+   59.9  
1280x1024      75.0     59.9  
1152x864       74.8  
1024x768       75.1     60.0  
800x600        75.0     60.3  
640x480        75.0     60.0  
720x400        70.1  
LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 286mm x 214mm
1400x1050      60.0*+   50.0  
1280x800       60.0  
1280x768       60.0  
1024x768       60.0  
800x600        60.3  
640x480        59.9  
TMDS-1 disconnected (normal left inverted right x axis y axis)
TV disconnected (normal left inverted right x axis y axis)

Before we can enable the secondary monitor. You will have to adjust your xorg.conf.

NOTE: be changing to the following configuration you won't be able to use compiz anymore !!!!

In the subsection Display of section screen you'll need to modify the file to make it look like this.:

Section "Screen"
SubSection "Display"
Virtual         3000 1200
Modes           "1600x1200" "1400x1050"
EndSubSection
EndSection

After restarting gdm, you can use a command like this to enable your external monitor right of the laptop with a resolution of 1280x1024. If you do not use this command in your xorg.conf you will get the following error:

$ xrandr --output VGA --auto --mode 1600x1200 --rate 60.0 --right-of LVDS

If you don't know what virtual modes you need to put in your xorg.conf you may use Urandr. This is a graphical frontend for xrandr (Check the site for the installation file and information). This tool will change your config with the correct values.

if only the laptop panel is connected, you'll see a screen like this:

urandr
Last Updated on Friday, 13 February 2009 15:54
 


Related items: