I'm trying to get jogl to render offscreen using the mesa software driver and xvfb on a headless server in a VM. I keep getting the errors below. Any ideas?
$ glxinfo name of display: localhost:1.1 Error: couldn't find RGB GLX visual or fbconfig java -jar MyJar.jar Unable to initialize shared context using PBuffer, falling back to displayable context creation.javax.media.opengl.GLException: Profile GL2GL3 is not available on null, but: [] at javax.media.opengl.GLProfile.get(GLProfile.java:818) at javax.media.opengl.GLProfile.get(GLProfile.java:831) Caused by: javax.media.opengl.GLException: Profile GL2GL3 is not available on X11GraphicsDevice[type X11, connection localhost:1.1, unitID 0, handle 0x0], but: [] at javax.media.opengl.GLProfile.get(GLProfile.java:818) at javax.media.opengl.GLProfile.get(GLProfile.java:831) - Stephen |
Administrator
|
Hi
Have you installed libgl1-mesa-swrast? There is something wrong in the configuration of the kernel modules, the X server or in the driver. This is not related to JOGL in particular, I think you would get the same error message ("couldn't find RGB GLX visual or fbconfig ") with glxinfo.
Julien Gouesse | Personal blog | Website
|
I installed libosmesa6:amd64. The ubuntu package repo said libgl-mesa-swx11 contained libgl1-mesa-swrast and apt-get said libosmesa6 replaced it. glxinfo now gives me an "Error: unable to open display" message and my java app has the same exception as before. I know it's probably not a jogl issue but I hoped someone here would know how to set up offscreen, software rendering.
Thanks for the help; hopefully, if you're willing to debug this with me, we can figure it out. I posted the dpkg -l *mesa* output below if it helps. Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-========================================-=========================-=========================-===================================================================================== ii libg3dvl-mesa 9.1~git1212131047.200bb3~ amd64 xvmc and vdpau Gallium3D video acceleration drivers ii libgl1-mesa-dri:amd64 9.1~git1212131047.200bb3~ amd64 free implementation of the OpenGL API -- DRI modules ii libgl1-mesa-glx:amd64 9.1~git1212131047.200bb3~ amd64 free implementation of the OpenGL API -- GLX runtime ii libglapi-mesa:amd64 9.1~git1212131047.200bb3~ amd64 free implementation of the GL API -- shared library ii libglu1-mesa:amd64 9.0.0-0ubuntu1 amd64 Mesa OpenGL utility library (GLU) ii libosmesa6:amd64 9.1~git1212131047.200bb3~ amd64 Mesa Off-screen rendering extension ii mesa-utils 8.0.1+git20110129+d8f7d6b amd64 Miscellaneous Mesa GL utilities - Stephen - Stephen |
Administrator
|
Maybe it is a very basic problem of display. Sorry for the dumb question, do you run all these programs as root?
Edit.: do you run xhost +?
Julien Gouesse | Personal blog | Website
|
xhost +
xhost: unable to open display "" which happens if I do root or not. Also, when I run xvfb, it doesn;t list GLX as an extension and I have no idea why. It's running on a VM without a graphics card set up. I'm not an advanced linux user but hopefully it isn't something really simple that I am just missing so I don't feel too dumb. Thanks again for your help. edit: the export DISPLAY call I had in my xvfb script wasn't being picked up for some reason; doing it manually outputs the following for xhost + access control disabled, clients can connect from any host but I get the same error for glxinfo - Stephen |
Administrator
|
On 12/14/2012 04:02 PM, sranger [via jogamp] wrote:
> xhost + > xhost: unable to open display "" > > > which happens if I do root or not. Also, when I run xvfb, it doesn;t list GLX > as an extension and I have no idea why. It's running on a VM without a > graphics card set up. I'm not an advanced linux user but hopefully it isn't > something really simple that I am just missing so I don't feel too dumb. > Yeah, this is a basic X11 question related how to set your DISPLAY environment variable (or the NEWT Display connection name). Assume you don't have your X server you like to address on something default like ':0.0' > echo $DISPLAY :0 but like to use one (xvfb) on .. let's say 'localhost:1.1' > export DISPLAY="localhost:1.1" then pls try to access it via > xdpyinfo or anything else X11 (xeyes, glxgears, ..) if that works, JOGL should work there as well. If not, pls check the error message, as suggested you might need to set permission via either xauth or xhost ~Sven signature.asc (909 bytes) Download Attachment |
It looks like I'm missing the GLX extension for xvfb. xhost + seems to be disabling access control, xdpyinfo prints out information and doesn't seem to be being blocked (I don't know what the output should be, though), and glxinfo says "Error: couldn't find RGB GLX visual or fbconfig" and glxgears says "Error: couldn't get an RGB, Double-buffered visual". Any idea why the GLX extension isn't available and how I can get it installed? GLX is not listed in the xdpyinfo output under the extensions section. (I am running xvfb as root and my DISPLAY variable is set correctly.)
Thanks for your continued help. - Stephen |
Administrator
|
If you don't succeed in using xvfb, maybe try the dummy display driver, look at Xdummy. Otherwise, you have to recompile xvfb against Mesa so that it gets the proper GLX support.
Julien Gouesse | Personal blog | Website
|
So the mesa package available seems to be built with DRI rendering (and not xlib) so it won't work without a graphics card (from what I understand). So, I'm attempting to build mesa3d with xlib-glx enabled and dri disabled ('./configure --enable-xlib-glx --disable-dri' for anyone interested in my steps).
Thanks for the help; I'll post regarding my progress when it finishes. - Stephen |
So it does work but is way too slow for our purposes (~6 mins for a frame). So we started looking into headless with GPU. So far, if I start a desktop then switch to headless it works fine but if I start in headless mode and never load a desktop I can't get it working. Xorg is already running, lightdm is running, anything else I need for the graphics context to initialize correctly? (Sorry, this probably isn't the best forum for a question like this and if a mod would rather me look elsewhere, just let me know).
- Stephen |
Administrator
|
I have no idea but I'm glad to know you've obtained a result even though it is slow.
Julien Gouesse | Personal blog | Website
|
In reply to this post by sranger
Thanks, this helped me a lot!
This is what I did on an Ubuntu 12.04 LTS: 1. I had to install libxxf86vm1 and libgl1-mesa-swrast. 2. I installed flex, bison, python-libxml2 and tried Mesa-9.1 from source (the latest one). 3. I also installed libx11-dev, libxcb-glx0-dev, xorg-dev, libx11-xcb-dev, libxcb-dri2-0-dev, libxcb-xfixes0-dev and libdrm-dev for Mesa-9.1, but finally it turned out that this Mesa was too fresh for my Ubuntu. Since I was unable to finalize the configure process due to "Requested 'libdrm_radeon >= 2.4.42' but version of libdrm_radeon is 2.4.39" dependency error, I used Mesa-8.0.5 instead from ftp://ftp.freedesktop.org/pub/mesa/8.0.5/. 5. I had to install xutils-dev and llvm-dev finally to have all prerequisites for Mesa-8.0.5 to work. 6. I needed "./configure --enable-xlib-glx --disable-dri" to compile Mesa and then install it as root with "make install". After this I was able to run my JOGL2 application in xvfb. I don't know too much about speed because I start it for exporting a file. So there is not much to do with JOGL for my application at the moment. |
Free forum by Nabble | Edit this page |