Fullscreen display split between screens with Xinerama/MergedFB

Bug #14044 reported by Mikko Rauhala
56
This bug affects 6 people
Affects Status Importance Assigned to Milestone
libsdl1.2 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Fullscreen SDL programs with X.org's MergedFB radeon mode (with the
pseudo-Xinerama API and all) seem to center on the whole virtual screen instead
of just one of the screens. Not sure if this is an Ubuntu or SDL problem; at
least some sources¹ claim that SDL is able to support such configurations
properly, using only one of the screens in full screen mode.

¹ <URL: http://projects.planetpenguin.de/forums/viewtopic.php?pid=39 >

Revision history for this message
Daniel Stone (daniels) wrote :

Fabio recently found and fixed a similar problem in mplayer -- Fabio, any ideas?

Daniel Stone (daniels)
Changed in libsdl1.2:
assignee: daniels → nobody
Revision history for this message
Daniel Frein (danielfrein) wrote :

the reason of this behavior is the lack of appropriate screen modes in xorg.conf - if only dual-head modes are defined, full screen-apps fail to change to an appropriate resolution. also using the "radeon" driver, the following MetaModes in xorg.conf should have the desired effect:

Option "MetaModes" "1024x768-1024x768 1024x768 800x600 640x480"

this defines one dualhead mode with two times 1024x768, yielding in 2048x768 resolution and three additional modes without any definition for the second screen. during switching to these modes, xorg switches on-the-fly to a clone mode with the requested resolution. starting of full-screen apps (like SDL-games) now automatically triggers switching to a clone mode - no more centering of full screen apps between both monitors.

Therefore I don't think that this is a SDL problem but due to a non-optimal xorg configuration (at least not in dapper; could also be that the problem was fixed in the meantime).

Revision history for this message
James "Doc" Livingston (jrl) wrote :

I'm also seeing this (or something similar) when using NVidia Twinview. I can reproduce it in all SDL fullscreen applications, and everything works fine if I manually switch to a single-screen mode before launching the app.

I have the X modes correctly set up, but what happens is that the window is opened spread across two monitors before the mode switch happens - but the window isn't moved afterwards, so I can only see half of it. Moving the mouse around will sometimes cause the window to "scroll" onto the single screen, but then mouse input is screwed up in the game.

Revision history for this message
Evan Carroll (evancarroll) wrote :

re: Daniel Frein at 2006-06-22 04:03:48 CDT
nice

Revision history for this message
JamesL (jamesly0n) wrote :

I have the TwinView problem. My configuration is unusual because my screens aren't the same size which may have something to do with - my left hand screen's top edge is at Y=256 on the desktop, and as near as I can tell when I run an SDL app the top edge of the window appears there, but the top edge of the screen has moved to Y=0 during the mode change. The mouse input also gets messed up - the area the mouse is constrained to only covers part of the SDL window. Changing to a one-screen mode before running the SDL app avoids the problem. Non-SDL apps (Quake 3, Doom 3) have no problems.

Revision history for this message
Laurie Bradshaw (lauriebradshaw) wrote :

Fullscreen when screens > 1 shouldn't require disabling a screen (or grabbing the mouse by default, so despite having got fullscreen on one screen, the mouse can't be moved outside the window), attached patch for libsdl1.2-debian_1.2.11 makes the existing xinerama workaround useable so you can choose the head to use for fullscreen (SDL_VIDEO_FULLSCREEN_HEAD=<N>), and disables grabbing the mouse by default (the large majority of games that use mouse grabbing, ie. to make scrolling on the screen edge easier, already grab the mouse appropriately (release when paused for example) to handle windowed mode - and if they don't, it's usually a trivial patch).

Main limitation of this patch is lack of support for changing resolution (programatically finding a suitable vidmode to change one of n monitors to a specific resolution without changing the rest is a nightmare, and as I have LCDs, I don't really want to run them at anything other than native resolution anyway).

Only change to default behaviour (SDL_VIDEO_FULLSCREEN_HEAD not set) is no longer grabbing the mouse in fullscreen (shouldn't make any difference for fullscreen with one monitor, as the mouse effectively can't leave the window anyway).

Revision history for this message
Emilio Scalise (emisca) wrote :

I can confirm that this bug occurs also on debian etch's sdl... Perhaps I think sdl sources are basically the same...

But how vlc, tvtime, xine handle fullscreen windows? They work correctly on my configuration... but sdl apps don't work..

Revision history for this message
Christopher (captain-c) wrote :

I am experiencing a similar problem. Totem works fine in full screen while VLC moves its full screen to the first screen. I have a dual head setup in TwinView with the smaller of 2 screens on the left side. I move vlc to the right monitor, try to go fullscreen, and it goes fullscreen on the left monitor instead of the right one.

Revision history for this message
Tokuko (launchpad-net-tokuko) wrote :

This bug is still current in Ubuntu 10.04.
I'm using Nvidia TwinView with two monitors (1600x1200 & 1650x1080) and games like bumprace and extreme tux racer show up right in the middle, split between my two monitors.

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for reporting this bug.

Does this occur in Maverick?

Revision history for this message
bongfactory (claremont-d) wrote :

Still occurring in Maverick (libsdl1.2debian 1.2.14-6ubuntu3)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.