PDA

View Full Version : "Unrecognized OpenGL version" under VirtualBox



trivelt
2nd September 2014, 09:37
Hi!
I have a remote build-machine with Jenkins and I'm trying to run GUI application written in Qt 5 (my version is 5.2.1). In Jenkins I installed Xvnc plugin, which uses TightVNC Server, but each build has failed.
Earlier, there was a problem with loading driver swrast (by libGL), currently in the log there are this lines:


Xlib: extension "RANDR" missing on display ":51".
(...)
Xlib: extension "GLX" missing on display ":51".
Terminating xvnc.
$ vncserver -kill :51
Killing Xtightvnc process ID 22513

When I changed system to use Xvnc4server instead of tightvncserver, the output is:


[Warning] QXcbConnection: Failed to initialize XRandr
[Warning] Qt: XKEYBOARD extension not present on the X server.
(...)
[Warning] Unrecognized OpenGL version
[Warning] Unrecognized OpenGL version
Terminating xvnc.
$ vncserver -kill :47
Killing Xvnc4 process ID 26522

Remote desktop is Ubuntu 14.04 running over VirtualBox, so I installed VBoxAddons but it didn't resolve the problem. Below I'm putting some logs, maybe helpful for you.


$ cat /var/log/Xorg.0.log | grep GL -is
[266219.686] (II) LoadModule: "glx"
[266219.686] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/modules/extensions/libglx.so
[266219.687] (II) Module glx: vendor="Advanced Micro Devices, Inc."
[266219.687] Loading extension GLX
[266219.687] (==) Assigned the driver to the xf86ConfigLayout


$ lsmod | grep box
vboxsf 43786 0
vboxpci 23194 0
vboxnetadp 25670 0
vboxnetflt 27613 0
vboxdrv 339502 3 vboxnetadp,vboxnetflt,vboxpci
vboxvideo 12658 0
vboxguest 248441 8 vboxsf
drm 302817 1 vboxvideo

$ lspci | grep VGA
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter

$ glxinfo
Error: unable to open display

I found informations about warning " Unrecognized OpenGL version" as a bug in older Qt versions, but what is solution for my problem?

anda_skoa
2nd September 2014, 09:57
Since this is for a continuous integration system, have you tried using the "minimal" platform plugin instead?
As far as I understand this even works headless, i.e. wihout VNC

Cheers,
_

trivelt
2nd September 2014, 11:25
What do you mean writing about "minimal platform"? Previously I tried to run (over Jenkins) Qt GUI applications without VNC and theoretically it worked, but I had other problem because of this.

anda_skoa
2nd September 2014, 12:48
One of the Qt platform abstraction plugins is called "minimal", the output is something like libqminimal.so
There is also a variant that has OpenGL, "minimalegl" respectively "libqminimalegl.so"

See qtbase/src/plugins/platforms/minimal and qtbase/src/plugins/platforms/minimalegl

Cheers,
_

faldzip
2nd September 2014, 14:56
$ glxinfo
Error: unable to open display

Did you run this over ssh? What happen if you run this:


DISPLAY=:0 glxinfo

?

trivelt
3rd September 2014, 10:14
Yes, I run it over ssh.


$DISPLAY=:0 glxinfo
name of display: :0
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 19 (X_GLXQueryServerString)
Serial number of failed request: 12
Current serial number in output stream: 12


It looks bad, but I have an access to another remote server with Jenkins (and Ubuntu 12.04 with Qt 4.8) and glxinfo (with DISPLAY=:0) gives the same result. And in spite of it, all works fine. I read here (http://www.gamedev.net/topic/564869-unrecognized-opengl-version/#entry4617528) that "Unrecognized OpenGL version" warning is caused by unexpected by Qt format of OpenGL string version (VirtualBox graphic drivers...), is it true?

faldzip
3rd September 2014, 11:52
Did you try running the "DISPLAY=:0 glxgears -info" ?

trivelt
4th September 2014, 11:23
Yes, I tried it, but result of "DISPLAY=:0 glxgears -info" is the same as "DISPLAY=:0 glxinfo". Maybe there is other way to run GUI Qt application on Jenkins (not using VNC)? I don't know to what extent this is related to Qt, but this is the only forum, where somebody replies. ;)

anda_skoa
4th September 2014, 12:18
So, have you tried the minimal backends?
Or do you absolutely have to see the visual output?

Cheers,
_

trivelt
5th September 2014, 07:52
When I'm using the "-platform minimal", my GUI app starts over SSH, but only for one user. If I'm logged on "jenkins" user:


No protocol specified

(myApp:6080): Gtk-WARNING **: cannot open display: :0

I did "xhost +localhost", but it didn't resolve the problem.

Running with "platform -minimalegl" causes:



No protocol specified
No protocol specified
libEGL warning: DRI2: xcb_connect failed
No protocol specified
libEGL warning: DRI2: xcb_connect failed
No protocol specified
No protocol specified
libEGL warning: GLX: XOpenDisplay failed
07:30:34.553 [Warning] Could not initialize egl display

07:30:34.554 [Error] EGL error
Aborted (core dumped)

when I'm logged on "jenkins", and:


07:31:49.580 [Warning] Opened display 0x15283b0

X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 19 (X_GLXQueryServerString)
Serial number of failed request: 13
Current serial number in output stream: 13
on a second user.

And one more thing: When I'm running from non-jenkins user with "-platform minimal" it looks ok, but after [Ctrl]+[C] (to stop application), I see on the console:


07:32:35.076 [Warning] WARNING: The web process experienced a crash on ''.
07:32:35.077 [Warning] WARNING: The web process experienced a crash on ''.
07:32:35.082 [Warning] This plugin does not support createPlatformOpenGLContext!
07:32:35.083 [Warning] QtQuick: failed to create OpenGL context

anda_skoa
5th September 2014, 08:57
Hmm, what about the offscreen platform?

Cheers,
_

trivelt
5th September 2014, 09:03
I tested all available platforms:
offscreen, kms, linuxfb, minimal:

(myApp:22797): Gtk-WARNING **: cannot open display: :0

kms:

pci id for fd 7: 80ee:beef, driver (null)
No protocol specified
pci id for fd 7: 80ee:beef, driver (null)
No protocol specified
pci id for fd 9: 80ee:beef, driver (null)
pci id for fd 9: 80ee:beef, driver (null)
No protocol specified
pci id for fd 9: 80ee:beef, driver (null)
No protocol specified
pci id for fd 10: 80ee:beef, driver (null)
pci id for fd 10: 80ee:beef, driver (null)
No protocol specified
pci id for fd 10: 80ee:beef, driver (null)
No protocol specified
pci id for fd 11: 80ee:beef, driver (null)
pci id for fd 11: 80ee:beef, driver (null)
No protocol specified
pci id for fd 11: 80ee:beef, driver (null)
08:42:58.322 [Warning] Could not initialize EGL display
08:42:58.322 [Error] EGL error
Aborted (core dumped)

xcb:

No protocol specified
08:44:35.494 [Error] QXcbConnection: Could not connect to display :0
Aborted (core dumped)

faldzip
5th September 2014, 14:26
Okay, so to clarify - all your tests from previous post was done through VNC?
Did you try running your Qt app on local VirtualBox machine?

trivelt
12th September 2014, 10:45
Sorry for long silence. I resolved the problem by typing "xhost +SI:localuser:jenkins" and using "-platform minimal". Thank you all for your help!