From lists at munckfish.net Mon Dec 3 12:25:42 2007 From: lists at munckfish.net (Dan Munckton) Date: Mon, 03 Dec 2007 20:25:42 +0000 Subject: Java Fullscreen Mode with Xorg server 1.3.0+ (I'm ready to work on a patch) In-Reply-To: <4750C932.3090908@sun.com> References: <1196246017.8431.23.camel@dylan> <1196455116.9594.7.camel@dylan> <4750C932.3090908@sun.com> Message-ID: <1196713542.6134.16.camel@dylan> Hi Oleg Thanks for your reply. > am I right that your are going to fix our code so it correctly handled > situation when Xinerama is loaded but we have just one screen, so we > could use Xrandr extension in such configuration? Yes. I'm happy to try and produce a patch if there's no-one else working on this issue. My employer's product will soon be directly affected by the problem so I'm very motivated to see it solved as soon as possible. This would be my first contribution to Java/OpenJDK and therefore I may not progress as quickly as others who are already involved. Is it true that new contributors are assigned a mentor to assist a little? > This code is somewhere on boundary of AWT and 2D areas so you may want > to also check with 2D. As for AWT side I can say for sure that we do > not work on similar issue. Hello 2d-dev, is there anyone aware of/working on this problem already? (http://mail.openjdk.java.net/pipermail/awt-dev/2007-November/000109.html) > > > I've still not opened a bug on the Java bug database, do I need to do > > that to be tidy? > > you are supposed to send a path with bug id, so it looks reasonable to > have one :) I have now opened a bug which has been assigned an id. It's not yet visible in the external database but here's the link anyway: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6636469 Thanks Dan From Yuri.Nesterenko at Sun.COM Tue Dec 4 05:16:39 2007 From: Yuri.Nesterenko at Sun.COM (Yuri Nesterenko) Date: Tue, 04 Dec 2007 16:16:39 +0300 Subject: Java Fullscreen Mode with Xorg server 1.3.0+ (I'm ready to work on a patch) In-Reply-To: <1196713542.6134.16.camel@dylan> References: <1196246017.8431.23.camel@dylan> <1196455116.9594.7.camel@dylan> <4750C932.3090908@sun.com> <1196713542.6134.16.camel@dylan> Message-ID: <20071204131639.GA9128@frigate.russia.sun.com> Hi Dan, this new bug, 6599351, seems to be about the same issue, isn't it? It should be fixed in several releases, as I understand. Now let's decide: if you will create a patch for your bug then I'll not work on my, otherwise I'll start but not very fast, either. Anyway, after your patch is ready for jdk7, I can port it to earlier non-open releases where applicable. Oleg or/and I, we can help when necessary and review your code. Thanks, -Yuri On Mon, Dec 03, 2007 at 08:25:42PM +0000, Dan Munckton wrote: > Hi Oleg > > Thanks for your reply. > > > am I right that your are going to fix our code so it correctly handled > > situation when Xinerama is loaded but we have just one screen, so we > > could use Xrandr extension in such configuration? > > Yes. I'm happy to try and produce a patch if there's no-one else working > on this issue. My employer's product will soon be directly affected by > the problem so I'm very motivated to see it solved as soon as possible. > > This would be my first contribution to Java/OpenJDK and therefore I may > not progress as quickly as others who are already involved. Is it true > that new contributors are assigned a mentor to assist a little? > > > This code is somewhere on boundary of AWT and 2D areas so you may want > > to also check with 2D. As for AWT side I can say for sure that we do > > not work on similar issue. > > Hello 2d-dev, is there anyone aware of/working on this problem already? > (http://mail.openjdk.java.net/pipermail/awt-dev/2007-November/000109.html) > > > > > > I've still not opened a bug on the Java bug database, do I need to do > > > that to be tidy? > > > > you are supposed to send a path with bug id, so it looks reasonable to > > have one :) > > I have now opened a bug which has been assigned an id. It's not yet > visible in the external database but here's the link anyway: > > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6636469 > > Thanks > > Dan From lists at munckfish.net Wed Dec 5 14:54:07 2007 From: lists at munckfish.net (Dan Munckton) Date: Wed, 05 Dec 2007 22:54:07 +0000 Subject: [OpenJDK 2D-Dev] Java Fullscreen Mode with Xorg server 1.3.0+ (I'm ready to work on a patch) In-Reply-To: <47547040.2070606@Sun.COM> References: <1196246017.8431.23.camel@dylan> <1196455116.9594.7.camel@dylan> <4750C932.3090908@sun.com> <1196713542.6134.16.camel@dylan> <47547040.2070606@Sun.COM> Message-ID: <1196895247.6148.29.camel@dylan> Hi Dmitri Sorry about the delay in replying. > BTW, someone posted a hackish work around for this issue > (see 6636469). Thank you, yes I saw that - same thing was posted to the Ubuntu bug. > As I mentioned in my evaluation (you should see it shortly *) > this bug is related to this one: > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6599351 > > I think this should be addressed by two fixes: > 1. we need to correctly detect whether Xinerama is present and > active (6599351) > 2. as you suggested we should relax the requirement concerning > xinerama and randr (6636469) Interesting. Although I hadn't tested with a multi-monitor setup it's no surprise to me at all that there are other knock-on affects of the changes in Xorg Server 1.3. > > The first part (arguably =) belongs to AWT and will need to work > correctly on both linux ans solaris (with newer Xorg servers). > > The second part belongs to 2D. I guess for the sake of simplicity > we could fold both issues into the same bug report since they both > have same underlying cause. > Typically we close the newer bug as a duplicate of the older one. > What do you think? That's perfectly fine with me. Cheers Dan From lists at munckfish.net Wed Dec 5 15:25:13 2007 From: lists at munckfish.net (Dan Munckton) Date: Wed, 05 Dec 2007 23:25:13 +0000 Subject: [OpenJDK 2D-Dev] Java Fullscreen Mode with Xorg server 1.3.0+ In-Reply-To: <20071204131639.GA9128@frigate.russia.sun.com> References: <1196246017.8431.23.camel@dylan> <1196455116.9594.7.camel@dylan> <4750C932.3090908@sun.com> <1196713542.6134.16.camel@dylan> <20071204131639.GA9128@frigate.russia.sun.com> Message-ID: <1196897113.6148.58.camel@dylan> Hi Yuri > this new bug, 6599351, seems to be about the same issue, isn't it? > It should be fixed in several releases, as I understand. Yes it does appear that both bugs are side effects of the changes happening in Xorg which Java now needs to accommodate. I have recreated my problem in Java versions 6 and 7. > Now let's decide: if you will create a patch for your bug then I'll not > work on my, otherwise I'll start but not very fast, either. I'll need to know more about the plans you have to fix 6599351 and also gauge how big my fix is going to be. It may not be worth us both working on this separately. Currently I'm imagining the changes to be small to get fullscreen working when there's only one monitor. But I still need to understand more about what needs to happen when multiple monitors are attached. > Anyway, after your patch is ready for jdk7, I can port it to earlier non-open releases > where applicable. I understand new fixes have to mature through at least one Java 7 test release cycle before they can be back-ported. Could you tell me when the next Java 7 test build is due and how long the interval between them is? How much time is there before the next Java 6 update? Would there be enough time to get these fixes into that? > Oleg or/and I, we can help when necessary and review your code. That would be brilliant, thank you. Cheers Dan From lists at munckfish.net Sat Dec 8 05:43:36 2007 From: lists at munckfish.net (Dan Munckton) Date: Sat, 08 Dec 2007 13:43:36 +0000 Subject: [PATCH] 6636469: Java Fullscreen Exclusive Mode not working with Xorg server 1.3.0 and above Message-ID: <1197121416.14405.50.camel@dylan> Hi Oleg, Dmitry, Yuri, all Please find attached my first attempt at fixing bug 6636469 [0]. APPROACH The fix is really simple it just checks to make sure RANDR's version is 1.2 or greater if usingXinerama is true, if this is all fine it proceeds to load the libXrandr funcs. For the moment I've completely ignored 6599351, and not touched any of the Xinerama loading code at all. BTW I note that with 6599351 the user has an old style X dual-head config without using Xinerama - I found a note on the Debian Xrandr1.2 Howto wiki page [1] explaining that this configuration should crash Xserver 1.3. Does it behave differently in Solaris X? TESTING The equipment I have here will allow me to test single monitor setups with X servers 1.2 and 1.3. Java now behaves as expected in the following cases: 1) Xserver 1.2 + 1 monitor + Xrandr Expect: isFullScreenSupported: true Result: PASS 2) Xserver 1.2 + 1 monitor + Xinerama enabled (Xinerama won't actually load but Xrandr and DRI won't load either) Expect: isFullScreenSupported: false Result: PASS 3) Xserver 1.3 + 1 monitor + Xrandr + fake Xinerama Expect: isFullScreenSupported: true Result: PASS 4) Xserver 1.3 + 1 monitor + Xinerama enabled (Xinerama won't actually load but Xrandr and DRI won't load either) Expect: isFullScreenSupported: false Result: PASS TESTING TODO I have an external LCD monitor at work which I can hook up to my laptop next week. This should allow me to test out Xrandr 1.2 multi-monitor setups. I'll post results as soon as complete. However I don't think I can test out Xinerama dual head configs. I tried to set this up once before but failed - I'm still not 100% certain if Xinerama is actually compiled into my X server I will need to check this out properly. If anyone here has a multi monitor setup already and would be prepared to help me test the following scenarios I'd be very grateful. 5) Xserver 1.2 + 2 monitor + Xinerama (Xrandr and DRI won't load) Expect: isFullScreenSupported: false 6) Xserver 1.3 + 2 monitors + Xinerama Expect: isFullScreenSupported: false I am also still to run the jtreg tests against this. I will come back with results. Also, do I need to mail both awt-dev and 2d-dev or will just one do in future? Cheers Dan [0] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6636469 [1] Section VI.3 of http://wiki.debian.org/XStrikeForce/HowToRandR12 -------------- next part -------------- A non-text attachment was scrubbed... Name: 6636469_first_attempt.diff Type: text/x-patch Size: 2917 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20071208/a2ca4740/6636469_first_attempt.diff From Phil.Race at Sun.COM Sat Dec 8 12:05:40 2007 From: Phil.Race at Sun.COM (Phil Race) Date: Sat, 08 Dec 2007 12:05:40 -0800 Subject: [OpenJDK 2D-Dev] [PATCH] 6636469: Java Fullscreen Exclusive Mode not working with Xorg server 1.3.0 and above In-Reply-To: <1197121416.14405.50.camel@dylan> References: <1197121416.14405.50.camel@dylan> Message-ID: <475AF914.1090309@sun.com> Dan, We can't take this fix as you have not signed the SCA and your name does not appear here : https://sca.dev.java.net/CA_signatories.htm#m -phil Dan Munckton wrote: > Hi Oleg, Dmitry, Yuri, all > > Please find attached my first attempt at fixing bug 6636469 [0]. > > > APPROACH > > The fix is really simple it just checks to make sure RANDR's version is > 1.2 or greater if usingXinerama is true, if this is all fine it proceeds > to load the libXrandr funcs. > > For the moment I've completely ignored 6599351, and not touched any of > the Xinerama loading code at all. > > BTW I note that with 6599351 the user has an old style X dual-head > config without using Xinerama - I found a note on the Debian Xrandr1.2 > Howto wiki page [1] explaining that this configuration should crash > Xserver 1.3. Does it behave differently in Solaris X? > > > TESTING > > The equipment I have here will allow me to test single monitor setups > with X servers 1.2 and 1.3. Java now behaves as expected in the > following cases: > > 1) Xserver 1.2 + 1 monitor + Xrandr > Expect: isFullScreenSupported: true > Result: PASS > > 2) Xserver 1.2 + 1 monitor + Xinerama enabled (Xinerama won't actually > load but Xrandr and DRI won't load either) > Expect: isFullScreenSupported: false > Result: PASS > > 3) Xserver 1.3 + 1 monitor + Xrandr + fake Xinerama > Expect: isFullScreenSupported: true > Result: PASS > > 4) Xserver 1.3 + 1 monitor + Xinerama enabled (Xinerama won't actually > load but Xrandr and DRI won't load either) > Expect: isFullScreenSupported: false > Result: PASS > > > TESTING TODO > > I have an external LCD monitor at work which I can hook up to my laptop > next week. This should allow me to test out Xrandr 1.2 multi-monitor > setups. I'll post results as soon as complete. > > However I don't think I can test out Xinerama dual head configs. I tried > to set this up once before but failed - I'm still not 100% certain if > Xinerama is actually compiled into my X server I will need to check this > out properly. > > If anyone here has a multi monitor setup already and would be prepared > to help me test the following scenarios I'd be very grateful. > > 5) Xserver 1.2 + 2 monitor + Xinerama (Xrandr and DRI won't load) > Expect: isFullScreenSupported: false > > 6) Xserver 1.3 + 2 monitors + Xinerama > Expect: isFullScreenSupported: false > > I am also still to run the jtreg tests against this. I will come back > with results. > > Also, do I need to mail both awt-dev and 2d-dev or will just one do in > future? > > Cheers > > Dan > > > [0] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6636469 > [1] Section VI.3 of http://wiki.debian.org/XStrikeForce/HowToRandR12 > > ------------------------------------------------------------------------ > > diff -r 99a06bc7fdb5 -r 7e529c4088cc src/solaris/native/sun/awt/awt_GraphicsEnv.c > --- a/src/solaris/native/sun/awt/awt_GraphicsEnv.c Tue Dec 04 16:28:33 2007 -0800 > +++ b/src/solaris/native/sun/awt/awt_GraphicsEnv.c Sat Dec 08 13:29:25 2007 +0000 > @@ -1626,6 +1626,8 @@ Java_sun_awt_X11GraphicsEnvironment_getX > > #define BIT_DEPTH_MULTI java_awt_DisplayMode_BIT_DEPTH_MULTI > > +typedef Status > + (*XRRQueryVersionType) (Display *dpy, int *major_versionp, int *minor_versionp); > typedef XRRScreenConfiguration* > (*XRRGetScreenInfoType)(Display *dpy, Drawable root); > typedef void > @@ -1650,6 +1652,7 @@ typedef Status > short rate, > Time timestamp); > > +static XRRQueryVersionType awt_XRRQueryVersion; > static XRRGetScreenInfoType awt_XRRGetScreenInfo; > static XRRFreeScreenConfigInfoType awt_XRRFreeScreenConfigInfo; > static XRRConfigRatesType awt_XRRConfigRates; > @@ -1672,11 +1675,37 @@ static jboolean > static jboolean > X11GD_InitXrandrFuncs(JNIEnv *env) > { > + int rr_maj_ver = 0, rr_min_ver = 0; > + > void *pLibRandR = dlopen("libXrandr.so.2", RTLD_LAZY | RTLD_LOCAL); > if (pLibRandR == NULL) { > J2dRlsTraceLn(J2D_TRACE_ERROR, > "X11GD_InitXrandrFuncs: Could not open libXrandr.so.2"); > return JNI_FALSE; > + } > + > + LOAD_XRANDR_FUNC(XRRQueryVersion); > + > + if (!(*awt_XRRQueryVersion)(awt_display, &rr_maj_ver, &rr_min_ver)) { > + J2dRlsTraceLn(J2D_TRACE_ERROR, > + "X11GD_InitXrandrFuncs: XRRQueryVersion returned an error status"); > + dlclose(pLibRandR); > + return JNI_FALSE; > + } > + > + if (usingXinerama) { > + /* > + * We can proceed as long as this is RANDR 1.2 > + * As of Xorg server 1.3 onwards the Xinerama backend may actually be > + * a fake one provided by RANDR itself. See Java bug 6636469 for info. > + */ > + if (!(rr_maj_ver >= 1 && rr_min_ver >= 2)) { > + J2dRlsTraceLn2(J2D_TRACE_INFO, "X11GD_InitXrandrFuncs: Can't use Xrandr. " > + "Xinerama is active and Xrandr version is %d.%d", > + rr_maj_ver, rr_min_ver); > + dlclose(pLibRandR); > + return JNI_FALSE; > + } > } > > LOAD_XRANDR_FUNC(XRRGetScreenInfo); > @@ -1814,15 +1843,6 @@ Java_sun_awt_X11GraphicsDevice_initXrand > int opcode = 0, firstEvent = 0, firstError = 0; > jboolean ret; > > - if (usingXinerama) { > - /* > - * REMIND: we'll just punt if Xinerama is enabled; we can remove this > - * restriction in the future if we find Xinerama and XRandR playing > - * well together... > - */ > - return JNI_FALSE; > - } > - > AWT_LOCK(); > ret = (jboolean)XQueryExtension(awt_display, "RANDR", > &opcode, &firstEvent, &firstError); > From lists at munckfish.net Tue Dec 11 02:34:38 2007 From: lists at munckfish.net (Dan Munckton) Date: Tue, 11 Dec 2007 10:34:38 +0000 Subject: [OpenJDK 2D-Dev] [PATCH] 6636469: Java Fullscreen Exclusive Mode not working with Xorg server 1.3.0 and above In-Reply-To: <475AF914.1090309@sun.com> References: <1197121416.14405.50.camel@dylan> <475AF914.1090309@sun.com> Message-ID: <1197369278.7494.8.camel@dylan> Hi > We can't take this fix as you have not signed the SCA and your name does not > appear here : https://sca.dev.java.net/CA_signatories.htm#m Just emailed in my signed SCA doc. Thanks Dan From Dmitri.Trembovetski at Sun.COM Mon Dec 3 13:08:16 2007 From: Dmitri.Trembovetski at Sun.COM (Dmitri Trembovetski) Date: Mon, 03 Dec 2007 13:08:16 -0800 Subject: [OpenJDK 2D-Dev] Java Fullscreen Mode with Xorg server 1.3.0+ (I'm ready to work on a patch) In-Reply-To: <1196713542.6134.16.camel@dylan> References: <1196246017.8431.23.camel@dylan> <1196455116.9594.7.camel@dylan> <4750C932.3090908@sun.com> <1196713542.6134.16.camel@dylan> Message-ID: <47547040.2070606@Sun.COM> Hi Dan, thank you for filing the bug. I found your posts on various forums when researching for bug 6599351. Dan Munckton wrote: >> am I right that your are going to fix our code so it correctly handled >> situation when Xinerama is loaded but we have just one screen, so we >> could use Xrandr extension in such configuration? > > Yes. I'm happy to try and produce a patch if there's no-one else working > on this issue. My employer's product will soon be directly affected by > the problem so I'm very motivated to see it solved as soon as possible. BTW, someone posted a hackish work around for this issue (see 6636469). > This would be my first contribution to Java/OpenJDK and therefore I may > not progress as quickly as others who are already involved. Is it true > that new contributors are assigned a mentor to assist a little? > >> This code is somewhere on boundary of AWT and 2D areas so you may want >> to also check with 2D. As for AWT side I can say for sure that we do >> not work on similar issue. > > Hello 2d-dev, is there anyone aware of/working on this problem already? > (http://mail.openjdk.java.net/pipermail/awt-dev/2007-November/000109.html) > >> > I've still not opened a bug on the Java bug database, do I need to do >> > that to be tidy? >> >> you are supposed to send a path with bug id, so it looks reasonable to >> have one :) > > I have now opened a bug which has been assigned an id. It's not yet > visible in the external database but here's the link anyway: > > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6636469 As I mentioned in my evaluation (you should see it shortly *) this bug is related to this one: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6599351 I think this should be addressed by two fixes: 1. we need to correctly detect whether Xinerama is present and active (6599351) 2. as you suggested we should relax the requirement concerning xinerama and randr (6636469) The first part (arguably =) belongs to AWT and will need to work correctly on both linux ans solaris (with newer Xorg servers). The second part belongs to 2D. I guess for the sake of simplicity we could fold both issues into the same bug report since they both have same underlying cause. Typically we close the newer bug as a duplicate of the older one. What do you think? Thanks, Dmitri Java2D Team *) You can sign up for Java2D related bug updates, that way you will see the new bug reports and updates as they come in: http://mail.openjdk.java.net/mailman/listinfo/2d-bugupdates From Dmitri.Trembovetski at Sun.COM Wed Dec 19 15:57:56 2007 From: Dmitri.Trembovetski at Sun.COM (Dmitri Trembovetski) Date: Wed, 19 Dec 2007 15:57:56 -0800 Subject: [OpenJDK 2D-Dev] [PATCH] 6636469: Java Fullscreen Exclusive Mode not working with Xorg server 1.3.0 and above In-Reply-To: <1197121416.14405.50.camel@dylan> References: <1197121416.14405.50.camel@dylan> Message-ID: <4769B004.10308@Sun.COM> Hi Dan, I know that you sent your SCA (repeatedly =) so I looked at the fix. It looks good. Please see my comments below. Dan Munckton wrote: > APPROACH > > The fix is really simple it just checks to make sure RANDR's version is > 1.2 or greater if usingXinerama is true, if this is all fine it proceeds > to load the libXrandr funcs. Sounds good. > For the moment I've completely ignored 6599351, and not touched any of > the Xinerama loading code at all. OK, I think it's a good idea to separate the two fixes. > BTW I note that with 6599351 the user has an old style X dual-head > config without using Xinerama - I found a note on the Debian Xrandr1.2 > Howto wiki page [1] explaining that this configuration should crash > Xserver 1.3. Does it behave differently in Solaris X? You mean, if randr is present? It could be that it didn't have randr extension. It looks from the comments in the bug report that 1.3 works fine with dual screens w/o xinerama in general. > TESTING > > The equipment I have here will allow me to test single monitor setups > with X servers 1.2 and 1.3. Java now behaves as expected in the > following cases: > > 1) Xserver 1.2 + 1 monitor + Xrandr > Expect: isFullScreenSupported: true > Result: PASS > > 2) Xserver 1.2 + 1 monitor + Xinerama enabled (Xinerama won't actually > load but Xrandr and DRI won't load either) > Expect: isFullScreenSupported: false > Result: PASS > > 3) Xserver 1.3 + 1 monitor + Xrandr + fake Xinerama > Expect: isFullScreenSupported: true > Result: PASS > > 4) Xserver 1.3 + 1 monitor + Xinerama enabled (Xinerama won't actually > load but Xrandr and DRI won't load either) > Expect: isFullScreenSupported: false > Result: PASS I assume this is all on linux, right? > TESTING TODO > > I have an external LCD monitor at work which I can hook up to my laptop > next week. This should allow me to test out Xrandr 1.2 multi-monitor > setups. I'll post results as soon as complete. > > However I don't think I can test out Xinerama dual head configs. I tried > to set this up once before but failed - I'm still not 100% certain if > Xinerama is actually compiled into my X server I will need to check this > out properly. > > If anyone here has a multi monitor setup already and would be prepared > to help me test the following scenarios I'd be very grateful. > > 5) Xserver 1.2 + 2 monitor + Xinerama (Xrandr and DRI won't load) > Expect: isFullScreenSupported: false > > 6) Xserver 1.3 + 2 monitors + Xinerama > Expect: isFullScreenSupported: false Ugh. That might be a problem - we don't have too many multiscreen solaris or linux systems that we could install new X server on. But we'll see what we can do. We can at least test on the configuration we have. I have a Solaris 10 machine with dual (non-xinerama) screen - the fs mode isn't supported on it. > I am also still to run the jtreg tests against this. I will come back > with results. I can't think of a good automated regression test for this fix. You can I suppose write a jtreg regression test as script (it is allowed), run xdpyinfo and find out that randr of the correct version is installed and then test if fullscreen is supported but it may not necessarily be a fully correct test - fullscreen may not be enabled for other reasons. > Also, do I need to mail both awt-dev and 2d-dev or will just one do in > future? This particular fix is 2D only, so we can continue on 2d-dev. The other one - we'll see. I suppose it's not that much of a problem if you cc both lists. Thanks, Dmitri > > Cheers > > Dan > > > [0] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6636469 > [1] Section VI.3 of http://wiki.debian.org/XStrikeForce/HowToRandR12 >