You are not logged in.

#1 2012-04-22 06:30:42

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Dual-Screen Wiki Article.

I added an xorg.conf listing in the Dual Screen wiki article:

Here

Starting at "A less ambiguous xorg.conf file..." is what I added.  The previous configuration to that, the one with hard-coded monitor names and such, just doesn't work.  I tried it.  It doesn't.  The one I gave is clearer and more importantly: it works.  I'm typing this in an Xfce4 session with dual-heads working perfectly with the configuration I listed.

It would seem that the non-working listing is a candidate for deletion.  I didn't delete it, just added a working configuration, without checking here first.

Bill.

Edit:

This is what I originally edited in:

# file "/etc/X11/xorg.conf"
#
# For both "Monitor" sections, the VendorName value is given from the output
# of "xrandr -q".
#
# For both "Monitor" sections, modify the positions of each monitor
# as to their pixel size.
#
# For each "Screen" section, set the "Modes" option to the pixel size of
# it's monitor.
#
Section "ServerLayout"
   Identifier     "DualScreen"
   Screen       0 "Screen0"
   Screen       1 "Screen1" RightOf "Screen0"
   Option         "Xinerama" "1" # To move windows between screens
EndSection
#
Section "Monitor"
   Identifier     "Monitor0"
   VendorName     "VGA1"
   Option         "Enable" "true"
   Option         "Position" "0 0"
EndSection
#
Section "Monitor"
   Identifier     "Monitor1"
   VendorName     "LVDS1"
   Option         "Enable" "true"
   Option         "Position" "1366 0"
EndSection
#
Section "Device"
   Identifier     "Card0"
   Driver         "intel"
EndSection
#
Section "Screen"
   Identifier     "Screen0"
   Device         "Card0"
   Monitor        "Monitor0"
   DefaultDepth   24
   SubSection "Display"
       Depth          24
       Modes          "1366x768"
   EndSubSection
EndSection
#
Section "Screen"
   Identifier     "Screen1"
   Device         "Card0"
   Monitor        "Monitor1"
   DefaultDepth    24
   SubSection "Display"
       Depth          24
       Modes          "1440x900"
   EndSubSection
EndSection

And this is what was originally in the section:

Section "Device"
       Identifier  "Card0"
       Driver      "intel"
       BusID       "PCI:0:2:0"
       Option "monitor-VGA1" "Monitor0"
       Option "monitor-HDMI1" "Monitor1"
EndSection
Section "Monitor"
       Identifier   "Monitor0"
       Option      "VendorName" "GSM"
       Option      "ModelName" "W1943"
       Option      "DPMS" "true"
       Option		"PreferredMode"	"1360x768"
       Modeline "1360x768"  85.50  1360 1424 1536 1792  768 771 777 795 +hsync +vsync 
       Option "Position" "0 0"
EndSection
Section "Monitor"
       Identifier   "Monitor1"
       Option      "VendorName" "PHL"
       Option      "ModelName" "Philips 221E"
       Option      "DPMS" "true"
       Option		"PreferredMode"	"1920x1080"
       Modeline "1920x1080"   148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync 
       Option "Position" "1366 0"
       Option "RightOf" "Monitor0"
EndSection

And this is what is there now:

Section "Device"
    Identifier  "Card0"
    Driver      "intel" # change to nouveau or radeon to suit your hardware
EndSection
#
Section "Monitor"
    Identifier  "Monitor-VGA1"
    Option      "Primary" "true"
EndSection
#
Section "Monitor"
    Identifier  "Monitor-HDMI1"
    Option      "RightOf" "Monitor-VGA1"
EndSection

With optional:

    Option "PreferredMode" "1920x1080" 
    Option "Position" "0 0"

So, what is there now is significantly cleaner and is not intel specific.

Last edited by headkase (2012-04-23 10:46:04)

Offline

#2 2012-04-22 17:31:23

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Dual-Screen Wiki Article.

Well, no responses yet.  I have to work in a bit.  Later on when I get home from work if there is no feedback then I'll go ahead and clean-up/re-write just that affected section.

Offline

#3 2012-04-22 17:43:33

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

Re: Dual-Screen Wiki Article.

Is all that xorg configuration necessary? I have an intel sandy bridge chip and I can run dual monitors fine with just xrandr.

Offline

#4 2012-04-22 17:58:06

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Dual-Screen Wiki Article.

You can do it either way.  You can run xrandr, say inside a small shell script, on start-up OR you can manually set up an xorg.conf file.  On my machine: I was originally using a xrandr-based script with a delay (sleep x) before it kicked it.  I needed the delay because if it ran immediately on Xfce start-up then it wouldn't work.  So, for a few seconds I was looking at a messed-up monitor: wall-papers and such overlapping before xrandr kicked in.   With the xorg.conf route immediately on X start-up all the monitor geometries and settings are in effect.  It's just cleaner.

Both approaches work.  The edits I'm doing to that page are because the original xorg configuration text just doesn't work.  I've followed, and that text is like, the official "man intel" settings and those don't work either.  However, the xorg.conf I put on that page is explicit in every setting and it does work.  So, unless someone tells me not to then tonight I'm going to re-write that given section so the xorg.conf that I put there are the primary instructions if you want to go an xorg.conf route instead of xrandr.

Offline

#5 2012-04-22 18:13:01

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Dual-Screen Wiki Article.

Hspasta wrote:

Is all that xorg configuration necessary?

Not all of the stuff. A minimal fully working config would look like this:

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
    Option      "monitor-VGA1"   "Monitor0"
    Option      "monitor-HDMI1"  "Monitor1"
EndSection

Section "Monitor"
    Identifier  "Monitor0"
    Option      "Primary"  "true"
EndSection

Section "Monitor"
    Identifier  "Monitor1"
    Option      "RightOf"  "Monitor0"
EndSection

What matters is that the Identifier in Monitor sections matches the Option stuff in the Device section.

Then, I'm always thinking of trying it but I haven't yet, I think this would work too:

Section "Monitor"
    Identifier  "Monitor-VGA1"
    Option      "Primary"  "true"
EndSection

Section "Monitor"
    Identifier  "Monitor-HDMI1"
    Option      "RightOf"  "Monitor-VGA1"
EndSection

Basically, instead of giving outputs names in the Device section and then using those in the Monitor sections, you use instead use Monitor-MMM directly.


@headkase: What you listed as a "less ambiguous xorg.conf file which more explicitly tells the X server what to do" sets up Xinerama, which is something completely different. It shouldn't be used, because things will be a lot slower, and possibly 3d won't work at all.

Last edited by Gusar (2012-04-22 18:16:02)

Offline

#6 2012-04-22 18:19:18

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Dual-Screen Wiki Article.

Gusar wrote:

@headkase: What you listed as a "less ambiguous xorg.conf file which more explicitly tells the X server what to do" sets up Xinerama, which is something completely different. It shouldn't be used, because things will be a lot slower, and possibly 3d won't work at all.

I'm using that configuration and I have Compiz running in Xfce (with wobbly windows and desktop cube, etc - "3D" stuff) and it is working fine.  Also, I know it's not a good test, glxgears runs fine.  Is there a specific, like Compiz, test I could run to ensure that "3D" works?  I have the "Xinerama" setting there because I assume it is needed to drag windows back and forth between different monitors.  Am I incorrect with that impression?

Last edited by headkase (2012-04-22 18:21:05)

Offline

#7 2012-04-22 18:28:20

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Dual-Screen Wiki Article.

Gusar wrote:

Not all of the stuff. A minimal fully working config would look like this:

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
    Option      "monitor-VGA1"   "Monitor0"
    Option      "monitor-HDMI1"  "Monitor1"
EndSection

Section "Monitor"
    Identifier  "Monitor0"
    Option      "Primary"  "true"
EndSection

Section "Monitor"
    Identifier  "Monitor1"
    Option      "RightOf"  "Monitor0"
EndSection

What matters is that the Identifier in Monitor sections matches the Option stuff in the Device section.

Ok, I just tried this, it works too.  Since it is much smaller it is what should be on that page.  Tonight, if no one else does I'll edit that in.  The original text there: the one that has hardcoded monitor names has to go though: it's not general enough to work on anything but the original editors machine.

Edit:

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
EndSection

Section "Monitor"
    Identifier  "Monitor-VGA1"
    Option      "Primary"  "true"
EndSection

Section "Monitor"
    Identifier  "Monitor-LVDS1"
    Option      "RightOf"  "Monitor-VGA1"
EndSection

This.  I did what you suggested and it also works fine.  So, that above code is what I'll put into the wiki tonight.  Should I keep what I originally put there as an "expanded xinerama example"?

Last edited by headkase (2012-04-22 18:33:16)

Offline

#8 2012-04-22 19:07:18

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Dual-Screen Wiki Article.

Ok, @Gusar:

I edited the wiki according to the instructions you gave - which work, unlike what was originally there - thank you! smile

Offline

#9 2012-04-22 20:01:40

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Dual-Screen Wiki Article.

headkase wrote:

I have the "Xinerama" setting there because I assume it is needed to drag windows back and forth between different monitors.  Am I incorrect with that impression?

Xinerama is one way of doing multiple displays. It's old, it shouldn't really be used anymore. Stuff will be slower with it, I'm surprised you have compiz running with it, I recall mentions that it doesn't work.

xrandr is another way of doing multiple displays. Both allow dragging windows between the screens. The configs I gave set up xrandr. It's newer, it's faster, and it's dynamic - you can change settings while X is running with either the xrandr command-line utility (the xorg-xrandr package), or with a GUI configurator (like arandr or lxrandr). The Control Centers of KDE and Gnome also have xrandr support.

headkase wrote:

This.  I did what you suggested and it also works fine.

Did you try without the Device section, just the two Monitor sections? That would be really cool if it works.

headkase wrote:

Should I keep what I originally put there as an "expanded xinerama example"?

It doesn't hurt to have it documented, but explicitly mention that xrandr and xinerama are two different ways of doing multiple screens and that xrandr is preferable.

Also, this isn't specific to intel, all open drivers (in particular nouveau and radeon) use xrandr and can be configured this way. Just set the Device section appropriately (or not have a Device section at all, if you've tested that it works).

Last edited by Gusar (2012-04-22 20:06:51)

Offline

#10 2012-04-23 00:49:57

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Dual-Screen Wiki Article.

Just got home from work.

Ok, thank you tons Gusar: I searched quite a bit before I was able to even get anything to work, which was the Xinerama, at all.  I'm going to leave that as it is right now - what you suggested as working, without adding the Xinerama code I had put there - because at the top of that page it is stated it might be merged into MultiHead.  And MultiHead has Xinerama already documented in it.

So, thanks again: and that Intel page now has working code where it didn't before, from you! smile


Edit:
Did some minor cleanup on the article.  Unless someone else has something to add then I'm done editing it! wink

Last edited by headkase (2012-04-23 01:26:06)

Offline

#11 2012-04-23 06:07:43

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Dual-Screen Wiki Article.

Gusar wrote:

Also, this isn't specific to intel, all open drivers (in particular nouveau and radeon) use xrandr and can be configured this way. Just set the Device section appropriately (or not have a Device section at all, if you've tested that it works).

Updated the article to say that too! Here is the new link!

Last edited by headkase (2012-04-23 07:25:10)

Offline

#12 2012-04-27 22:49:27

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Dual-Screen Wiki Article.

Ok, I've now actually been playing with this stuff on my netbook. This:

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
EndSection

Section "Monitor"
    Identifier  "Monitor-LVDS1"
    Option      "Primary"  "true"
EndSection

Section "Monitor"
    Identifier  "Monitor-VGA1"
    Option      "RightOf"  "Monitor-LVDS1"
EndSection

does *not* work for me. X behaves as if there's no config, and gives me a cloned display in the highest resolution both displays can handle.

But this does work:

Section "Monitor"
    Identifier  "LVDS1"
    Option      "Primary"  "true"
EndSection

Section "Monitor"
    Identifier  "VGA1"
    Option      "RightOf"  "LVDS1"
EndSection

Note how I'm using just the output name there, and not Monitor-<output>. Kinda weird, innit? Also, no Device section needed.

Last edited by Gusar (2012-04-27 22:51:41)

Offline

#13 2012-05-03 13:11:02

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Dual-Screen Wiki Article.

Sorry for the delay, missed your post.  Well, what is there now does work for myself.  I haven't tried it without the device section - left that in in case it was required for other hardware.  What do you think should be done with the Wiki?

Edit: Ok, tried it without a device section and removing "Monitor-" and it works even better than before!  Before, I did end up with a dual-screen desktop but SLiM was a cloned display while logging in.  Without the device section and removing the "Monitor-" text SLiM is properly dual-screen AND it still works when I get to the desktop.  Going to go ahead and update the wiki!

Last edited by headkase (2012-05-03 13:14:38)

Offline

Board footer

Powered by FluxBB