Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display

I’ve been using Rawhide these last couple of weeks for an early look for GNOME 47, and while things have been working quite solid, from a couple of days back to today’s build I’ve been facing this issue while trying to open any non-Flatpak GNOME app (in my case, the only ones I have installed like this are Nautilus and Software). It also breaks opening the file portal on Firefox. I suspect it was due to the latest NVIDIA drivers, as it started as soon as the switch from the 555 to 560 drivers happened (and I have a GTX1050Ti).

Here are the complete logs trying to run Nautilus with WAYLAND_DEBUG=1, the main focus seem to be on this part, right at the end:

[2776872.095] {Display Queue} wl_display#1.error(wl_surface#41, 0, "DRM Syncobj surface object already created for surface 41")

Things are working fine on Rawhide.20240725.n.0 (2024-07-25T06:09:06Z) and aren’t on Rawhide.20240805.n.0 (2024-08-05T06:08:01Z).

I’d love some help on how to debug this and help find the issue.

5 Likes

Adicionou f41 e removeu f39, flatpak

This seems to be related to libglvnd-opengl. Not sure though. I removed Nvidia drivers on whim and it solved it.

The root cause might have been nvidia_drm.modeset=1 missing from kernel cmdline.

Yup, for now I’m using my laptop without them just as a way to not have to revert back to F40, I’ll keep an eye out for any workaround or solution though.

bz: 2301725 – Error 71 (Protocol error) dispatching to Wayland display.

3 Likes

As for the workaround, I’m also on Fedora rawhide (also waiting for 41), I added:

GSK_RENDERER=gl

to ~/.config/environment.d/gsk.conf, and restarted.

9 Likes

Out of curiosity, do you all happen to be using laptops with hybrid graphics? I’m trying Fedora 41 on an Nvidia only desktop and its not able to properly get to gdm, it’s stuck on showing a black screen with the cursor. I believe this issue could be the cause, although the problem happens as well under X11.

At least in my case, yes, laptop with hybrid Intel + NVIDIA graphics.

1 Like

Same.

2 Likes

Not on rawhide but on fedora 41 beta, getting this error when ever I try to launch gnome apps under wayland using my nvidia gpu.

Running fedora 41 beta on laptop with intel i5 8265u, intel/nvidia hybrid graphics.

1 Like

This worked, thanks!

1 Like

hybrid

2 Likes

On a hybrid laptop and still experiencing this issue as well, cannot open gnome apps like nautilus and gnome-control-center, same errors and warnings. On F41 prerelease, mesa-git, mutter and gnome-shell 47 stable, not rc.

Posting mesa issue here for exposure, no activity in it yet, rhbz link already posted above: Error 71 (Protocol error) dispatching to Wayland display. (#11723) · Issues · Mesa / mesa · GitLab

2 Likes

this breaks gnome-shell

Module gnome-shell from rpm gnome-shell-47.0-1.fc41.x86_64
...
 #0  0x00007f411448f5b5 free (libc.so.6 + 0x815b5)
 #1  0x00007f4114d22d45 g_free (libglib-2.0.so.0 + 0x40d45)
 #2  0x00007f4114d0aa74 g_error_free (libglib-2.0.so.0 + 0x28a74)
 #3  0x00007f4114bb8cb6 _ZN13GIWrapperBaseI9ErrorBase14ErrorPrototype13ErrorInstanceE8finalizeEPN2JS9GCContextEP8>
 #4  0x00007f4112e23cbb _ZL19FinalizeTypedArenasI8JSObjectEbPN2JS9GCContextERN2js2gc9ArenaListERNS5_15SortedArena>
 #5  0x00007f4112e0cfd0 _ZN2js2gc9GCRuntime18backgroundFinalizeEPN2JS9GCContextEPNS2_4ZoneENS0_9AllocKindEPPNS0_5>
 #6  0x00007f4112e11ee1 _ZN2js2gc19BackgroundSweepTask3runERNS_25AutoLockHelperThreadStateE (libmozjs-128.so.0 + >
 #7  0x00007f4112ddb953 _ZN2js14GCParallelTask7runTaskEPN2JS9GCContextERNS_25AutoLockHelperThreadStateE (libmozjs>
 #8  0x00007f4112ddaf81 _ZN2js14GCParallelTask17runFromMainThreadEv (libmozjs-128.so.0 + 0x5daf81)
 #9  0x00007f4112e196d5 _ZN2js2gc9GCRuntime21endSweepingSweepGroupEPN2JS9GCContextERNS_11SliceBudgetE (libmozjs-1>
 #10 0x00007f4112e270ac _ZN11sweepaction19SweepActionSequence3runERN2js2gc11SweepAction4ArgsE (libmozjs-128.so.0 >
 #11 0x00007f4112e24b53 _ZN11sweepaction18SweepActionForEachIN2js2gc15SweepGroupsIterEP9JSRuntimeE3runERNS2_11Swe>
 #12 0x00007f4112e1cbb3 _ZN2js2gc9GCRuntime19performSweepActionsERNS_11SliceBudgetE (libmozjs-128.so.0 + 0x61cbb3)
 #13 0x00007f4112dc9b95 _ZN2js2gc9GCRuntime16incrementalSliceERNS_11SliceBudgetEN2JS8GCReasonEb (libmozjs-128.so.>
 #14 0x00007f4112dceabc _ZN2js2gc9GCRuntime7gcCycleEbRKNS_11SliceBudgetEN2JS8GCReasonE (libmozjs-128.so.0 + 0x5ce>
 #15 0x00007f4112dcf260 _ZN2js2gc9GCRuntime7collectEbRKNS_11SliceBudgetEN2JS8GCReasonE (libmozjs-128.so.0 + 0x5cf>
 #16 0x00007f4112ba02aa _Z5JS_GCP9JSContextN2JS8GCReasonE (libmozjs-128.so.0 + 0x3a02aa)
 #17 0x00007f4114bead9a _ZL19gjs_context_disposeP8_GObject (libgjs.so.0 + 0x73d9a)
 #18 0x00007f4115339c38 g_object_unref (libgobject-2.0.so.0 + 0x16c38)
 #19 0x000055fb2aa282c3 main (gnome-shell + 0x22c3)
 #20 0x00007f4114411248 __libc_start_call_main (libc.so.6 + 0x3248)
 #21 0x00007f411441130b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x330b)
 #22 0x000055fb2aa28405 _start (gnome-shell + 0x2405)

This worked for me as well, I’m on amd+nvidia hybrid graphics.
The only change I made was that I went with the new OpenGL renderer instead and it works for me.

I’m assuming the default is vulkan now, which might be the problem, can anyone verify this?

so basically I did this
mkdir -p ~/.config/environment.d
echo "GSK_RENDERER=ngl" >> ~/.config/environment.d/gsk.conf

6 Likes

Same thing for me on F41 Beta. Ryzen+Nvidia. I tried reinstalling the nvidia driver, and nothing. (Same with libglvnd*.) GNOME (Wayland) didn’t open gnome apps at all (like nautilus), but GNOME (Xorg) did.

Setting GSK_RENDERER=gl to ~/.config/environment.d/gsk.conf makes nautilus open again!
Other things like google-chrome were unaffected.

Is this ready for a bug report…? https://bugzilla.redhat.com/buglist.cgi?quicksearch=gdk-message

I can’t believe this isn’t a bigger issue. I have over a dozen flatpak apps that won’t open now. Acer laptop with Intel/Nvidia hybrid graphics on Gnome 40 Wayland. To get my gnome 47 runtime supporting flatpaks to work since they won’t launch due to mesas new vulkan default render, I have to use Flatseal for each flatpak and turn off “Wayland Windowing System” to allow the flatpak to fallback to X11 and actually launch again, but that is not an ideal solution or fix and the apps run super slow and janky in that way. Breaking flatpaks like this should never be happening like this. Sigh…

5 Likes

I’m affected by this issue still (Intel/Nvidia hybrid graphics laptop on Gnome Wayland) and if I use GSK_RENDERER=ngl or GSK_RENDERER=gl they both allow for a fix so that my flatpaks open again, so in my case either option works.

I think the issue has been fixed upstream, caused by a bug in GTK: wayland: Don't call gdk_display_sync() (!7726) · Merge requests · GNOME / gtk · GitLab, now we wait for GTK 4.16.2 to filter down to our systems

1 Like

gtk4-4.16.2 has been built in koji and the included fix in the MR you mentioned does not solve this issue.