Love and kisses Zaphod

15.10.2010 11:34

I've been using two monitors with a Debian/X.org/GNOME setup at work for more than 3 years now. After a while I got used to an odd window ending up on a wrong monitor. Over time even coworkers with different OSes got tired of laughing at the OpenOffice.org splash screen appearing half-way across monitors (seriously, it's been how many major releases and they still haven't fixed that?).

Anyway, recently I began using my home desktop computer as a media center by permanently connecting it to the TV via a HDMI cable. While it's a minor annoyance if windows pop up on the monitor on the wrong side of the table it's a major pain if they do on the TV behind my back that's turned off most of the time.

The worst offenders seem to be dialog windows by Mozilla software (Firefox, Thunderbird) and I investigated the matter a bit.

First, there's the obligatory Ubuntu forum HOW-TO that is outdated and mostly useless.

Then there's GNOME bug 145503. What seems to be a simple request (force placement of new windows to a single monitor) turns out into the usual flame war with all the usual arguments: "nobody uses that setup" (not likely considering the Ubuntu forums and myself), "X.org infrastructure doesn't allow for properly describing that setup" (ok...), "we don't want to break the current placing algorithm because so much work has gone into it" (right...), etc.

One suggestion did seem useful though: use one X screen for each monitor (called Zaphod mode) instead of one X screen spanning multiple monitors (Xinerama). This creates two completely separate screens running on one X server. The only connection is that both use the same keyboard and you can drag a mouse cursor (but not windows) across the screen boundaries.

Making that setup was not trivial and took some trial and error. This is the xorg.conf I ended up with:

Section "Monitor"
	Identifier	"ViewSonic VG2230wm"
EndSection

Section "Monitor"
	Identifier	"Sony KDL-40V550"
EndSection

Section "Device"
	Identifier	"ATI Radeon HD 4350 0"
	Driver		"radeon"
	Option		"ZaphodHeads"	"DVI-0"
	Screen		0
EndSection

Section "Device"
	Identifier	"ATI Radeon HD 4350 1"
	Driver		"radeon"
	Option		"ZaphodHeads"	"HDMI-0"
	Screen		1
EndSection

Section "Screen"
	Identifier	"Desktop"
	Device		"ATI Radeon HD 4350 0"
	Monitor		"ViewSonic VG2230wm"
EndSection

Section "Screen"
	Identifier	"TV"
	Device		"ATI Radeon HD 4350 1"
	Monitor		"Sony KDL-40V550"
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		0 "Desktop" 0 0
	Screen		1 "TV" RightOf "Desktop"
EndSection

The sad thing is everything today seems to be built around the idea that you are using Xinerama. A lot of things in GNOME break with that setup and worst of all, I could not get HDMI sound to work all. There's also talk that you lose graphics acceleration but I didn't bother to confirm that. It's obvious that neither the X.org driver nor the majority of userland software works well with that setup.

Scrap that idea - Xinerama seems to be the only practical way to have multiple monitors on X.org today. So I guess this only leaves hacking Metacity to solve this problem. As it is only limited to certain repeatable cases I'm hoping it can be solved with some minor fix without major philosophical implications.

Posted by Tomaž | Categories: Code

Comments

I use KDE but your problems echo mine. Multiple monitor (mis)handling may be what bothers me most about Linux desktops.

Alas there is also a lot to dislike about other OSes. I used to think that in few years problems would be solved, but that was more than a decade ago and my hope for computing heaven or nirvana has been lost somewhere in purgatory of everyday computer use.

Using NVidia 8400GS here. Dual monitor works without major problems except:
- Netbeans (Java) can't handle :0.1. It's a bug somewhere in the implementation but I've decided to accept that.

Otherwise all runs OK. Interestingly my wife's ubuntu boots dual-screen cloned text output while mine defaults to VGA output.

Personally I prefer NVidia for it's *nix configurability over ATI...... always had more luck with it.

I have dual monitor on ATI Radeon HD 4570 with proprietary drivers since ubuntu 10.4 and i was quite happy that was easily configurable trough Display configuration GUI. I just added Virtual size and ran xrander for setting primary screen. Otherwise I haven't touched the xorg.conf

Add a new comment


(No HTML tags allowed. Separate paragraphs with a blank line.)