Flatpak NVIDIA drivers issues

After a long research, a lot of reading about various problems and some reverse engineering in my drivers installation I’ve found out a couple of things.

First off all, Flatplak runs applications inside of a ‘sandbox enviroment’ but this doesn’t mean literally everything runs inside a sandbox, NVIDIA drivers (I don’t know about AMD / Intel) have some kind of communication with the system kernel, I don’t know what they talk about, but NVIDIA inside of Flatpak requires the exactly same version of the driver used in the host system. This is caused by modifications in the kernel during driver installation.

In other words, if ROCKY (any distro in general) is using driver version 515.0.0.1 on the host, Flatpak version also need to be 515.0.0.1, one problem with this aproach is match the versions in distros that is not tagged like ‘friendly’ like OPENSUSE LEAP, Manjaro, Ubuntu.

Usually this ‘friendly’ distros have custom or comunities respositories that keep a ‘LTS’ version of the driver for a long time. RHEL bases is not part of them.

In my case, after doing some ‘reverse enginering’ in my drivers install, I’ve found that the tutorial uses the DEVELOPER repo of NVIDIA, what means more often releases, what causes a mismatch with Flatpak and a ‘broken’ system in my case.

The original installation process (this problems also happens with RPM Fusion install).

sudo dnf install epel-release

sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo

sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)

sudo dnf install nvidia-driver nvidia-settings cuda-driver

reboot

This method uses the latest version by default. At the moment of this post is 520.something that is not available on flatpak (at the date of this post), so I got a newer version of the driver on the system and a older one in the Flatpak environment and a broken system due to the mismatch.

NVIDIA website (at the date of this post) uses version 515.76 like a ‘stable’ release, and developer branch have 520.something else.

My solution was make a manual install of the .run file from the website, what means a more manual and long job blocking nouveu, altering grub and etc.

After the annoying process, my system have 515.76 on the host and Flatpak and literally everything is working flawless.

nvidia-smi
NVIDIA-SMI 515.76       Driver Version: 515.76       CUDA Version: 11.7

Flatpak list
org.freedesktop.Platform.GL32.nvidia-515-76

Here is the tutorial that I’ve used for fix my problem, just remember to take a look at the date, 9 years old tutorials usually doesn’t works fine.

NVIDIA drivers from website

And off course, if someone nows knows the stable release repo to NVIDIA drivers, fell free to share, it’s less annoying than the entire process involving grub and etc.

2 Likes