Bug 427616

Summary: Run flatpak update after Nvidia update
Product: [Applications] Discover Reporter: Peter Eszlari <peter.eszlari>
Component: Flatpak BackendAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED UPSTREAM    
Severity: normal CC: aleixpol, jgrulich, nate, null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://github.com/flatpak/flatpak/issues/3907
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Peter Eszlari 2020-10-13 05:41:52 UTC
On my Ubuntu-based system I just got an update for the proprietary Nvidia driver. After restarting the OS, 3D acceleration in flatpak apps is broken, because apparently, flatpak-update only updates the Nvidia driver that is currently in use.
Comment 1 Nate Graham 2020-10-13 18:50:54 UTC
This would be something that the Ubuntu packaging for the proprietary NVIDIA driver should do. Discover doesn't know how to do this. Please report this to the Ubuntu or Debian packagers. Thanks!
Comment 2 Peter Eszlari 2020-10-13 19:26:07 UTC
> This would be something that the Ubuntu packaging
> for the proprietary NVIDIA driver should do.

Running

$ /usr/bin/flatpak update

is not the job of a distribution maintainer.

Maybe a proper fix belongs to libflatpak, but as a workaround, discover could compare the output of

$ flatpak --gl-drivers

with (e.g.)

$ ls /usr/lib/x86_64-linux-gnu/libnvidia-*.so.*.*.*
Comment 3 Peter Eszlari 2020-10-13 19:59:01 UTC
As clarification: flatpak needs the NVIDIA userspace driver part (libnvidia-*.so etc.) copied into the sandbox and it needs to have the exact same version as the currently loaded kernel module (nvidia.ko).

Flatpak checks the kernel module version in

/sys/module/nvidia/version

and downloads the NVIDIA driver from the webserver and copies the libs to

/var/lib/flatpak/runtime/org.freedesktop.Platform.GL.nvidia-XXX-XX-XX/x86_64/1.4/active/files/extra.
Comment 4 Aleix Pol 2020-10-13 22:32:01 UTC
This is something libflatpak should detect. If there's new API that we'd need to implement, we could do that. But as is there's not much we can do.

@eszlari, can you report it upstream to see how we should better deal with this issue?
Comment 5 Peter Eszlari 2020-10-14 13:56:12 UTC
https://github.com/flatpak/flatpak/issues/3907
Comment 6 Nate Graham 2020-10-14 14:07:57 UTC
Marking as upstream again for now. We can re-open it if the flatpak people say we need to do it I guess.