Comment 25 for bug 1861609

Revision history for this message
Doug Brown (macg3) wrote (last edit ):

I'm running into this exact same problem with a fresh install of Xubuntu 24.04 running inside of VMware Workstation. During installation I did check both of the boxes about installing third party graphics/Wi-Fi software and downloading support for additional media formats.

Following along with comments from the upstream bug report at https://gitlab.freedesktop.org/xorg/xserver/-/issues/1053, I attempted to make DRI2Authenticate() more robust so that it doesn't hit the assertion if DRI2ScreenInit() hasn't been called yet:

--- a/hw/xfree86/dri2/dri2.c 2024-04-03 13:50:12.000000000 -0700
+++ b/hw/xfree86/dri2/dri2.c 2024-07-07 15:09:08.758039806 -0700
@@ -1362,9 +1362,14 @@ Bool
 DRI2Authenticate(ClientPtr client, ScreenPtr pScreen, uint32_t magic)
 {
     DRI2ScreenPtr ds;
- DRI2ClientPtr dri2_client = dri2ClientPrivate(client);
+ DRI2ClientPtr dri2_client;
     ScreenPtr primescreen;

+ if (!dri2ClientPrivateKey->initialized)
+ return FALSE;
+
+ dri2_client = dri2ClientPrivate(client);
+
     ds = DRI2GetScreenPrime(pScreen, dri2_client->prime_id);
     if (ds == NULL)
         return FALSE;

If I download the source code for xserver-xorg-core, apply this patch, build a new .deb, and install my newly built version of xserver-xorg-core_21.1.12-1ubuntu1_amd64.deb that includes this patch, the problem no longer occurs. I honestly have no idea what I'm doing inside the Xorg codebase though. Any chance someone with more experience than me on this package might be able to validate that the fix I made actually makes sense and is safe to do? It would be nice for Ubuntu to package a fix for this issue -- it's very annoying to have to log in twice after a reboot, and then deal with a bunch of apport crash warnings on various other xfce4 processes afterward.

Edit: The text formatting of the patch looks like it gets slightly screwed up by Launchpad, but it still gets the gist of the change across.