That makes sense. I added some icky debug printouts inside of the gstreamer1.0-vaapi plugin to see if I could better understand what's going on with this issue.
What's happening in Xubuntu is when you log in, tumblerd starts up. tumblerd is a thumbnail creator, so it makes sense that it would interact with GStreamer. tumblerd ends up doing something that invokes gst-plugin-scanner, which loads the GStreamer vaapi plugin and leads to the crash. The second time you log in, tumblerd is already running so it doesn't repeat the plugin scan process and thus doesn't crash. But, you can also cause the X11 crash to happen again at any time by typing:
gst-inspect-1.0
into your terminal. This crashes repeatably every time for me. Basically GStreamer is completely useless in Xubuntu 24.04 right now, at least inside of a VMware VM.
In fact, I can install a different flavor of Ubuntu such as Ubuntu MATE in a VM, and install the problematic plugins:
...and cause the exact same crash to occur by running gst-inspect-1.0.
Here's a backtrace of the code path in gst-plugin-scanner that is leading to the request to Xorg that crashes it. No idea where the fault lies, but something about this sequence makes Xorg unhappy:
#0 _XReply (dpy=dpy@entry=0x55555558dce0, rep=rep@entry=0x7fffffffd6f0, extra=extra@entry=0, discard=discard@entry=0)
at ../../src/xcb_io.c:680
#1 0x00007ffff752a3d0 in VA_DRI2Authenticate (dpy=dpy@entry=0x55555558dce0, window=1046, magic=magic@entry=1)
at ../va/x11/va_dri2.c:225
#2 0x00007ffff7c138ed in va_drm_authenticate_x11 (fd=fd@entry=6, magic=magic@entry=1) at ../va/drm/va_drm_auth_x11.c:140
#3 0x00007ffff7c135d5 in va_drm_authenticate (fd=6, magic=1) at ../va/drm/va_drm_auth.c:37
#4 0x00007ffff7c134bd in va_DisplayContextConnect (pDisplayContext=<optimized out>) at ../va/drm/va_drm.c:62
#5 va_DisplayContextGetDriverNames (pDisplayContext=<optimized out>, drivers=0x7fffffffd890, num_drivers=0x7fffffffd884)
at ../va/drm/va_drm.c:79
#6 0x00007ffff781729e in va_new_opendriver (dpy=0x55555558d310) at ../va/va.c:681
#7 vaInitialize
(dpy=dpy@entry=0x55555558d310, major_version=major_version@entry=0x7fffffffdb34, minor_version=minor_version@entry=0x7fffffffdb30) at ../va/va.c:743
#8 0x00007ffff7f496d0 in vaapi_initialize (dpy=0x55555558d310) at ../gst-libs/gst/vaapi/gstvaapiutils.c:113
#9 0x00007ffff7f6db73 in supports_vaapi (fd=6) at ../gst-libs/gst/vaapi/gstvaapidisplay_drm.c:77
#10 get_default_device_path (display=0x5555555892a0 [GstVaapiDisplayDRM|vaapidisplaydrm1])
at ../gst-libs/gst/vaapi/gstvaapidisplay_drm.c:140
#11 set_device_path (device_path=<optimized out>, display=0x5555555892a0 [GstVaapiDisplayDRM|vaapidisplaydrm1])
at ../gst-libs/gst/vaapi/gstvaapidisplay_drm.c:181
#12 gst_vaapi_display_drm_open_display (display=0x5555555892a0 [GstVaapiDisplayDRM|vaapidisplaydrm1], name=<optimized out>)
at ../gst-libs/gst/vaapi/gstvaapidisplay_drm.c:247
#13 0x00007ffff7f4a68b in gst_vaapi_display_create
(data=0x0, init_type=GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME, display=0x5555555892a0 [GstVaapiDisplayDRM|vaapidisplaydrm1])
at ../gst-libs/gst/vaapi/gstvaapidisplay.c:965
#14 gst_vaapi_display_config
(display=0x5555555892a0 [GstVaapiDisplayDRM|vaapidisplaydrm1], init_type=GST_VAAPI_DISPLAY_INIT_FROM_DISPLAY_NAME, init_value=0x0) at ../gst-libs/gst/vaapi/gstvaapidisplay.c:1272
#15 0x00007ffff7f709a1 in gst_vaapi_display_drm_new (device_path=0x0) at ../gst-libs/gst/vaapi/gstvaapidisplay_drm.c:367
#16 0x00007ffff7f0c295 in gst_vaapi_create_test_display () at ../gst/vaapi/gstvaapipluginutil.c:929
#17 plugin_init (plugin=0x555555585b10 [GstPlugin|plugin1]) at ../gst/vaapi/gstvaapi.c:191
#18 0x00007ffff7e22452 in gst_plugin_register_func
(plugin=plugin@entry=0x555555585b10 [GstPlugin|plugin1], desc=desc@entry=0x7ffff7fb71a0 <gst_plugin_desc>, user_data=user_data@entry=0x0) at ../gst/gstplugin.c:540
#19 0x00007ffff7e279c0 in _priv_gst_plugin_load_file_for_registry
(filename=0x55555558122c "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so", registry=<optimized out>, error=<optimized out>) at ../gst/gstplugin.c:979
#20 0x00007ffff7e6ed41 in do_plugin_load
(tag=0, filename=0x55555558122c "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so", l=<optimized out>)
at ../gst/gstpluginloader.c:741
#21 handle_rx_packet
(payload_len=<optimized out>, payload=0x55555558122c "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so", tag=0, pack_type=<optimized out>, l=<optimized out>) at ../gst/gstpluginloader.c:849
#22 read_one (l=0x555555584a30) at ../gst/gstpluginloader.c:1025
#23 exchange_packets (l=l@entry=0x555555584a30) at ../gst/gstpluginloader.c:1053
#24 0x00007ffff7e703a8 in _gst_plugin_loader_client_run (pipe_name=pipe_name@entry=0x0) at ../gst/gstpluginloader.c:596
#25 0x00005555555551db in main (argc=<optimized out>, argv=<optimized out>) at ../libs/gst/helpers/gst-plugin-scanner.c:81
That makes sense. I added some icky debug printouts inside of the gstreamer1.0-vaapi plugin to see if I could better understand what's going on with this issue.
What's happening in Xubuntu is when you log in, tumblerd starts up. tumblerd is a thumbnail creator, so it makes sense that it would interact with GStreamer. tumblerd ends up doing something that invokes gst-plugin-scanner, which loads the GStreamer vaapi plugin and leads to the crash. The second time you log in, tumblerd is already running so it doesn't repeat the plugin scan process and thus doesn't crash. But, you can also cause the X11 crash to happen again at any time by typing:
gst-inspect-1.0
into your terminal. This crashes repeatably every time for me. Basically GStreamer is completely useless in Xubuntu 24.04 right now, at least inside of a VMware VM.
In fact, I can install a different flavor of Ubuntu such as Ubuntu MATE in a VM, and install the problematic plugins:
sudo apt install gstreamer1.0-vaapi gstreamer1.0-tools
...and cause the exact same crash to occur by running gst-inspect-1.0.
Here's a backtrace of the code path in gst-plugin-scanner that is leading to the request to Xorg that crashes it. No idea where the fault lies, but something about this sequence makes Xorg unhappy:
#0 _XReply (dpy=dpy@ entry=0x5555555 8dce0, rep=rep@ entry=0x7ffffff fd6f0, extra=extra@ entry=0, discard= discard@ entry=0) xcb_io. c:680 entry=0x5555555 8dce0, window=1046, magic=magic@ entry=1) va_dri2. c:225 authenticate_ x11 (fd=fd@entry=6, magic=magic@ entry=1) at ../va/drm/ va_drm_ auth_x11. c:140 va_drm_ auth.c: 37 xtConnect (pDisplayContex t=<optimized out>) at ../va/drm/ va_drm. c:62 xtGetDriverName s (pDisplayContex t=<optimized out>, drivers= 0x7fffffffd890, num_drivers= 0x7fffffffd884) va_drm. c:79 d310) at ../va/va.c:681 dpy@entry= 0x55555558d310, major_version= major_version@ entry=0x7ffffff fdb34, minor_version= minor_version@ entry=0x7ffffff fdb30) at ../va/va.c:743 d310) at ../gst- libs/gst/ vaapi/gstvaapiu tils.c: 113 libs/gst/ vaapi/gstvaapid isplay_ drm.c:77 device_ path (display= 0x5555555892a0 [GstVaapiDispla yDRM|vaapidispl aydrm1] ) libs/gst/ vaapi/gstvaapid isplay_ drm.c:140 path=<optimized out>, display= 0x5555555892a0 [GstVaapiDispla yDRM|vaapidispl aydrm1] ) libs/gst/ vaapi/gstvaapid isplay_ drm.c:181 display_ drm_open_ display (display= 0x5555555892a0 [GstVaapiDispla yDRM|vaapidispl aydrm1] , name=<optimized out>) libs/gst/ vaapi/gstvaapid isplay_ drm.c:247 display_ create GST_VAAPI_ DISPLAY_ INIT_FROM_ DISPLAY_ NAME, display= 0x5555555892a0 [GstVaapiDispla yDRM|vaapidispl aydrm1] ) libs/gst/ vaapi/gstvaapid isplay. c:965 display_ config 0x5555555892a0 [GstVaapiDispla yDRM|vaapidispl aydrm1] , init_type= GST_VAAPI_ DISPLAY_ INIT_FROM_ DISPLAY_ NAME, init_value=0x0) at ../gst- libs/gst/ vaapi/gstvaapid isplay. c:1272 display_ drm_new (device_path=0x0) at ../gst- libs/gst/ vaapi/gstvaapid isplay_ drm.c:367 create_ test_display () at ../gst/ vaapi/gstvaapip luginutil. c:929 0x555555585b10 [GstPlugin| plugin1] ) at ../gst/ vaapi/gstvaapi. c:191 register_ func plugin@ entry=0x5555555 85b10 [GstPlugin| plugin1] , desc=desc@ entry=0x7ffff7f b71a0 <gst_plugin_desc>, user_data= user_data@ entry=0x0) at ../gst/ gstplugin. c:540 plugin_ load_file_ for_registry 0x55555558122c "/usr/lib/ x86_64- linux-gnu/ gstreamer- 1.0/libgstvaapi .so", registry=<optimized out>, error=<optimized out>) at ../gst/ gstplugin. c:979 0x55555558122c "/usr/lib/ x86_64- linux-gnu/ gstreamer- 1.0/libgstvaapi .so", l=<optimized out>) gstpluginloader .c:741 len=<optimized out>, payload= 0x55555558122c "/usr/lib/ x86_64- linux-gnu/ gstreamer- 1.0/libgstvaapi .so", tag=0, pack_type= <optimized out>, l=<optimized out>) at ../gst/ gstpluginloader .c:849 gstpluginloader .c:1025 0x555555584a30) at ../gst/ gstpluginloader .c:1053 loader_ client_ run (pipe_name= pipe_name@ entry=0x0) at ../gst/ gstpluginloader .c:596 gst/helpers/ gst-plugin- scanner. c:81
at ../../src/
#1 0x00007ffff752a3d0 in VA_DRI2Authenticate (dpy=dpy@
at ../va/x11/
#2 0x00007ffff7c138ed in va_drm_
#3 0x00007ffff7c135d5 in va_drm_authenticate (fd=6, magic=1) at ../va/drm/
#4 0x00007ffff7c134bd in va_DisplayConte
#5 va_DisplayConte
at ../va/drm/
#6 0x00007ffff781729e in va_new_opendriver (dpy=0x55555558
#7 vaInitialize
(dpy=
#8 0x00007ffff7f496d0 in vaapi_initialize (dpy=0x55555558
#9 0x00007ffff7f6db73 in supports_vaapi (fd=6) at ../gst-
#10 get_default_
at ../gst-
#11 set_device_path (device_
at ../gst-
#12 gst_vaapi_
at ../gst-
#13 0x00007ffff7f4a68b in gst_vaapi_
(data=0x0, init_type=
at ../gst-
#14 gst_vaapi_
(display=
#15 0x00007ffff7f709a1 in gst_vaapi_
#16 0x00007ffff7f0c295 in gst_vaapi_
#17 plugin_init (plugin=
#18 0x00007ffff7e22452 in gst_plugin_
(plugin=
#19 0x00007ffff7e279c0 in _priv_gst_
(filename=
#20 0x00007ffff7e6ed41 in do_plugin_load
(tag=0, filename=
at ../gst/
#21 handle_rx_packet
(payload_
#22 read_one (l=0x555555584a30) at ../gst/
#23 exchange_packets (l=l@entry=
#24 0x00007ffff7e703a8 in _gst_plugin_
#25 0x00005555555551db in main (argc=<optimized out>, argv=<optimized out>) at ../libs/