Xinerama prevents Java fullscreen exclusive mode in Gutsy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
icedtea-java7 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
openjdk-6 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
sun-java6 (Ubuntu) |
Fix Released
|
Undecided
|
Dan Munckton |
Bug Description
Update: This bug has evolved a little, the summary for this bug now reflects the root cause of the problem, discovered later in the comments. It seems Java fullscreen exclusive mode is not supported when Xinerama is present in Xorg. In Gutsy it seems it is there on all installations (that I've tested) which means no Java fullscreen exclusive mode apps/games will run.
Original Description: While testing a Java fullscreen mode application in Gutsy I have discovered that Java does not find the full list of supported display modes it only lists the current screen resolution even though the xrandr command lists all supported screen modes. Consequently it cannot use full screen exclusive mode in any other resolution than the current one in use. This is a regression as the problem does not occur in Feisty.
I've tested this on 2 completely different machines first with Feisty and then with Gutsy.
I've attached a sample Java program DisplayModeLister which outputs a list of supported screen modes. Here's it's output on Gutsy:
1: 1440 x 900 @ 0Hz -1bit
Here's the xrandr command's output on Gutsy:
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 1440 x 1200
VGA-0 disconnected (normal left inverted right)
LVDS connected 1440x900+0+0 (normal left inverted right) 0mm x 0mm
1440x900 59.9*+
1280x800 60.0
1280x768 60.0
1024x768 60.0
800x600 60.3
640x480 59.9
S-video disconnected (normal left inverted right)
DVI-0 disconnected (normal left inverted right)
Here's DisplayModeLister's output on the same machine running Feisty:
1: 1440 x 900 @ 60Hz -1bit
2: 1024 x 768 @ 60Hz -1bit
3: 800 x 600 @ 60Hz -1bit
4: 640 x 480 @ 60Hz -1bit
5: 640 x 350 @ 60Hz -1bit
6: 640 x 400 @ 60Hz -1bit
7: 720 x 400 @ 60Hz -1bit
8: 1152 x 864 @ 60Hz -1bit
9: 832 x 624 @ 60Hz -1bit
10: 1280 x 768 @ 60Hz -1bit
11: 1280 x 800 @ 60Hz -1bit
12: 1152 x 768 @ 60Hz -1bit
This result is the same in Java 5 and 6. Here are the package versions:
Feisty:
* sun-java6 6-00-2ubuntu2
* xorg 1:7.2-0ubuntu11
* libxrandr 1.2.0-3ubuntu1
* xrandr 1.0.2-0ubuntu1
Gutsy:
* sun-java6 6-03-0ubuntu2
* xorg 1:7.2-5ubuntu13
* libxrandr 2:1.2.1-1
* xrandr 1:1.2.2-0ubuntu1
Related branches
description: | updated |
description: | updated |
Changed in icedtea-java7: | |
assignee: | nobody → munckfish |
Changed in sun-java6: | |
assignee: | nobody → munckfish |
Changed in icedtea-java7: | |
status: | Confirmed → In Progress |
Changed in sun-java6: | |
status: | Confirmed → In Progress |
Changed in icedtea-java7: | |
assignee: | munckfish → nobody |
Right. I've been digging into this a little.
As expected the deb source for sun-java6 just includes the *.bin files from Sun, no source code. I tried to find the Java 6 source but the link just goes to the java.net binary downloads page.
Instead I tested again with Icedtea and found it also exhibits the same problem, so I feel fairly happy it's probably using roughly the same code as Java 6. After a little hunting I located the JNI call Java_sun_ awt_X11Graphics Device_ enumDisplayMode s(...) in http:// icedtea. classpath. org/hg/ openjdk/ file/ce9dde984c 21/j2se/ src/solaris/ native/ sun/awt/ awt_GraphicsEnv .c. It's using XRandr calls to get the list of modes. I've coded up a quick C test binary using the same algorithm (attached xrandr-lsmodes.c) and it worked fine on Feisty and Gutsy. Could it be this is a regression in Java 6 u3?
There doesn't seem to be an upstream bug, so I'll raise one.
Output of xrandr-lsmodes.c on Feisty:
1: 1440 x 900 @ 60Hz -1bit
2: 1024 x 768 @ 60Hz -1bit
3: 800 x 600 @ 60Hz -1bit
4: 640 x 480 @ 60Hz -1bit
5: 640 x 350 @ 60Hz -1bit
6: 640 x 400 @ 60Hz -1bit
7: 720 x 400 @ 60Hz -1bit
8: 1152 x 864 @ 60Hz -1bit
9: 832 x 624 @ 60Hz -1bit
10: 1280 x 768 @ 60Hz -1bit
11: 1280 x 800 @ 60Hz -1bit
12: 1152 x 768 @ 60Hz -1bit
Output on Gutsy:
1: 1440 x 900 @ 60Hz -1bit
2: 1280 x 800 @ 60Hz -1bit
3: 1280 x 768 @ 60Hz -1bit
4: 1024 x 768 @ 60Hz -1bit
5: 800 x 600 @ 60Hz -1bit
6: 640 x 480 @ 60Hz -1bit