If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Separate screens with xrandr

07-11-2009, 03:46 PM

I have a TFT monitor (VGA-0) and an LCD TV (DVI-0) connected to my Radeon X800 card.

I would like to work on my TFT monitor while showing movies on the TV. So I want a "full-screen" 1280x1024 resolution on the monitor, and a different screen (is this the correct term under X?) with a "full-screen" 1360x768 resolution on DVI-0, where mplayer can run in full-screen mode. (I don't want dual-head/two keyboards and mice, but the same keyboard input for both, and I don't necessarily need mouse input for the TV screen at all.)

How do I set this up?

I run (gentoo packages) xf86-video-ati-6.12.1-r1, xorg-server-1.5.3-r6 (RandR version 1.2).

Neither man radeon nor man xrandr mentions this setup, as far as I can see. And googling for this is almost pointless given how much these things have changed during the last year or so - there's just too much obsolete info to sort through. (The info I have managed to find only covers using a large virtual desktop with the different monitors displaying different parts of it.)

xrandr --help shows options -display and --screen, but with no indications on how to use them.

The situation I have right now is both monitors display the same screen, which presents some problems. I can get mplayer to overlay on the TV using -adapter 1, but full screen mode centers the picture as if the resolution was 1280x1024, not 1360x768 (so the picture appears much too low on the TV). Also, since the monintors display the same thing I cannot do other things on the monitor while running the movie on the TV.

works, but then I lose the menu bar on my desktop on VGA-0. With DVI-0 --leftof VGA-0 the TV screen instead gets too large vertically, which makes e.g. mplayer fullscreen centering not work.

How do I get each monitor to display its own fullscreen desktops? (Or the first monitor displaying a desktop and the second one just being empty?) The important thing is that both monitors must display a desktop that is correctly sized for that monitor's resolution.

Comment

Part of the problem may be in the player program. On my ubuntu 9.04 laptop I have 1400x1050 on my LCD; first I have to use xrandr set load-detection on to enable the S-Video output. Then I can use the Gnome Display tool to enable the S-Video and put it to the right of the main screen. If I run ffplay in fullscreen mode, it tries to use both screens, half of the image appears on the LCD and a corner appears on the S-Video. If I use totem, it uses the screen where its window was running. So if I had it started on the LCD, it uses just the LCD. If I start it from the S-Video, it only uses that. Which is pretty much the behavior I want it to have. Too bad totem's codecs are slower and drop frames compared to ffplay.

Something else that's kinda puzzling, xrandr only enables 800x600 mode on my S-Video port. I'm pretty sure in much older distros I was able to use 1024x768 on it, but I can't add-mode for that now, it always fails. I haven't tried 640x480 on it yet, would expect that to have no problems...

I've commented somethings out that work perfectly fine with one monitor, but dont work with two. You'll have to modify it a bit to make it work with your system

1: The BusID in the device sections, that'll need to be changed to match your system.
2: Under the monitor sections, if one of your outputs is on VGA-0 then that'll need to be updated..
3: The resolutions set in the monitor sections. Make those what you want them to be.
4: Then you ma not need all the modules that I have set to load. So if you see any modules that you dont need you can remove some. Also this goes for fonts. If you see some fonts you wont use then you get remove them too
5: And then lastly in the ServerLayout section you'll notice that I have Screen1 LeftOf Screen0. You can also make that RightOf TopOf or BottomOf

Comment

Something else that's kinda puzzling, xrandr only enables 800x600 mode on my S-Video port. I'm pretty sure in much older distros I was able to use 1024x768 on it, but I can't add-mode for that now, it always fails. I haven't tried 640x480 on it yet, would expect that to have no problems...

800x600 is all that has ever been supported for tv-out on r1xx-r3xx cards. No other modes have been implemented yet.

Comment

The problem seems to be with my window manager (xfce4-4.6). Its display settings applet only recognises one screen. I took a peek at the code and randr-1.2 functionality seems not to be implemented (a lot of code is there but it is ifdef'ed out). So my guess is the WM reports the wrong screen size to mplayer/other applications.

duby229> I'll try your setup as soon as I can. Right now I have some trouble with DRM not recognising my card after a kernel upgrade...