[winswitch] Xpra GL and gtkglext woes

Antoine Martin antoine at nagafix.co.uk
Mon Mar 5 19:50:05 GMT 2018


On 06/03/18 00:38, Ben Sferrazza via shifter-users wrote:
> Hi. I've built Xpra 2.2.4 on a Linux server at work which runs an old
> distribution, CentOS 5. The kernel is 2.6.18, but I've created a fully
> bootstrapped toolchain/binary/library environment that runs the latest
> version of glibc (2.19) for the kernel, gcc 7.3.0, and binutils 2.30,
> following most of the Linux From Scratch book. Everything I've thrown at it
> works well, even having built Xorg, GTK+2/3, and GUI applications. I made
> sure to build all the Xpra dependencies and built it with
> --prefix=/home/tools, which is where my updated environment is.
Impressive!

I am considering using a similar approach (maybe using snap / flatpack /
appimage) to continue to support CentOS 6 in the future.

> I have built Mesa, and am using the Xdummy xorg.conf. All seems well, but
> the Xpra client never showed the --start-child app of konsole. It had
> errors like this.
> 
> 2018-03-05 17:04:40,440 x_event_filter event=('xpra-create-event',
> None)/CreateNotify window=0x299
> 2018-03-05 17:04:40,440 cannot get gdk window for <gtk.gdk.Display object
> at 0x2ae82f5ea050 (GdkDisplayX11 at 0x1b3be1f0)>, 12582913
> 2018-03-05 17:04:40,441 XError: XError: 3 processing CreateNotify
> Traceback (most recent call last):
>   File "xpra/x11/gtk2/gdk_bindings.pyx", line 1062, in
> xpra.x11.gtk2.gdk_bindings.parse_xevent
>   File "xpra/x11/gtk2/gdk_bindings.pyx", line 914, in
> xpra.x11.gtk2.gdk_bindings._gw
> XError: XError: 3
> 2018-03-05 17:04:40,442 Some window in our event disappeared before we
> could handle the event 16/CreateNotify using ('xpra-create-event', None);
> so I'm just ignoring it instead. python event=<X11:CreateNotify
> {'delivered_to': '0x299', 'send_event': 0, 'serial': '0x36a', 'type': 16,
> 'display': ':100'}>
Error 3 is BadWindow. This usually means that the window got destroyed
before we could get hold of it. (X11 is asynchronous)
I assume that you got this error in your server log with some debug
flags enabled, right?

> So I then went ahead and installed gtkglext and the Python bindings,
> thinking it was somehow related to OpenGL.
What makes you think that?
What vfb are you using? Are you using Xdummy or Xvfb? Have you tried
switching to the other option? Does your vfb support opengl?
Is using VirtualGL an option?
(there's quite a bit on the wiki about all these options)

> However, passing --opengl=no on
> the command line when starting xpra appeared to do nothing.
Correct, it doesn't do anything to the server. This is a client command
line option for enabling the OpenGL accelerated rendering backend.

> But now I get
> this mysterious ImportError
> 
> 2018-03-05 17:04:38,809 err(xpra opengl)=xpra main error:
> Traceback (most recent call last):
>   File "/home/tools/lib/python/xpra/scripts/main.py", line 175, in main
>     return run_mode(script_file, err, options, args, mode, defaults)
>   File "/home/tools/lib/python/xpra/scripts/main.py", line 1517, in run_mode
>     return run_glcheck(options)
>   File "/home/tools/lib/python/xpra/scripts/main.py", line 2723, in
> run_glcheck
>     from xpra.client.gl.gtk_base.gtkgl_check import check_support
>   File "/home/tools/lib/python/xpra/client/gl/gtk_base/gtkgl_check.py",
> line 35, in <module>
>     from xpra.client.gl.gtk_base.gtk_compat import MODE_RGBA, MODE_ALPHA,
> MODE_RGB, MODE_DOUBLE, MODE_SINGLE, MODE_DEPTH
>   File "/home/tools/lib/python/xpra/client/gl/gtk_base/gtk_compat.py", line
> 59, in <module>
>     from gtk import gdkgl, gtkgl
>   File
> "/home/tools/lib/python2.7/site-packages/gtk-2.0/gtk/gdkgl/__init__.py",
> line 21, in <module>
>     from _gdkgl import *
> ImportError:
> /home/tools/lib/python2.7/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.so:
> undefined symbol: gdk_window_is_gl_capable
> 
> When I run strings on that _gdkgl.so, I get the following
> 
> bash-4.4$ strings _gdkgl.so | grep gdk_window_is_gl_capable
> gdk_window_is_gl_capable
> _wrap_gdk_window_is_gl_capable
> _wrap_gdk_window_is_gl_capable
> 
> and the function is defined in the following include file
> 
> /home/tools/include/gtkglext-1.0/gdk/gdkglwindow.h
> 
> bash-4.4$ grep gdk_window_is_gl_capable gdkglwindow.h
> gboolean     gdk_window_is_gl_capable       (GdkWindow   *window);
Looks like your build of pygtkgl is not quite right.
This is unrelated to the missing window problem.

During startup the xpra server probes the vfb's OpenGL capabilities by
running "xpra opengl" in a subprocess (so it won't crash the server if
opengl is somehow badly misconfigured to the point of causing crashes)
The message you are seeing just means that the probing fails.

> Perhaps the issue of not getting a window drawn is unrelated to the
> ImportError, but I'd like to fix both of these issues. Thank you for any
> help in solving this!
Is the window not being drawn, or not being shown at all?

Are you sure that the application (konsole in this case) is still
running and hasn't just crashed?
The best way to debug this is to launch an xterm instead, then run your
applications from there. Or maybe even with gdb if it does crash.

As for the gdkgl error, this is a build issue. I would just ignore it
and remove the package. Unless you also intend to use this same system
as an xpra client, in which case you do want accelerated rendering...

Cheers
Antoine


> 
> Ben
> _______________________________________________
> shifter-users mailing list
> shifter-users at lists.devloop.org.uk
> http://lists.devloop.org.uk/mailman/listinfo/shifter-users
> 




More information about the shifter-users mailing list