View previous topic :: View next topic |
Author |
Message |
finarfin n00b
Joined: 20 Sep 2011 Posts: 62
|
Posted: Mon Feb 13, 2012 7:59 pm Post subject: Dual Monitor setup |
|
|
Hi all,
i just followed the wiki guide on how to setup a dual monitor environment for my laptop (so i followed the Intermittent Dual-Monitors), then i installed xrandr and tried to update the xorg.conf, when i plug the second monitor and i launch
The result is that the second monitor is turned on, but it is only a replication of laptop monitor.
Now i want to have the 2nd monitor as an extension of the other desktop.
This is how i edited my xorg.conf file:
Code: |
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Modes "1280x800"
Virtual 4096 4096
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Modes "1280x800"
Virtual 4096 4096
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Modes "1280x800"
Virtual 4096 4096
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Modes "1280x800"
Virtual 4096 4096
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Modes "1280x800"
Virtual 4096 4096
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Modes "1280x800"
Virtual 4096 4096
Viewport 0 0
Depth 24
EndSubSection
EndSection
|
Then i launched the command:
Code: | xrand --output VGA_0 --right-of LVDS |
And it extends the desktop to the second monitor, but the problem is that it extends the current desktop to the second monitor and resolution became something like 2560x800, with also the menu bar extended to the second desktop.
My question is, if is possible to have a behaviour similar to windows, to handle the 2 monitor as 2 independent monitor, and not as a single monitor with a doulbed resolution.
I hope that i was cleaar in explanation. _________________ printf("hello world") |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Mon Feb 13, 2012 8:09 pm Post subject: |
|
|
Sound like you need to recompile your entire machine with the xinerama USE flag.
Also, your xorg.conf as such does absolutely nothing, you can get rid of it. If you want to permanently have a dual-head setup, see here. |
|
Back to top |
|
|
gorkypl Guru
Joined: 04 Oct 2010 Posts: 444 Location: Kraków, PL
|
Posted: Wed Feb 15, 2012 12:36 pm Post subject: |
|
|
To me it looks rather like an issue with window manager/desktop environment. What WM do you use?
Also two important things:
1) In my opinion USE="xinerama" has absolutely nothing to do with the issue, I recommend not to enable it as it is deprecated.
2) Your entire xorg.conf is not needed, either use xrandr with '--right-of' part, or set your xorg.conf similar to the straight example given by Gusar. |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Wed Feb 15, 2012 3:06 pm Post subject: |
|
|
gorkypl wrote: | 1) In my opinion USE="xinerama" has absolutely nothing to do with the issue, I recommend not to enable it as it is deprecated. |
Incorrect.
xrandr (and nvidia twinview too, not that it matters in this case) uses the xinerama protocol to inform clients about screen size and positions. If clients can't speak the xinerama protocol, they'll see one giant screen instead of separate ones. The cure? Make apps speak the xinerama protocol. By enabling the USE flag. |
|
Back to top |
|
|
gorkypl Guru
Joined: 04 Oct 2010 Posts: 444 Location: Kraków, PL
|
Posted: Thu Feb 16, 2012 12:08 pm Post subject: |
|
|
Gusar wrote: | gorkypl wrote: | 1) In my opinion USE="xinerama" has absolutely nothing to do with the issue, I recommend not to enable it as it is deprecated. |
Incorrect.
xrandr (and nvidia twinview too, not that it matters in this case) uses the xinerama protocol to inform clients about screen size and positions. If clients can't speak the xinerama protocol, they'll see one giant screen instead of separate ones. The cure? Make apps speak the xinerama protocol. By enabling the USE flag. |
Well, I guess we may both be right - that is why I asked about WM used.
My understanding is:
- you can either use xinerama and have (number of screens) == (number of physical monitors)
- or rely on RandR, which gives you one big screen, but reports the boundaries of physical monitors that are inside
Perhaps the problem arises when client (I guess WM specifically, because it's WM's job to position windows) can't understand what RandR says.
E.g. on my system I have three separate monitors which are well-handled by Awesome, despite USE="-xinerama" in /etc/make.conf.
However, this still really seems a mess to me, because depsite all this, xorg-server and graphics drivers still need xineramaproto...
Code: |
# equery d xineramaproto
* These packages depend on xineramaproto:
media-video/mplayer2-2.0_p20111126 (xinerama ? x11-proto/xineramaproto)
x11-apps/xdpyinfo-1.3.0 (xinerama ? x11-proto/xineramaproto)
x11-base/xorg-server-1.11.4 (>=x11-proto/xineramaproto-1.1.3)
x11-drivers/xf86-video-ati-6.14.3 (x11-proto/xineramaproto)
x11-libs/gtk+-2.24.10-r1 (xinerama ? x11-proto/xineramaproto)
# xdpyinfo -ext XINERAMA | grep XINERAMA
XINERAMA version 1.1 opcode: 150
|
|
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Thu Feb 16, 2012 12:30 pm Post subject: |
|
|
What you need to differentiate is "xinerama the extention" and "xinerama the protocol". xrandr and twinview use the protocol, but not the extension.
It seems to me you're using the extension with your setup. Which will work for apps because they see DISPLAY=:0.0 and DISPLAY=:0.1 and so on. But if you use xrandr, there's just DISPLAY=:0 and nothing else. So that apps can then know where the separate displays are, they need to speak the xinerama protocol. |
|
Back to top |
|
|
gorkypl Guru
Joined: 04 Oct 2010 Posts: 444 Location: Kraków, PL
|
Posted: Thu Feb 16, 2012 2:38 pm Post subject: |
|
|
Do you have any links to papers that can help me understand this? It's not so important and I know that X is rather messy, but I'd just like to know the things a bit more.
Especially I'm not sure if I understand the extension/protocol difference.
Protocol defines the communication between server and clients and is used also by RandR, while extension simple enables several screens, yes? |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Thu Feb 16, 2012 3:08 pm Post subject: |
|
|
The extension stitches multiple independent screens together, so that you can move the mouse (and the apps themselves, I think) from one to another. But with xrandr, there's no independent screens, it's one big screen. "Merged framebuffer" being the technical term. One framebuffer spanning all displays. |
|
Back to top |
|
|
gorkypl Guru
Joined: 04 Oct 2010 Posts: 444 Location: Kraków, PL
|
Posted: Thu Feb 16, 2012 3:58 pm Post subject: |
|
|
Gusar wrote: | The extension stitches multiple independent screens together, so that you can move the mouse (and the apps themselves, I think) from one to another. But with xrandr, there's no independent screens, it's one big screen. |
Yes, but this one big screen still can have internal boundaries and therefore enables the clients to distinguish physical monitors...
In my case, the only application needing libXinerama was libreoffice, so I've temporarily unmerged them.
Now I have:
Code: |
$ xdpyinfo -ext XINERAMA | grep XINERAMA
XINERAMA extension not supported by xdpyinfo
|
Still I have three monitors working and I'm able to move mouse pointer and windows between them, and WM puts separate menubar on each of them.
Code: | # xrandr -q
Screen 0: minimum 320 x 200, current 4240 x 1050, maximum 8192 x 8192
DisplayPort-0 connected 1280x1024+2960+0 (normal left inverted right x axis y axis) 338mm x 270mm
<modes cut>
HDMI-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
<modes cut>
DVI-1 connected 1680x1050+1280+0 (normal left inverted right x axis y axis) 474mm x 296mm
|
This is why I was saying that USE="xinerama" is not needed to handle multihead, as long as WM can distinguish the physical monitors (it does it via RandR I guess - and perhaps the xinerama protocol if I have understood this correctly). |
|
Back to top |
|
|
finarfin n00b
Joined: 20 Sep 2011 Posts: 62
|
Posted: Fri Feb 17, 2012 7:57 pm Post subject: |
|
|
Sorry for the delay of my answer!
So:
1. I have fluxbox installed as wm
2. Looking at the log i found that line:
Code: | [ 872.074] (II) Initializing built-in extension XINERAMA |
And also:
Code: | rincewind@adora ~ $ equery uses x11
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for dev-haskell/x11-1.4.6.1:
U I
- - doc : Adds extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
- - profile : Adds support for software performance analysis (will likely vary from ebuild to ebuild)
- - xinerama : Add support for the xinerama X11 extension, which is mandatory if you work in multiple monitors setup
|
So xinerama is configured. Correct?
And actually i can move without problem between the two monitors, the problem is only on how it handle menubar/windows (if i maximize a window it will bi stretched between the two monitors.
Thanks. _________________ printf("hello world") |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Fri Feb 17, 2012 8:51 pm Post subject: |
|
|
Err, I don't get it. Why are you checking for the x11 flag?? Check for the xinerama flag. Fluxbox has it. And I'm quite sure you don't have it activated.
Activate the flag globally then do an "emerge --newuse world". These are the basics of using Gentoo, I can't believe I need to be explaining them. |
|
Back to top |
|
|
finarfin n00b
Joined: 20 Sep 2011 Posts: 62
|
Posted: Fri Feb 17, 2012 9:15 pm Post subject: |
|
|
Gusar wrote: | Err, I don't get it. Why are you checking for the x11 flag?? Check for the xinerama flag. Fluxbox has it. And I'm quite sure you don't have it activated.
Activate the flag globally then do an "emerge --newuse world". These are the basics of using Gentoo, I can't believe I need to be explaining them. |
ops! i thought that the xinerama flag was referred to x11.
Now i updated my make.conf. And xinerama was not enabled. _________________ printf("hello world") |
|
Back to top |
|
|
finarfin n00b
Joined: 20 Sep 2011 Posts: 62
|
Posted: Sat Feb 18, 2012 9:56 am Post subject: |
|
|
Ok i added the use flag for xinerama on my system.
It updated also fluxbox package. Now the windows are opened in only one window automatically, and the bar is not stretched between two monitors. This is a good step forward.
But the background image is still stretched. Then i try to
But now if i try to set two different background using:
Code: | DISPLAY=:0.1 fbsetbg 1280-800-37704.jpg
DISPLAY=:0.0 fbsetbg 1280-800-37704.jpg |
The second line worked, but it add a stretched background. The first one return an error:
Code: | Can't open display: 0.1 |
_________________ printf("hello world") |
|
Back to top |
|
|
Gusar Advocate
Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Sat Feb 18, 2012 10:06 am Post subject: |
|
|
Read what I wrote above - xrandr doesn't have separate DISPLAYs anymore. I think Fluxbox has a different, more proper way to set wallpapers for multiple displays, but it's been many many years since I used it, so I wouldn't know how. So you'll have to RTFM. |
|
Back to top |
|
|
|