Disclaimer: Someone in the comments pointed out that this affects Nvidia only. I don’t have AMD, so I can’t verify if that’s correct, but likely this is only for fellow sufferers of the Green Nightmare.
I had this issue for months. Randomly, the performance for games would be abysmal (I’m talking 5 FPS in 10yo indie 3D titles). Then it would randomly work again for a few days or weeks until it would become terrible again.
Turns out, the reason for that was that flatpak appears to cause trouble when the system GPU driver is updated, but flatpak update isn’t run. So when I did dnf update
(and it updated the Nvidia driver) without running flatpak update
afterwards, the performance would suck, until something (or I) ran flatpak update
again.
So if the performance in games launched through a flatpak version of a launcher like heroic sucks, run flatpak update
.
And if that doesn’t work, run
flatpak install flathub org.freedesktop.Platform.GL.nvidia-575-64-05 org.freedesktop.Platform.GL32.nvidia-575-64-05
(Replace the version with your Nvidia driver version, and in case of AMD, google whatever the appropriate way is to install the drivers for flatpak.)
Yeah, there I am with my 4070, can’t even run Bioshock 1. The peak was when I tried running a very simple indie game from 2011 and it only ran with ~5 fps.
Truns out something in the chain (probably proton) seems to have a software rendering mode that it falls back to if the GPU driver doesn’t work.
Was a bit tricky to debug since all the GPU test tools by default don’t run in flatpak and thus all of the worked fine.
I wonder if the AppImage is any better?
AppImage doesn’t have Flatpak’s sandbox feature, so it probably shouldn’t be affected.