<AWT Dev> Java Fullscreen Exclusive Mode not working with Xorg server 1.3.0 and above

Dan Munckton lists at munckfish.net
Wed Nov 28 02:33:37 PST 2007


Hi

I don't know if anyone here is already aware of this but I've discovered
a problem with Xorg server 1.3.0 (and above) which prevents use of Full
Screen Exclusive mode (FSEM) [0]. I came across this problem in Ubuntu
7.10 (Gutsy) but checking the upstream code I believe it may be present
in any Linux distro which uses that version or above.

>From discussion on the ubuntu-x mailing list [1] I've learned that work
is happening in Xorg to remove Xinerama altogether and replace it's
functionality with Xrandr. Apparently as various parts need to be
rewritten this process could take a couple of years.

As of Xorg server 1.3 the Xinerama backend implementation has been
replaced with an Xrandr one which now handles the Xinerama protocol [2].
Unfortunately this has changed the interface slightly; the real Xinerama
would not initialise if there is only 1 monitor [3], but the Xrandr one
now does [4].

>From studying the IcedTea/OpenJDK code [5] I see the Java native calls
that setup FSEM use Xrandr. However if Xinerama is active they rightly
avoid using Xrandr and therefore disable FSEM [6].

Because Xinerama now appears to be loaded even for single monitor setups
it seems FSEM is not possible.

I have been trying to find a work around for this. With the original
Xinerama implementation a flag could be set in xorg.conf to disable
Xinerama. However that no longer works with the Xrandr backend.

So at the moment only two possibilities occur to me:

  * Xorg's Xrandr Xinerama backend needs to be modified to behave as the
original one did. I will email the Xorg team and find out whether this
will be possible.

  * Or maybe could the code in awt_GraphicsEnv.c check if only 1 monitor
is connected and presume that it's the Xrandr backend that's in use as
Xinerama wouldn't be loaded in that situation?

Thanks

Dan Munckton

[0] https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/154613
[1] https://lists.ubuntu.com/archives/ubuntu-x/2007-November/000061.html
[2]
http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=blob;f=randr/rrxinerama.c
[3] See PanoramiXExtensionInit(...) in
http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=blob;f=Xext/panoramiX.c
[4] See RRXineramaExtensionInit(void) in [2]
[5]
http://icedtea.classpath.org/hg/openjdk/file/3b9a53e0ec3c/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
[6] See Java_sun_awt_X11GraphicsDevice_initXrandrExtension() [5]




More information about the awt-dev mailing list