Fix Flatpak Fails To Start Due To OpenGL Error With Nvidia (Proprietary) Drivers
Some applications and games built with OpenGL support and packaged as Flatpak fail to start with proprietary Nvidia drivers. This article explains how to get such Flatpak applications or games them to start, without installing the open source drivers (Nouveau).
The error that occurs when trying to start a Flatpak app that uses OpenGL, when using the proprietary Nvidia drivers, looks something like this:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Could not initialize GLX
To fix Flatpak games and applications not starting when using OpenGL with proprietary Nvidia graphics drivers, you'll need to install a runtime for your currently installed proprietary Nvidia drivers. Here's how to do this.
Flatpak (formerly xdg-app) is a software utility for software deployment, package management, and application virtualization for Linux desktop computers. It provides a sandbox environment in which users can run applications in isolation from the rest of the system.Applications using Flatpak need permission from the user to control hardware devices or access the user's files.
The idea of using application containers in GNOME was first proposed in 2013 by Lennart Poettering, who published an article about it in 2014.[5][6] Developed as part of the freedesktop.org project (formerly known as X Desktop Group or XDG), it was originally called xdg-app.