Best way to set permissions of X11 & Wayland?

There are three permissions for each flatpak

  • X11 windowing system
  • Wayland windows system
  • Fallback to X11 windowing system

There are eight different combinations of them. Each flatpak sets its default differently, some of which are obviously wrong and causes flicker.

What’s the best way to set them?

My system info:
Operating System: Fedora Kinoite 40
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.7-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7500 CPU @ 3.40GHz
Memory: 46.9 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2

The flickering is most likely the result of a nVidia driver issue on XWayland (without --socket=wayland). This should be fixed in the current releases of GNOME Shell & KDE Plasma (don’t know about other DEs/compositors) but requires an updated driver. The beta is supposed to be released on May 15th (Implement Explicit Sync by amshafer · Pull Request #104 · NVIDIA/egl-wayland · GitHub).

It’s not directly related to flatpak & is always an issue if the application does not support Wayland natively. Though the actual severity can vary from application to application.


Both x11 & fallback-x11 get added to the applications for compatible reasons:

The fallback-x11 option makes the X11 socket available only if there is no Wayland socket. This option was introduced in 0.11.3. To support older Flatpak releases, specify both x11 and fallback-x11. The fallback-x11 option takes precedence when both are supported.

Flatpak Command Reference - Flatpak documentation

If the application supports Wayland then --socket=wayland & --socket=fallback-x11 should be enough, but an additional --socket=x11 does not change the behaviour.

I think if an applications omits --socket=fallback-x11 then it could decide to use X11 through XWayland instead of Wayland natively since both sockets are exposed. But this would be explicitly handled by the application, e.g. to work around bugs.

1 Like

I see, thanks for the details. So, as a rule of thumb, for older Flatpaks -

  • x11: enable
  • Wayland: disable
  • fallback-x11: enable

And for newer Flatpaks -

  • x11: disable
  • Wayland: enable
  • fallback-x11: enable (?)

And once new driver is here, all Flatpaks -

  • x11: disable
  • Wayland: enable
  • fallback-x11: disable

Or did I understand correctly…?

If there is no Wayland support for the application then you’d only set --socket=x11. fallback-x11 should be used in combination with wayland

…since that ensures compatibility with Wayland (preferred output) & X11.

You’d only not set --socket=fallback-x11 if the application doesn’t X11 at all.

As far as I understand, the new driver explicitly fixes the flickering in XWayland applications, native Wayland should already be fine. But not all applications support Wayland.

1 Like

I see. Let me try again:

For apps that only support X11 (very old apps) -

  • x11: enable
  • Wayland: disable
  • fallback-x11: disable

For apps that support both X11 and Wayland (neither too old or too new) -

  • x11: disable
  • Wayland: enable
  • fallback-x11: enable

For apps that only support Wayland (very new apps) -

  • x11: enable (?)
  • Wayland: enable
  • fallback-x11: disable

Once the new driver arrives, keep using these same permissions.