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_X11GraphicsDevice_enumDisplayModes(...) in http://icedtea.classpath.org/hg/openjdk/file/ce9dde984c21/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
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