PDA

View Full Version : Dual head setup for laptop that works in and out of the dock



voodoodoc
12th November 2008, 04:48 PM
I want to use my laptop at work in dual head mode, plugging 2 LCDs into the docking station, where I have a dvi and a vga port.

I also want to be able to take the laptop out of the docking station and have the display revert back to just working on the laptop. For now I'll settle for just getting dual head working. Xorg does a good job autoconfiguring for the display type when its just 1 thing plugged in, but not so much with two monitors.

One other detail, the LCD panels I want to use are different sizes, one is wide screen the other is not. Here is my xorg.conf, any input is appreciated:



2
3 Section "ServerLayout"
4 Identifier "Default Layout"
5 Screen "Screen0"
6 Screen "Screen1" RightOf "Screen0"
7 InputDevice "Keyboard0" "CoreKeyboard"
8 Option "xinerama" "on"
9 Option "clone" "off"
10 EndSection
11
12 Section "InputDevice"
13 # keyboard added by rhpxl
14 Identifier "Keyboard0"
15 Driver "kbd"
16 Option "XkbModel" "pc105"
17 Option "XkbLayout" "us"
18 EndSection
19
20 Section "Device"
21 Identifier "Videocard0"
22 Driver "intel"
23 Screen 0
24 EndSection
25
26 Section "Device"
27 Identifier "Videocard1"
28 Driver "intel"
29 Screen 1
30 EndSection
31
32 Section "Monitor"
33 Identifier "Monitor0"
34 Option "DPMS"
35 EndSection
36
37 Section "Monitor"
38 Identifier "Monitor1"
39 Option "DPMS"
40 EndSection
41
42 Section "Screen"
43 Identifier "Screen0"
44 Device "Videocard0"
45 DefaultDepth 24
46 SubSection "Display"
47 Viewport 0 0
48 Depth 24
49 Modes "1440x900"
50 EndSubSection
51 EndSection
52
53 Section "Screen"
54 Identifier "Screen1"
55 Device "Videocard1"
56 DefaultDepth 24
57 SubSection "Display"
58 Viewport 0 0
59 Depth 24
60 Modes "1280x1024"
61 EndSubSection
62 EndSection


I suspect part of the problem is that xorg doesn't know which LCD to use for which "Monitor" section.

voodoodoc
13th November 2008, 08:41 PM
If it helps any I have the following in lspci:


00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

blacflame
16th December 2008, 10:21 PM
Voodoodoc,

In general you'll find lots of "dual head" faqs/howtos most are if you have problems with normal configurations, with your particular chipset/card I've had no problem with using XandR an Xorg configuration tool for multiple outputs (TV too). Here is the xorg link for support

http://wiki.x.org/wiki/Projects/XRandR

There is a few of them there, I suggest going with the second one Dual Head/IntelLinuxGraphics (http://intellinuxgraphics.org/dualhead.html) for an in depth direction on using the tool, or the third one Think Wiki, (http://www.thinkwiki.org/wiki/Xorg_RandR_1.2#Supported_drivers) just because I found it to be quick and direct with some tech detail.

Either way XrandR 1.2 is great if your using Intel or Radeon X drivers (Xorg) on a laptop w/ or w/o dock. So far I've have a latitude D630 (x64), T43, X60, T60P (current use, eyes are going bad needed the bigger screen)



One's who has no-where to go cannot be lost.....

voodoodoc
17th December 2008, 03:48 AM
xrandr is no help, it detects the second monitor but won't display anything on it. The Intel Linux Graphics llink you posted is no good, but I know what website your talkigng about, I've used a setup similar to what they talk about but no go either.

I do have a setup now where it acts like it wants to work, then DRI dumps core.

If I ever get some time I'll debug Xorg and see what the problem and update the post here.

moosetooth
17th December 2008, 02:15 PM
blacflame is correct. I have intel video on my laptop and that site (http://intellinuxgraphics.org/dualhead.html) was what I used to get dual head working.

In xorg.conf it's important that you have


# in the Section "Screen"
SubSection "Display"
Virtual 2048 2048
EndSubSection

Or an resolution large enough to encompass both screen resolutions.

Once you have that and restart X you can issue a command such as
xrandr --output TMDS-1 --above LVDS --mode 1920x1080 --rate 60

On my laptop this will cause my LCD tv to become the primary display while my laptop screen becomes secondary. My tv operates at 1920x1080 and my laptop at 1280x800

voodoodoc
17th December 2008, 05:49 PM
I can get my monitor an laptop display to do "dual head" but that's not what I'm interested in. I can also do the laptop and a TV no problem, I can delete xorg.conf and xorg is smart enough to figure it out for its self. The problem is the scenario where I have my two LCD displays one is wide screen the other is not.

For the record my xorg.conf file now looks like:

Section "Device"
Identifier "Videocard0"
Driver "intel"
#BusID "PCI:00:02.0"
#Screen 0
Option "monitor-VGA" "vga"
Option "monitor-TMDS-1" "dvi"
#Option "monitor-LVDS" "internal"
EndSection

Section "Monitor"
Identifier "dvi"
Option "Enable" "true"
EndSection

Section "Monitor"
Identifier "vga"
Option "RightOf" "dvi"
Option "Enable" "true"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "dvi"
DefaultDepth 24
Subsection "Display"
Depth 24
Virtual 2048 2048
EndSubSection
EndSection

moosetooth
17th December 2008, 05:52 PM
What's the output of xrandr when you have the two monitors plugged in?

blacflame
18th December 2008, 06:50 PM
Voodoo, i'm using wide screen's. You have to mod your xorg.conf with the virtual option in order for it to work, the 2048x2048 default of xrandr makes it numerical impossible to use a wide screen, (less you are using 640x480 on the laptop). Its putting a rectangle in a square....

xrandr -q
--------------------------------------------------------------------------------------------
Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 3360 x 1050
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 331mm x 207mm
1680x1050 60.0*+ 50.0
1280x1024 60.0
1280x960 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 434mm x 270mm
1680x1050 59.9*+
1400x1050 60.0
1280x1024 75.0 60.0 60.0
1280x960 60.0
1152x864 75.0 75.0
1024x768 75.1 75.0 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 75.0 60.0 59.9
720x400 70.1
------------------------------------------------------------------------------------------------

as you see i use too WFP LCD in high res.
Here's an example xorg.conf. this is one of the primary goals of xorg/xrandr is to get rid of the over complicated xorg.conf. You have no need for multiple screens monitors or devices any more. You simply add the appropriate output options, and the virtual screen.

xorg.conf
---------------------------------------------------------------------------------------------------
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
# keyboard added by rhpxl
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "Monitor" #<- I don't put the location of the monitor so i don't loose a screen (if i want to hot undock) I just open up a terminal when i log in and do "xrandr --output DVI-0 --auto --left-of" and when you #
Identifier "Monitor1" #<- undock just type in a "xrandr --output DVI-0 --off" and you pop it on out roll with it. #
VendorName "MonitorVendor"
VertRefresh 56.0 - 76.0
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "radeon"
Option "monitor-LVDS" "Monitor0"
Option "monitor-DVD-0" "Monitor1"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 3360 1050 #<- the key here is to add the two desired resolutions (the laptop's, and the monitor's), thats how you figure your Virtual screen, be aware pre intel 960 chipsets will crash with 2048+ sizes#
EndSubSection
EndSection
----------------------------------------------------------------------------------------------------

Hope this helps, you pretty much have everything else right on plus some, , just the also keep in mind, this particular laptop has an ATI card in it so the output references are a bit more sensible. Intel cards have DVI labeled as TMDS. (I failed to pay attention to this detail and was very confused for an hour or two!)

moosetooth
18th December 2008, 07:21 PM
2048x2048 isn't the default. It must be set.

For intel's site:


SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "640x480"
# This optional entry specifies the virtual screen resolution to be used.
# If this entry is not present, the virtual screen resolution will be set to
# accommodate all the valid video modes given in the Modes entry.
# There is a known issue that DRI doesn't work on pre-965 if maximum is larger than 2048x2048.
Virtual 2048 2048
EndSubSection


The intel driver currently has a max of 2048x2048 for the following reason:


# There is a known issue that DRI doesn't work on pre-965 if maximum is larger than 2048x2048.


So long as you position your screens correctly (one on top of the other) within the virtual screen space everything should fit fine. Also the only thing necessary in the xorg.conf is the virtual declaration. Everything else can be controlled with xrandr. I know. I do it all the time.

voodoodoc
19th December 2008, 06:22 PM
FINALLY got it working. Thanks for you guys' help. I simplified my xorg.conf to basically look like blacflame's.

xrandr -q still looked the same, said everything was connected, but the damn monitor just would not turn on. So I did what was in his xorg comments:


xrandr --output VGA --auto

xrandr: cannot find crtc for output VGA

So I ended up killing the laptop screen.

xrandr --output LVDS --off

Then I was able to run the following command to turn on and position things:

xrandr --output TMDS-1 --mode 1440x900 --pos 0x0 --output VGA --mode 1280x960 --pos 1440x0

So to summarize the key things to do are:
1. don't make xorg.conf any more complicated than it needs be should have a single ServerLayout, InputDevice, Monitor, and Screen section. The screen section needs to have the Virtual setting which needs to be set to accommodate both monitors.

2. Make sure xrandr detects all monitors as connected

3. Turn off laptop screen (LVDS)

4. Turn on and position the other monitor

blacflame
19th December 2008, 08:07 PM
Sweet, well done team.

Some additional heads up to you for performance issues.

If you want a higher res than 2048 then you'll start to take a performance hit after about 3100 with a higher end graphics set. not huge, but not game worthy, still productive though, ( i the occasion re-sync flash and a few delayed reactions, but all my systems have 2GBs or more of RAM (and i give max [bios dependent] for dedicated shared VRAM).

And I've got to know, moosetooth you really have stacked monitors for home/office workstations?

An experiment for ya moose, is drop your virtual line in xorg.conf. You'll still be able to extend your desktop no problem. just as long as you don't surpass 2048 horizontally or vertically.

moosetooth
19th December 2008, 08:27 PM
Not physically stacked no. That would be hilarious. Maybe I'll try it.



drop your virtual line in xorg.conf. You'll still be able to extend your desktop no problem. just as long as you don't surpass 2048 horizontally or vertically.


Meh, then I'd have to restart X. :)

voodoodoc
20th December 2008, 12:26 AM
I changed things to run a much higher resolution, don't notice any performance degradation at all, but I don't play games. Runs a bunch of terminal windows just fine though!

popogigio
5th February 2009, 04:05 AM
Have you been able to figure out the docking?
I'm using an M6300, with F10, and can't seem to get the video to display on my external monitor when docked. I'm still new to the world of Linux, but it looks like I may have to edit the xorg.conf file. I've already posted on the forums, but I'm wondering if I need to do something like you've done voodoodoc?

dh96
3rd March 2009, 12:02 AM
I'm having similar issues, however a tad simpler. I have a dell d530, and am trying to use both the laptops LCD and a monitor (through the docking station).

As of right now, the only thing I can get is a mirror of the laptops screen, it wont extend.

These are the useful outputs:


00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)




Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1024 x 768
VGA connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
1024x768 60.0*+
800x600 60.3
640x480 59.9
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
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)




Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "Dell"
VertRefresh 60.0
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "intel"
Option "monitor-LVDS" "Monitor0"
Option "monitor-VGA" "Monitor1"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 24
SubSection "Display"
Modes "1024x768"
Viewport 0 0
Depth 24
Virtual 1024 768
EndSubSection
EndSection


It boots fine with this xorg.conf, however it won't do anything other than mirror the monitors. Any help?

popogigio
3rd March 2009, 01:45 PM
Have you setup twinview?

I noticed that most of my problems have been trying to modify the xorg.conf, based on any number of settings I've seen posted in multiple sites. :confused:

In the end, it came down to using the nvidia display tool (if you've updated the driver).
In turning my external display on, and the built in laptop screen off, the only thing that has worked for me so far, is to enable the monitor through the Nvidia control panel, and disabling the laptop screen (if not, the laptop screen will still be lit, and twinview will display a second screen). I had attempted to use cloning, but the laptop screen still displays, and I don't get the same bars, etc (wrong screen size). If I modify my xorg.conf, chances are I'll ruin the display, and won't see the gui to login, and trying to start X won't work.

Crappy workaround in my opinion :(, considering at one time, I tried Ubuntu without problems, and that it "just works" on XP and Vista. In all reality, I'm starting to see little use for the OS, unless I want to develop something non proprietary and share the software with other Linux users. As the laptop came with Vista, and I don't like to work for free, I'm seriously considering going back to Vista, or waiting for Windows 7. If I could only get compiz-fusion for Windows without the laggy composting other 3rd party tools cause, I'd be already there. :mad:

dh96
3rd March 2009, 03:16 PM
I did try twinview, its boots the same, and the desktops are still just mirrored :mad:

I dont have any nvidia cards so unfortunately their gui app they have wont help

blacflame
10th March 2009, 02:33 PM
DH96 -
have you tried the above just out of curiosity?

and

xrandr --output --left-of vga0

returns an error ? or just doesn't do anything?


popogigio -

Same for you once docked as long as you have the right virtual option set (see up above) you should be able to just do a

xrandr --output VGA --auto

Do a xrandr -q to see if what screens (VGA/DVI/TDMS) you have available. Also, be aware that this works for intel/ati, i believe Nvidia has their own tools. A lot of D530's had nvidia chipsets.