Wednesday, January 06, 2010

XrandR, No More Xinerama

This issue apparently is well documented on the Internet, but it was new to me. Quoted from Wikipedia:

XRandR 1.2

XRandR 1.2 only permits one virtual screen per display device. It is not possible to assign each monitor on a device to a different screen (sometimes called "Zaphod" mode), or to combine monitors from multiple devices into a single screen.[3]

One practical limiting effect of this is that it is not possible to run a different WM on each monitor, since window managers are limited to one per screen.

These specific issues are resolved in XRandR 1.3[4], but the Xorg Foundation has been criticised for removing useful, and widely used[citation needed], functionality before an effective substitute is available

(end of Wikipedia snip)

HP ports Debian Linux to our thin clients periodically, and I then take their builds and customize them for our needs. I was pretty excited to be able to deploy Lenny after it was finalized on our hardware. But it turns out that Xinerama support was dropped before xrandr (1.2) was feature complete. After lots of tinkering I was able to get dual screens working, but unfortunately it seems that VGA-0 is hard wired to be your left screen and DVI-0 is the right. When they are flipped, XDM authentication and the GNOME panel open on the right screen which doesn't work well at all. So the net result is that when we touch thin clients that are running two monitors, our support staff is going to have to move cables and move things around. We purposely put the DVI monitor on the left side because it offers a slightly better picture quality.

As was noted in the Wikipedia article, three monitors are not supported at all, so we are going to have to run Etch on users that need that many screens.

I guess the point I wanted to make is that I understand that things need to evolve and move ahead, but there are really people using features like Xinerama. I don't care if something replaces it, but please don't drop the old features until the new ones are working. It's embarrassing that our custom GUI when the thin clients boot the first time looks like this now (Three Monitors is disabled):

34 comments:

Scott said...

Xrandr has a --left-of and --right-of command line argument for specifying position of screens when setting them up. The Gnome graphical "Display Preferences" applet allows you to drag the monitors in to the desired configuration graphically if the command line isn't your thing :)

Scott said...

... forgot to add check the man pages for xrandr for lots more info! :)

Leif said...

@Scott, my GDM still starts on the right-hand monitor (my secondary display) despite the fact I wish it didn't. xrandr --left-of --right-of can only be set once logged in as far as I know.

Dave Richards said...

@scott: Love the command line. :) But as Leif noted, the physical X server comes up correctly and works, but GDM sits on the right side at first connection. So this is happening before GNOME has even run. I haven't seen anything in GDM configuration that allows this to be changed.

adamwill said...

You can do anything that xrandr (or gnome-display-properties) can do in xorg.conf as well, you just need to know the syntax:

http://wiki.debian.org/XStrikeForce/HowToRandR12

is a good reference. I'm not sure why you say three monitors are not supported, there's nothing intrinsic in RandR 1.2 which would prevent it, to my knowledge. I have set up a three monitor setup with RandR 1.2 once, just to see if it worked.

Jon Dowland said...

I agree with you regarding features. Gnome stuff is often guilty of this (cf gvfs/gio vs. gnomevfs)

Dave Richards said...

@adamwill: I have looked all over the web and have found no mention of anyone getting 3 monitors working on Lenny. All of my reading indicates that xrandr 1.2 does not support merging two physical cards together into one screen. What I need is this:

[ati:VGA][ati:DVI][sis:VGA]

merged into a single screen from the xorg.conf file. ati is an add on 9250, and sis is the onboard integrated device. If anyone has a working xorg.conf file with three screens, I'd love to see it in pastebin.

@all: To clarify the --left-of issue a bit more; When I configure it like this:
[ati:DVI] [ati:VGA]
X works fine, but GDM comes up on [ati:VGA] (right). When I configure [ati:VGA] [ati:DVI], GDM comes up on [at:VGA] too. It seems not possible to have it come up on the DVI side.

smcv said...

GDM will probably come up on the primary head, which AFAIK is guessed with a heuristic in xrandr 1.2, but settable in 1.3 (xrandr --output VGA0 --primary).

The GNOME panel runs on the primary head, too (at least in the version I'm running).

Dave Richards said...

@smcv: For sure 1.3 has lots of features, all of which get us closer to what we had previously and was working. :)

Scott said...

Aha! Just remembered something... you are using the open source ATI radeon driver? I recently found there was a bug with the VGA/DVI initialising on my setup (Debian Squeeze with a radeon HD 4350). GDM would only come up on the VGA interface! It might be the same bug in the earlier ati driver shipped with lenny. I pulled the latest Radeon driver from git:

http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/

This fixed things and the GDM display now comes up on both VGA and DVI display in clone mode and then upon login gnome sets my displays correctly using xrandar :)

Alex said...

radeon still supports zaphod mode so you should still be able to set it up like previously. Although etch may have an ancient version of the driver or xserver with subtle zaphod breakages.

Dave Richards said...

Lenny backports are welcomed and accepted if things are fixed :)

airlied said...

Xinerama support hasn't been removed at all except for the Intel driver which never really supported dual-head with multi-screen properly anyways.

Also there was never a way to configure which screen got which output in the old driver, it was purely acceidental, so its flipped over due to how the BIOS lists the outputs.

So really nothing has gone away at all, it might just be acting different now, esp when we started exposing TV outputs etc the old system just fell over.

Dave Richards said...

@airlied: Attempts to start Xinerama crash the Xserver every time, and when I researched the similar bug reports, they basically were unresolved with everyone telling the reporters that it's deprecated and to use xrandr.

Mike said...

Can you explain why it is you need to use XRandR in the first place? As far as I can tell from Wikipedia, it's just for resizing and rotating an X display. I don't see what you'd be losing by only supporting one resolution per machine on your thin clients, but I suspect I'm missing something important.

Federico said...

GDM runs gnome-settings-daemon these days. If you want a custom RANDR configuration for GDM, look at the bottom bar in the GDM screen. Click on the display icon and select "Configure display settings" from the popup menu.

Set up your configuration and click Apply.

That configuration will then be saved in /var/lib/gdm/.config/monitors.xml

See if you can reuse that file for your thin clients. If that doesn't work, mail me.

adamwill said...

DaveR: ah, I understand - you meant 'my particular three-display setup', not 'any possible three-display setup'. The problem there is that RandR 1.2 doesn't work with multiple cards supported by different drivers (yet), as far as I'm aware, which is indeed a regression and sometimes annoying. I was thinking of a setup driven by a single card.

Mike: for a while now (since 1.2), the RandR subsystem is what handles multiple displays, with compliant drivers, not just rotation and resolution any more. If Wikipedia doesn't reflect this, it's substantially out of date. Which isn't an unusual state of affairs :)

Alex said...

Multi-card was broken on xservers 1.5 and 1.6 due to the libpci changes. This isn't a driver specific issue.

James said...

i enjoyed your post thanks!
i've started using two monitors for most of my workflows (i know that's a horrible word) and it got me to thinking about how it should/could be, so i documented my thoughts. if you feel like you have any energy to read them, comments are appreciated: http://dazzle.cs.mcgill.ca/wordpress/?p=27

Gavin said...

Just found your blog and its interesting reading, considering we too customise Debian on HP thin clients for use in our enterprise.

Currently waiting for an evaluation of the HP5745 to arrive to begin testing. I wish they would just keep the 5735 going as its a fantastic piece of kit.

Dave Richards said...

@gavin: The 5745 have this new build to run Lenny. I got it running on the 35 and 25 pretty easily. Except for Xinerama, it's been a pleasure. It boots much faster, and has splashy included which allowed me to make a custom boot splash (bling sells) :) We had better luck with the 5725s, the 35s were just too slow in 3D. The 45s have Intel chips, and we are hopeful that they will run well. I should have a demo here soon.

Anonymous said...

nice post. thanks.

Anonymous said...

Genial dispatch and this enter helped me alot in my college assignement. Thank you seeking your information.

Anonymous said...

Hi there!
I would like to burn a theme at here. There is such a nicey, called HYIP, or High Yield Investment Program. It reminds of financial piramyde, but in rare cases one may happen to meet a company that really pays up to 2% daily not on invested money, but from real profits.

For quite a long time, I make money with the help of these programs.
I'm with no money problems now, but there are heights that must be conquered . I make 2G daily, and I started with funny 500 bucks.
Right now, I'm very close at catching at last a guaranteed variant to make a sharp rise . Visit my web site to get additional info.

http://theinvestblog.com [url=http://theinvestblog.com]Online Investment Blog[/url]

Anonymous said...

[b]Компания GPS-Group предлагает:[/b]

- GPS навигация(для транспорта, КПК, мобильных телефонов).

- Навигаторы(для охоты, рыбалки, путешествий(туристические, автомобильные)).

- Любая модель навигатора Garmin под заказ! Доставка в ваш город бесплатно!

- Установка програмного обеспечения и картографии на ваш навигатор.

- Системы контроля передвижных объектов. Gps логгеры и треккеры для отслеживания текущего местонахождения и пройденого пути(сидя на работе вы всегда будете в курсе где находится ваш автомобиль, родные или близкие люди).

- Оптимизация затрат по транспорту.

- Дистанционное управление автомобилем(блокировка двигателя).

- Отслеживание и просмотр места нахождения транспорта в режиме реального времени, просмотр пройденого маршрута.

- Датчики для контроля уровня и расхода топлива(позволяют отслеживать объем и места заправок, возможных сливов/недозаливов топлива; вести учет расхода топлива для всего автопарка не по установленным нормам, а по реальному расходу). Датчики включеного/отключеного зажигания и т.д.

[url=http://gps-group.hdd1.ru]Узнать подробнее…[/url]
http://gps-group.hdd1.ru

Anonymous said...

great thing! cipciap cipcipcip

send flowers to australia said...

I really liked your article. Keep up the good work.

Canada flower shops said...

I suggest this site to my friends so it could be useful & informative for them also. Great effort.

eco vacations costa rica said...

hi all, for weeks, I've been following your blog about "XrandR, No More Xinerama", I love the approach that you give to this subject, thank you very much!

Anonymous said...

As of April 2011 Xrandr is up to 1.3 and it still doesn't support multiple video cards, near as I can tell. Not only do I have two video cards, they're by two different manufacturers.

Does anyone know when Xrandr will support multiple cards? Had I known it'd be broken for so long I would've stayed at Fedora 10.

Blackjack Trainer said...

I am sorry, that I can help nothing. I hope, you will be helped here by others.

Marc William said...
This comment has been removed by the author.
Prank Calls said...

Nice blog and nice post! The topic here I found is really effective.

Show Plates said...

Nice blog, I really appreciate the way you are sharing your experiences.
http://www.squidoo.com/show-plates-uk