[Solved] No longer getting GPU acceleration in some Flatpak apps, after updating Fedora Silverblue

Hello. I’ve been experiencing a strange issue over the past few days, where certain Flatpak apps are not getting any GPU acceleration. I don’t even know where to begin troubleshooting this, and I have no idea what the culprit is. I need help.

It all started a few days ago, when I updated Fedora Silverblue from 35.20211221.0 to 35.20220120.0. This resulted in a variety of system-wide issues, such as missing sound, running Xorg instead of Wayland, systemd errors, etc. This turned out to be caused by SELinux (there are other similar posts here and on Reddit), and it was suggested that I reset my SELinux policy files. After doing so, most of those issues were fixed. I have SELinux Troubleshooter installed, and I’m not getting any warnings, so I don’t believe there are any lingering SELinux issues.

However, ever since I updated, I am now no longer getting GPU acceleration in certain Flatpak apps. Even if I roll back to the old Fedora Silverblue version, this is still happening. So I don’t know whether it’s actually anything to do with the update, but it started at the exact same time. It could just be a coincidence… Here is a full list of packages that changed in the update, just in case it’s relevant.

So what do I mean when I say I’m no longer GPU acceleration? Here are some examples:

  • The biggest issue is with Firefox, as I use my web browser so often. When I try to open org.mozilla.firefox 96.0.2 (Flathub), it crashes immediately on startup. If I run it from the terminal, there is an error message saying: “No GPUs detected via PCI”. After multiple crashes, it automatically switches to safe mode and launches. This safe mode uses software rendering with all extensions disabled.
  • Another issue is with Celluloid, my preferred video player. When I open io.github.celluloid_player.Celluloid 0.22 (Flathub), there is an error message saying: “Failed to realize renderer of type ‘GskNglRenderer’ for surface ‘GdkWaylandToplevel’: Sandbox does not provide an OpenGL implementation” and “celluloid-CRITICAL **: 07:18:09.838: Failed to initialize render context”.
  • I also tried an alternative video player, GNOME Videos. If I run it normally, it simply fails to launch. If I run it from the terminal, I see the error message: “Unable to initialize Clutter: Unable to initialise the Clutter backend: no available drivers found.”

This could point to my graphics card (AMD Radeon RX 550) potentially being broken, but I don’t believe that is the case, for the following reasons:

  • I’m still running a GNOME Wayland session as normal, with it being displayed on my 4k monitor at 120 Hz as normal.
  • There are no display glitches.
  • If I run lspci -nnv, the graphics card is listed as normal, and it shows it’s using the amdgpu driver.
  • If I run glxgears, it launches and appears to work without any issues.
  • If I run the non-Flatpak version of Firefox, it launches without crashing, and I can see in about:support that it is running a normal Wayland WebRender session with GPU acceleration and at 120 Hz.

So it seems like the issue I’m having is GPU acceleration (or perhaps specifically video acceleration?) only with Flatpak apps. The GNOME desktop, native glxgears app, and native Firefox app, all work fine.

But then some other Flatpak apps that I’ve tried seem to work okay. If I run org.gimp.GIMP 2.10.30 (Flathub), or org.kde.krita 5.0.2 (Flathub), or org.blender.Blender 3.0.0 (Flathub), these all launch and (at least at a quick glance) appear to function. However, I can’t be sure whether these are actually using GPU acceleration or whether they might be using software rendering. Perhaps it’s specifically video decoding that’s the issue?

I’m really stumped at this point. I don’t know if the issue is with just some specific Flatpak apps (Firefox, Celluloid, GNOME Videos), or with specific runtimes (although Firefox uses a different runtime), or the overall Flatpak system and its sandboxing, or something else on my system. My best guess at this point is that it’s Flatpak, but I really just do not know.

Again, the issue only started a few days ago, seemingly coinciding with my Fedora Silverblue update, which did update the kernel and Flatpak packages. I’ve been using Silverblue and Flatpak apps for several years with no issues until now.

If there’s any advice you guys could give me on troubleshooting this, I’d really appreciate it. Surely there must be some commands I can run within the sandbox to try to check the GPU status and diagnose this? There must be some way of seeing why the sandbox doesn’t have GPU access?

Thanks in advance.

Edit: Fixed. Solution was given here.