Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

SciePy
Hello,

we are experiencing some weird issues with a Java project using the Jogl library on Ubuntu 11.10. Basically the AWT window completely freezes as soon as the canvas object is added to the frame, in source code

        frame            = new Frame("test");
        canvas          = new GLCanvas();
        animator     = new FPSAnimator(canvas, 60);
       
        renderer     = new Renderer();
       
        canvas.addGLEventListener(renderer);

        frame.setSize(dim.getWidth(), dim.getHeight());
        frame.add(canvas);   // here it freezes


The application can then only be terminated using SIGKILL.
This problem seems to be somehow related to Nvidias optimus technology since the application works on 3 linux machines (2 x intel integrated graphics, 1 x ATI HD 5870; Ubuntu 11.10, Arch, Debian sid) and crashes on 2 different laptops with Nvidias optimus technology and Ubuntu 11.10.

On both those laptops the nvidia card is disabled at startup using the acpi_call module (https://github.com/mkottman/acpi_call), basically the test_off.sh script is executed.
The glx extension is working and the intel integrated graphics driver is active.
Below I added some command outputs,  if you need more info just say so ;)
glxinfo.txt 
test.log
Note: on the test.sh output the window that opens also freezes and the script must be terminated, so the output is probably not complete.


Thanks,
Sam
Reply | Threaded
Open this post in threaded view
|

Re: Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

gouessej
Administrator
This post was updated on .
Hi

There is a panel under Windows to enable "High-performance NVIDIA processor" but I don't know how to do the same under GNU Linux. Actually, it disables the mechanism that tries to "optimize" the way the chip works in order to reduce the consumption.

Edit.: Some people here have the same problem. Generally, disabling the switch fixes it.

Edit.2: Does this problem come from Mesa?

Edit.3: Maybe try Bumblebee: https://wiki.archlinux.org/index.php/Bumblebee
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

SciePy
Hi and thanks for your response.

The Laptops are running both, Windows 7 and Ubuntu, under windows the application runs with the integrated intel graphics as well as with the nvidia card. Under ubuntu the nvidia is completely disabled, we had bumblebee/ironhide installed but it failed to disable the nvidia card (there is no switch) so the battery life went down 50% and we disabled the nvidia card via acpi_calls, meaning we cant use them now. We also removed the nvidia drivers. Maybe now there is one package missing needed for the canvas to be bound to a X window?

I don't know if the problem comes from mesa, how could I find out?
Reply | Threaded
Open this post in threaded view
|

Re: Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

gouessej
Administrator
Try to check if some other persons have the same problem with a similar chip and the same version of Mesa.

Try to know where it gets frozen in the native code.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

SciePy
Yes, another laptop with optimus and same version of mesa has exact same problem. There the nvidia card is also disabled via acpi_call.

In the java code it freezes in this line: "frame.add(canvas);".
Reply | Threaded
Open this post in threaded view
|

Re: Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

toggles

I have the same problem with the X11 ati driver, code locks at window.add(canvas); I installed fglrx which "fixed" the problem for me, unfortunately gnome-shell is now having fits with fglrx.

Cheers.
Reply | Threaded
Open this post in threaded view
|

Re: Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

SciePy
Ok thanks for your reply. I'm gonna give this a try as well.
We now got it to work using bumblembee and the nvidia card, still not working with the intel. At least bumblebee is able to switch off the nvidia card so there is not more battery drainage.
Reply | Threaded
Open this post in threaded view
|

Re: Window freezes on Nvidia Optimus Laptops, Ubuntu 11.10

toggles

Just a quick update, the "crack" from the xorg-edgers seems to have fixed the gnome-shell issues, so it looks like I'm set.

https://launchpad.net/~xorg-edgers/+archive/ppa

Cheers.