Gdk-Message: Error 71 (Protocol error) with Minigalaxy on Fedora 41 - NVIDIA 565.77

Hello everyone,

I’m experiencing the “Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display” issue on Fedora 41. I’m seeing it with Minigalaxy (a Flatpak application). The application crashes immediately after launching, displaying the error in the terminal.

I’ve tried the following troubleshooting steps without success:

  • Setting the environment variable GSK_RENDERER=gl before launching the application.
  • Reinstalling the application.

I’m using an NVIDIA GeForce RTX 3060 Ti with the proprietary NVIDIA driver version 565.77. So, updating to the 565 driver (as suggested in some other threads) is not a solution for me, as I’m already on that version.

This seems to be related to Wayland and possibly graphics drivers. I’m running Fedora 41 with Wayland.

Has anyone found any other workarounds or solutions? Any insights into what might be causing this issue would be greatly appreciated.

Thanks!

Is it only the minigalaxy flatpak app that fails?
Do you have other flatpak apps do they work?
Do you see any non-flatpak app fail?

1 Like

Hi Barry, Thanks for your help. To answer your questions:

  1. I have installed “Minigalaxy” first from rpm then from flatpack. Both issues are the same. I stayed with flatpack because it has a newer version.
  2. Other flatpak apps work fine.
  3. I don’t see any non-flatpak apps fail in this way.

I also have some other system issue “Persistent ACPI/_DSM, GPU Power, and Freezing Issues” which might be related to this particular issue, but it doesn’t have to be. I’ve tried a few things already, based on suggestions from others:

a) Forcing Minigalaxy to use XWayland with flatpak run --env=GDK_BACKEND=x11. This allows Minigalaxy to launch further, but it still crashes.
b) Installing the gtk2-engines package. This didn’t resolve the issue.

The errors I’m seeing now are:

Failed to load module "canberra-gtk-module"
Failed to load module "pk-gtk-module"
Failed to create GBM buffer of size 386x494: Invalid argument
gtk_main_quit: assertion 'main_loops != NULL' failed

The Failed to create GBM buffer error seems the most significant. Any ideas what might be causing that?

I suggest you install the rpm version, reproduce the bug and report details in the Fedora bugtracker against minigalaxy.
That way the maintainer can figure out what is wrong.

it fails because webkit2 does silly things and does not work well with wayland and explicit-sync enabled with NVIDIA drivers.

WEBKIT_DISABLE_DMABUF_RENDERER=1

1 Like

Thanks, Mark!

That’s helpful information. I was able to get Minigalaxy working with help from users on the Minigalaxy GitHub issue tracker. The command that worked for me was:

flatpak run --env=GDK_BACKEND=x11 --env=WEBKIT_DISABLE_COMPOSITING_MODE=1 io.github.sharkwouter.Minigalaxy

Since this seems to be related to webkit2gtk, Wayland, and NVIDIA drivers, is there a good place to report this or contribute to a fix for the wider community? I’m not sure if this is something that should be reported to the Fedora project, the WebKitGTK project, or somewhere else entirely. Any suggestions on where to direct this information would be appreciated!

it’s a webkit issue. If you have GNOME, then open settings and press ‘F1’ for help. The window is empty without the env.

1 Like

Hi Mark,

Thanks for the suggestion. I tried pressing F1 in GNOME Settings, but the help window is indeed empty, as you mentioned. It seems like this might be related to the WebKitGTK issue we’re discussing. Regarding WebKitGTK, I checked my system, and it appears that webkit2gtk4 is not installed. I ran the following commands to verify:

pkg-config --modversion webkit2gtk-4.0

This returned:
Package webkit2gtk-4.0 was not found in the pkg-config search path.

I also tried:

rpm -q webkit2gtk3

Which returned:
pakiet webkit2gtk3 nie jest zainstalowany (package webkit2gtk3 is not installed).

This might explain why Minigalaxy is having issues, as it likely depends on WebKitGTK for rendering. I’m considering installing webkit2gtk4 to see if it resolves the issue, but I wanted to check if there’s anything else I should be aware of before doing so. Do you think installing webkit2gtk4 could help, or is there another approach I should take?

Thanks again for your help!

these are the webkit rpms available on fedora41,

dnf list webkit\* --available
Updating and loading repositories:
Repositories loaded.
Available packages
webkit2-sharp.x86_64       0-0.22.20170219gita59fd76.fc41 fedora
webkit2-sharp-devel.i686   0-0.22.20170219gita59fd76.fc41 fedora
webkit2-sharp-devel.x86_64 0-0.22.20170219gita59fd76.fc41 fedora
webkit2gtk4.0.i686         2.46.5-1.fc41                  updates
webkit2gtk4.0.x86_64       2.46.5-1.fc41                  updates
webkit2gtk4.0-devel.i686   2.46.5-1.fc41                  updates
webkit2gtk4.0-devel.x86_64 2.46.5-1.fc41                  updates
webkit2gtk4.0-doc.noarch   2.46.5-1.fc41                  updates
webkit2gtk4.1.i686         2.46.6-1.fc41                  updates
webkit2gtk4.1.x86_64       2.46.6-1.fc41                  updates
webkit2gtk4.1-devel.i686   2.46.6-1.fc41                  updates
webkit2gtk4.1-devel.x86_64 2.46.6-1.fc41                  updates
webkit2gtk4.1-doc.noarch   2.46.6-1.fc41                  updates
webkitgtk6.0.i686          2.46.6-1.fc41                  updates
webkitgtk6.0.x86_64        2.46.6-1.fc41                  updates
webkitgtk6.0-devel.i686    2.46.6-1.fc41                  updates
webkitgtk6.0-devel.x86_64  2.46.6-1.fc41                  updates
webkitgtk6.0-doc.noarch    2.46.6-1.fc41                  updates

installed are on this test VM:

rpm -qa webkit\*
webkit2gtk4.1-2.46.6-1.fc41.x86_64
webkitgtk6.0-2.46.6-1.fc41.x86_64

dnf install minigalaxy would install webkit2gtk4.0 as dependency

yelp (the gnome help application) use webkit2gtk4.1

I added WEBKIT_DISABLE_DMABUF_RENDERER=1 to /etc/environment and this took care of all rpms using webkit.
I guess GDK_BACKEND=x11 WEBKIT_DISABLE_COMPOSITING_MODE=1 would also silence this error, but I did not want to force x11.

you can experiment from cli
WEBKIT_DISABLE_DMABUF_RENDERER=1 yelp

pkg-config can only find packages IF the corresponding <insert lib>-devel rpm is installed. It’s used when you try to compile something from source code.

1 Like

Hi Mark,

Thanks again for your help! I tested your suggestion with the following command to run Minigalaxy with debug logs and the WebKitGTK environment variables:

MG_DEBUG=1 WEBKIT_DISABLE_DMABUF_RENDERER=1 WEBKIT_DISABLE_COMPOSITING_MODE=1 flatpak run io.github.sharkwouter.Minigalaxy

The application launched successfully, and I proceeded to install Iron Harvest. However, I encountered an error during the installation process. Here’s the relevant part of the log:

2025-02-17 17:01:50,880 - minigalaxy - ERROR - Error installing game Iron Harvest
Traceback (most recent call last):
File “/app/lib/python3.11/site-packages/minigalaxy/installer.py”, line 268, in create_applications_file
with open(path_to_shortcut, ‘w+’) as desktop_file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] Nie ma takiego pliku ani katalogu: ‘/home/vertikal/.local/share/applications/Iron Harvest.desktop’

It seems that Minigalaxy is unable to create the desktop shortcut for Iron Harvest in /home/vertikal/.local/share/applications/. I’ve checked the directory, and it exists with the correct permissions (drwxr-x---), but the Flatpak seems to be unable to create the file.

I’ve opened a parallel thread on the Minigalaxy GitHub repository (Minigalaxy crashes on startup with "Error 71 (Błąd protokołu) dispatching to Wayland display" on Fedora 41 · Issue #647 · sharkwouter/minigalaxy · GitHub), and it seems like this might be a Flatpak sandboxing issue. Specifically, it appears that the Flatpak might not have the necessary permissions to create files in my user’s .local/share/applications/ directory.

Another user from the parallel forum pointed out that the Flatpak manifest is missing an entry for --filesystem:xdg-data/applications in the finish-args section. According to the Flatpak documentation, this is necessary for the application to have access to the .local/share/applications/ directory, where desktop shortcuts are typically created. Currently, the only filesystem access the Flatpak has is ~/GOG Games, which is quite limited, especially since this folder can be changed from within Minigalaxy.

This likely explains why Minigalaxy is unable to create the desktop shortcut for Iron Harvest, even though the directory exists and has the correct permissions.

I’ll keep you updated on any progress.

I do not use flatpaks much, so my knowledge is limited. But take a look at flatseal or similar programs to view and amend the sandbox settings for a flatpak.

I think this should not be necessary, and the creator of the minigalaxy flatpak should address this.

1 Like

Hi Mark,

Thanks for your suggestion about using Flatseal to view and amend the sandbox settings for Flatpak. I’ve been digging deeper into this issue, and it seems like the problem with Minigalaxy’s inability to create desktop shortcuts is more complex than just missing permissions in the Flatpak manifest.

I’ve been in touch with another user on the parallel forum (Minigalaxy crashes on startup with "Error 71 (Błąd protokołu) dispatching to Wayland display" on Fedora 41 · Issue #647 · sharkwouter/minigalaxy · GitHub), and they pointed out that the Flatpak manifest is missing an entry for --filesystem:xdg-data/applications in the finish-args section. This is necessary for the application to have access to the .local/share/applications/ directory, where desktop shortcuts are typically created.

However, when I tried to submit a pull request to add this entry, it was rejected because Flatpak’s linter no longer allows such changes. According to user GB609, this is due to Flatpak’s stricter policies around desktop shortcut creation, which they consider potentially dangerous. They referenced a few related issues, such as:

From what I can gather, the current solution proposed by Flatpak is to have users manually pass the required permission override when starting the application, rather than allowing the Flatpak to create desktop shortcuts by default.

I’ve left the pull request open (Flatpak version cannot create desktop shortcuts due to missing --filesystem:xdg-data/applications entry · Issue #78 · flathub/io.github.sharkwouter.Minigalaxy · GitHub) to document the attempted solution and provide context for the issue. I’ve also created a feature request on the Flatpak issue tracker to discuss the broader issue of desktop integration and potential solutions: flatpak/flatpak#6124. I’m hoping to get some feedback from the Flatpak developers on this, and if they come up with a viable solution, we can revisit the approach.

In the meantime, I’ll look into using Flatseal to manually adjust the sandbox settings for Minigalaxy, as you suggested. It’s not an ideal solution, but it might help work around the issue until a more permanent fix is available.

Thanks again for your help and guidance! I’ll keep you updated on any progress.


EDIT:

I wanted to leave the shortcut creation for now as it depends on the flatpak developers.

Regarding your proposal to run:

MG_DEBUG=1 WEBKIT_DISABLE_DMABUF_RENDERER=1 flatpak run io.github.sharkwouter.Minigalaxy

The client launched successfully. I installed Iron Harvest (with automatic shortcut creation disabled), but:

2025-02-18 22:16:39,437 - minigalaxy - INFO - Launch command for Iron Harvest: wine start /b /wait /d . release/IronHarvest.exe
wine: created the configuration directory ‘/home/vertikal/GOG Games/Iron Harvest/prefix’
002c:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
0054:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
004c:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
0054:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0054:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0054:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0054:err:ole:start_rpcss Failed to open RpcSs service
004c:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
004c:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
004c:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0090:fixme:file:NtLockFile I/O completion on lock not implemented yet
0090:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0090:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0090:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
00f0:fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet
0118:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0118:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0118:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0118:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
wine: configuration in L"/home/vertikal/GOG Games/Iron Harvest/prefix" has been updated.
0154:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0154:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1EFBA0
015c:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1FFEB0
01e0:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1FFEB0

When I ran MG_DEBUG=1 WEBKIT_DISABLE_DMABUF_RENDERER=1 WEBKIT_DISABLE_COMPOSITING_MODE=1 flatpak run io.github.sharkwouter.Minigalaxy

0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0118:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0118:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1EFBA0
0120:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1FFEB0
01a4:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1FFEB0