Hi there.
I’m having trouble with graphics acceleration in Flatpak in games.
My setup:
Fedora 41 with Sway
Sway running on Intel UHD Graphics 630, nvidia RTX2080 for gaming
The problem occurs when I reboot after system update (which may or may not contain new graphics driver) and run a game through either Steam or Heroic Games Launcher in Flatpak. The screen is just black, sound seems to be working as well as keyboard and mouse - I can hear menu sounds when pressing keys. Running the same game through the same app outside Flatpak does not manifest the issue, games work normally.
Steam and Heroic have GPU acceleration enabled in Flatseal and the individual games use __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1
environmental variables to select nvidia.
The Flatpak nvidia driver version matches that of the kernel driver:
$ flatpak list | grep nvidia
nvidia-570-133-07 org.freedesktop.Platform.GL.nvidia-570-133-07 1.4 system
nvidia-570-133-07 org.freedesktop.Platform.GL.nvidia-570-133-07 1.4 user
nvidia-570-133-07 org.freedesktop.Platform.GL32.nvidia-570-133-07 1.4 system
$ nvidia-smi
Tue Apr 22 23:01:06 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.133.07 Driver Version: 570.133.07 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 2080 Off | 00000000:01:00.0 Off | N/A |
| 0% 37C P8 20W / 225W | 1MiB / 8192MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
Usually some combination of reboots and commands:
$ dnf reinstall akmod-nvidia
$ akmods --force --rebuild
$ dracut -f --regenerate-all
$ flatpak install org.freedesktop.Platform.GL32.nvidia-XXX --reinstall
$ flatpak install org.freedesktop.Platform.GL.nvidia-XXX --reinstall
solves the issue after several tries. But I haven’t found any specific way or command that would guarantee to fix the issue. The fix usually works until next system update.
Is there any way I can debug this? To be honest, Flatpak and how the drivers work there is kind of a black magic to me.
Thanks!