Login  Register

Re: NEWT window takes ~10 sec to become visible on multiple monitor setups

Posted by Sven Gothel on Nov 21, 2014; 12:12am
URL: https://forum.jogamp.org/NEWT-window-takes-10-sec-to-become-visible-on-multiple-monitor-setups-tp4033582p4033590.html

On 11/21/2014 01:01 AM, Sven Gothel wrote:

> On 11/20/2014 01:50 PM, asambol [via jogamp] wrote:
>> Sample code: http://pastebin.com/gfEcK9wj
>>
>> So, I have a simple GLEventListener rendering absolutely nothing, just
>> instantiating a NEWT window. It takes way too long to show the NEWT window on
>> a 6 monitor setup.
>>
>> 1 monitor ~1sec
>> 2 monitors ~2sec
>> 3 monitors ~5sec
>> 4+ monitors ~10sec
>>
>> It's a brand new Windows 7 machine with 2x NVidia GTX 780 graphics cards
>> (tried with and without SLI). I tried using only 1 card, same thing occurs.
>> Once the windows show up, I have no problem running 6 full HD windows with
>> real rendering at max frame rate, so there is enough juice. The problem is it
>> takes ~60 seconds for the windows to appear (6 * ~10sec).
>>
>> I have tracked the problem to this line of code: glWindow.setVisible(true);
>> The whole computer becomes completely unresponsive until that line gets
>> executed (I can barely move the mouse). It happens on a laptop with 4 displays
>> connected as well.
>>
>> I tried with glWindow.setVisible(false, true); - now the call is non blocking
>> but the window appears after ~10sec and during that time the computer is
>> unresponsive as well.
>> Looking at underlying NEWT implementation, I guess it has something with EDT
>> availability.
>>
>> Is there something I am overlooking or doing wrong?
>
> Not that I know of.
>
> I have tested 4 monitors using a virtual machine (VirtualBox)
> w/ Windows 7 and GNU/Linux X11 and the window(s) pop up immediately.
>
> <http://jogamp.org/files/screenshots/newt-mmonitor/html/>
Unit test:
  com.jogamp.opengl.test.junit.newt.mm.TestScreenMode01cNEWT

would be nice if you can check w/ this unit test and your machine setup.
You may also want to test w/ VirtualBox and it's OpenGL driver.

Would be good to know the reason, maybe we can create a workaround
if we know which operation(s) take so long (<- profiling).

Note: 'setVisible(boolean)' indeed blocks until the window has reached
visibility _or_ our default timeout occurs, which is 5s AFAIK.

The initial setVisible(..) also creates the native components,
i.e. it is a 'heavy operation'. We employ lazy initialization.
Here we will also create the underlying Screen instance,
which includes probing all connected monitors.

btw .. good to read from you Alan, greetings!


>
> So I can only assume there is a driver issue involved here,
> which might be similar to what has been reported w/ OculusVR DK2.
>
> Our code 'only' probes available / connected monitor devices
> via enumeration .. nothing special.
>
> ~Sven
>


signature.asc (828 bytes) Download Attachment