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

Hello. I’ve been experiencing a strange issue for a week or so now, 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 week 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 week or so 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. I’ve since updated to 35.20220126.0 and it didn’t help at all.

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?

I already tried asking in a few different places and nobody responds to me, nobody seems to have any answers or troubleshooting advice. I really need help with this. I can’t stand dealing with this issue every day.

Thanks in advance.

Have you tried an older version jet ?

Can you post output of your flatpak list --user --all

Hey, I might be seeing the same issue (in this thread), with the GPU suddenly behaving… worse. In my case, it’s choppy performance in GNOME and impossible to set different per-monitor scaling factor.

If it is the same problem, it seems to be version 35.20220118.0 that introduces it. You could try rolling back to 35.20220117.0 and see if it fixes your issue too:

rpm-ostree deploy 52debc6aea99caaec5eb13d0e3b0acc5ba5ef61d1c59aba000096a6190b4c9b8

And if you want to try -18:

rpm-ostree deploy 632c7141e186a8617a7e3a3600b6247cdd914cd1dfb4483374fe46771f9b74fc

Not yet sure what the actual problem is, the updated packages in that version are:

  gupnp 1.4.1-1.fc35 -> 1.4.3-1.fc35
  initscripts 10.11-1.fc35 -> 10.13-1.fc35
  initscripts-service 10.11-1.fc35 -> 10.13-1.fc35
  selinux-policy 35.8-1.fc35 -> 35.9-1.fc35
  selinux-policy-targeted 35.8-1.fc35 -> 35.9-1.fc35

Hope this helps! If this turns out to be unrelated, sorry for the drive-by spam :slight_smile:

Thank you very much for your responses.

Have you tried an older version jet ?

I’ve tried 35.20211221.0, 35.20220120.0, 35.20220123.0, and 35.20220126.0 so far. I haven’t tried rolling back further… but I have rolled back to a version that (I believe) was previously working, and it didn’t help. I wonder if it’s some kind of configuration change or something.

Can you post output of your flatpak list --user --all

Running this command returns no results. This is probably because I have all my apps installed at the system level rather than the user level. Without the --user flag, I get this output.

If it is the same problem, it seems to be version 35.20220118.0 that introduces it. You could try rolling back to 35.20220117.0 and see if it fixes your issue too

I’ll give this a go and report back. Thanks for the suggestion.

Oh yes should have asked directly flatpak --all. Anyway I can see your issue.

Uninstall org.freedesktop.Platform.GL.default this package which comes from gnome-nightly. flatpak uninstall org.freedesktop.Platform.GL.default it should ask you which one to uninstall make sure you uninstall version 21.08 which comes from gnome-nightly then restart Firefox TWICE. Go to about:support and check if you use Webrender instead Webrender (Software). You can also launch Firefox from terminal too see if the PCI gpu error is gone.

1 Like

Thank you very much for your suggestion. It’s definitely made a difference, but not quite fixed it… Hmm.

I uninstalled the gnome-nightly GL runtime as you suggested, and this is my package list now.

After making this change, and after restarting Firefox multiple times, it behaves differently now but is not fixed. Before, it would crash, and then offer to launch in safe mode with all my extensions disabled. Now, it launches immediately and has all my extensions and everything, which is a huge improvement. However, about:support does confirm that it is sadly using “WebRender (Software)”. When I run Firefox from the terminal, I get this output:

[GFX1-]: glxtest: libEGL no display
[GFX1-]: glxtest: EGL test failed
[GFX1-]: More than 1 GPU from same vendor detected via PCI, cannot deduce device
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed GL context creation for hardware WebRender: true
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed GL context creation for hardware WebRender: true
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed GL context creation for hardware WebRender: true
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed GL context creation for hardware WebRender: true
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY
[GFX1-]: Failed GL context creation for WebRender: 0
[GFX1-]: FEATURE_FAILURE_WEBRENDER_INITIALIZE_UNSPECIFIED(Create)
[GFX1-]: Failed to connect WebRenderBridgeChild.
[GFX1-]: Fallback WR to SW-WR

I also tried running Celluloid (with multiple restarts), and that’s behaving the same as before. I get the same error, “Sandbox does not provide an OpenGL implementation”.

I’m a little bit confused as to how or why the gnome-nightly runtime would have any impact on things, as it was my understanding that only gnome-nightly apps should use the gnome-nightly runtime? But it undeniably did have an impact.

Do you have any more suggestions or advice? Thank you!

That was my initial response too when I figured a change made on gnome-nightly broke my firefox from flathub (background here on flatpak matrix I asked about this ~7 days ago You're invited to talk on Matrix) This should be the main culprit why firefox had crashed on my system. since I dont have any amd gpu I cant help you further but you may have changes some settings? Also do you force to run firefox flathub on wayland? try passing this env variable MOZ_ENABLE_WAYLAND=1 flatpak run org.mozilla.firefox

1 Like

One thing more you seem to miss org.freedesktop.Platform.GL.default now since you uninstalled it from gnome-nightly. Try to install it from flathub. should be something like flatpak install flathub org.freedesktop.Platform.GL.default (should ask for a version it should be 21.08)

2 Likes

That was it! It’s fixed! Hurray! Thank you so, so much. This issue has been so frustrating for me and I didn’t get any real help anywhere else I asked. Thank you so much.

I already had some org.freedesktop.Platform.GL.default runtimes installed from Flathub, but not the 21.08 version. It got a little bit confusing with all the different versions and Flathub vs gnome-nightly. Installing the 21.08 version from Flathub fixed it. I have proper WebRender on Firefox, no GPU errors, and Celluloid is working too now. Thank you so much.

And I am forcing Firefox to run on Wayland. I previously used Flatseal to set the MOZ_ENABLE_WAYLAND=1 environment variable.

Really happy to see that it got resolved don’t forget that a flatpak update will probably want to install the gnome-nightly GL one and it can break again. And yes I also thought you forced the wayland flag since it wouldnt be broken if it was using xwayland :slight_smile: Its a rare issue among us who force wayland on firefox flathub. This seems like a future breaking change related to libwayland-client something.

1 Like

I’ll keep an eye out for Flatpak updates that might reinstall it. It shouldn’t be a problem since I know what to look out for now. Thanks again so much!

1 Like

Hey,

It seems that I got this error on celluloid too, and I think it might be related.

Opening a video screenshot to celluloid doesn’t work, but it work if I specifically open it with Google Chrome (which uses xWayland for me)

This thread is over 2 yrs old, if you are having issues please open another thread, with your details.

@mods @moderators please close this Necro

1 Like