You are not logged in.
Hi!
My monitor setup is basically
Primary 1920x1200 in the center (+1920,+0)
Secondary 1920x1200 left of the primary (+0,+0)
Third one 1920x1080 right of the primary (+3840,+0) - will be bottom-aligned (+3840,+120)
Primary and Secondary are connected to the first GPU GTX 550 Ti
Third one is connected to the second GPU GTS 450
My first attempt was to configure all three in xinerama (using "Seperate X Screen for this monitor" in nvidia-settings) but that led to performance and other issues (e.g. opengl and video output hanging / not working correctly).
Having Primary and Secondary in TwinView and only the third "attached" with Xinerama seems to work nicely for me.
The only problem with the combination of TwinView and Xinerama is that the WM (openbox in my case) thinks that I only have two Monitors ([Primary+Secondary] and [3rd]).
$ xdpyinfo -ext XINERAMA | grep head
head #0: 3840x1200 @ 0,0
head #1: 1920x1080 @ 3840,0
Any ideas what is necessary in the xorg.conf to allow the WM to "see" all 3 monitors?
Here's my nvidia-settings generated xorg.conf:
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "1"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# ...
EndSection
Section "InputDevice"
# ...
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 60.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 550 Ti"
BusID "PCI:1:0:0"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTS 450"
BusID "PCI:2:0:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-3"
Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-3: nvidia-auto-select +1920+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinView" "0"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "Disable"
EndSection
Edit: the problem with this setup is that fullscreen / maximizing will span windows over Primary and Secondary.
Last edited by Black Sliver (2012-05-06 15:58:23)
Offline
You're definitely going to want to read up on this thread: [PATCH] "faked" Xinerama information for a triple-head TwinView setup
Supposedly, this is supposed to do something like what you want. But I don't use nvidia myself, so I'm not sure.
Option "TwinViewXineramaInfoOverride" "1680x1050+0+0, 1680x1050+1680+0, 1680x1050+3360+0"
This post seems to explain that option and a couple other ones that may be of interest. And here are the official docs. (Just keep searching for TwinView.)
If that doesn't work, that thread is supposed to provide a patch to Xorg itself to make things work. But it's pretty old and it looks like people have had varying success with it.
Good luck!
Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.
Tu ne cede malis sed contra audentior ito
Offline
If you're using Openbox, then this post might help (it helped me): https://bbs.archlinux.org/viewtopic.php?id=61840
The key was starting openbox with --debug-xinerama. The poster had other problems that I'm not sure were solved, but I think that starting Openbox this way might get you what you want.
For me, I have two monitors on one card linked with twinview, plus two other monitors on a different card, also linked with twinview. The two pairs of monitors are on separate Xscreens, and I can't move windows from one pair of monitors to the other (which is not a problem for me). Before using the --debug-xinerama switch, windows would span both linked monitors; with the switch, they do not.
Offline
Thanks for the replies.
BurntSushi, the TwinViewXineramaInfoOverride is for the nvidia's implementation of Xinerama -- that is not used (or overridden) by Xorg's Xinerama, so this config option is more or less just ignored.
slamhound, the --debug-xinerama switch splits the whole xinerama-setup (my 3 monitors) just into 2 equally-sized fake monitors for the openbox-session and I don't see a config option here.
As far as I found out there is an older patch for Xorg/Xinerama to add a fake xinerama info to Xorg's xinerama implementation (similar to nvidia's solution) but wouldn't it be easier to patch OpenBox to parse a faked layout? (Just like --debug-xinerama but configurable). What's the better / easier / ... approach to this?
so long...
Offline
but wouldn't it be easier to patch OpenBox to parse a faked layout? (Just like --debug-xinerama but configurable). What's the better / easier / ... approach to this?
Actually, yes. This should be fairly simple.
In Openbox's source (latest checkout from git), take a look at line 1325 of gitroot/openbox/screen.c. You'll notice this code:
else if (obt_display_extension_xinerama &&
(info = XineramaQueryScreens(obt_display, &n))) {
*nxin = n;
*xin_areas = g_new(Rect, *nxin + 1);
for (i = 0; i < *nxin; ++i)
RECT_SET((*xin_areas)[i], info[i].x_org, info[i].y_org,
info[i].width, info[i].height);
XFree(info);
}
XineramaQueryScreens gets the info for each head attached. 'info' in this case is an array of XineramaScreenInfo and 'n' is the number of heads attached. Each XineramaScreenInfo element has the following members: x_org, y_org, width and height.
It appears Openbox uses '*xin_areas' to setup the representation of multiple heads. So I'd bet that if you got rid of the above code and hacked in three manual calls to RECT_SET with your screen geometry for each one, you'd be golden:
(I did not test this!)
else if (obt_display_extension_xinerama &&
(info = XineramaQueryScreens(obt_display, &n))) {
*nxin = 3;
*xin_areas = g_new(Rect, *nxin + 1); // add 1 here because openbox adds the total size of root window to the end of *xin_areas
// this is my triple head config. substitute your own values.
RECT_SET((*xin_areas)[0], 0, 0, 1920, 1080);
RECT_SET((*xin_areas)[1], 1920, 0, 1920, 1080);
RECT_SET((*xin_areas)[2], 3840, 0, 1920, 1080);
XFree(info);
}
Also, there is a PKGBUILD for openbox-git in the AUR. It should give you the info you need to build if there are any problems.
A similar process can be repeated for just about any window manager (assuming a good design with a single point of truth related to the head geometries). Although, some of the newer window managers (i.e., i3) use RandR instead (or in conjunction with Xinerama if configured to do so), so it could be a bit more complicated than what I did above in that case.
*EDIT*
I fixed a bug in the above code. *nxin should correspond to the number of heads, while *xin_areas should be allocated to contain the number of heads plus one.
Last edited by BurntSushi (2012-05-06 19:37:40)
Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.
Tu ne cede malis sed contra audentior ito
Offline
I guess I could have done it myself, but thanks for the code
The question was more like "Is it clean and enough to implement it in openbox?".
Anyway, the code works lika a charm (for now). I think I'm gonna implement a config option or sth like that so I can change monitors without recompiling openbox. The last question that resides is if there are (other) programs that require the xinemera-monitor-region-information (or xrandr? (which is not supported by xinerama)).
One sample I found is SDL -- full-screen will not ask the WM to do the job, but it moves to 0,0 and streches to whatever it thinks is right. (And that's wrong ). Flash fullscreen got It wrong too. At least firefox (html5-video), VLC (besides the overlay) and mplayer got it right.
I think I can live with it for now. Maybe I'll try to patch xinerama itself sometime.
Whatever. Thank you.
Offline
The last question that resides is if there are (other) programs that require the xinemera-monitor-region-information
I think you got most of them. Another one might be a pager or a panel that is multihead aware.
As for Flash... Even in a proper configuration Flash can't be counted on to get multihead support right. If all your heads are the same size, you might luck out, but otherwise its proportions will be all wrong. (It seems to pick the proportion of the biggest head.)
(or xrandr? (which is not supported by xinerama)).
Most applications just use Xinerama. The progressive ones use RandR if available and fall back to Xinerama if not.
Maybe I'll try to patch xinerama itself sometime.
You could probably do it for yourself, but Xinerama itself is dead. It's pretty much barely hopping around on one foot until RandR is universally adopted. (The nvidia blob driver just announced RandR 1.2/1.3 support, so that's a huge step in the direction of RandR... The only technical limitation left is your problem: multi-GPUs.)
Last edited by BurntSushi (2012-05-06 23:12:25)
Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.
Tu ne cede malis sed contra audentior ito
Offline
I don't know a lot about randr (used it only for flipping a single-monitor setup at work and I guess Ubuntu is using it for an Intel two-head-setup I use on another machine), but would it be possible to setup multi-head multi-gpu with randr alone - given that all current specs are supported/implemented by all gpus in use?
Last edited by Black Sliver (2012-05-06 23:21:47)
Offline
I don't know a lot about randr (used it only for flipping a single-monitor setup at work and I guess Ubuntu is using it for an Intel two-head-setup I use on another machine), but would it be possible to setup multi-head multi-gpu with randr alone - given that all current specs are supported/implemented by all gpus in use?
Unfortunately, no. RandR has zero support for multiple GPUs. It just hasn't been implemented yet. It's supposed to be a sufficiently large addition that it would bump RandR to 2.0 once it's implemented.
You can think of Xinerama as a super small subset of RandR. RandR covers Xinerama, but it also allows acceleration, sends events when the head configuration is changed, rotation, named heads, etc.
This is the full RandR spec. The first two sections may be somewhat readable to you. The rest is only pertinent to those masochists of us that work with X.
Last edited by BurntSushi (2012-05-06 23:40:32)
Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.
Tu ne cede malis sed contra audentior ito
Offline
Hm... that kind of sucks :\
Not that I really need it to work on my desktop, but support for compositing and getting rid of xinerama's performance penalty on multi-gpu-setups would be nice sometime. Quadros (with support for more than 2 monitors) are just not worth the money...
Offline
Quadros (with support for more than 2 monitors) are just not worth the money...
Eyefinity is the way to go. Just pick up any ol' 5000 series AMD card with Eyefinity support and you're good to go. I have triple heads with graphics acceleration using RandR with the open source driver.
Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.
Tu ne cede malis sed contra audentior ito
Offline
Sounds interesting, but the decision(s) for the GPU(s) I use are not made because of compositing (and/or randr-support) - it's rendering performance (and stability) and CUDA support in the first place. And nope, I don't want to argue on AMD/ATI vs. NVidia For me, NVidia worked nice besides this problem right now - and after all xinerama in combination with TwinView seems not too bad.
Anyway, thanks for the information on that topic, it's very interesting to see/know what's going on.
Offline
Nvidia Kepler supports up to 4 displays. If the GTX680 is too expensive for you, GTX670 will be out in a few days.
Offline