flathub / org.freedesktop.Platform.GL.nvidia

47 stars 41 forks source link

[BUG] When using Nvidia drivers, most Flatpaks do not run #239

Closed Monniasza closed 7 months ago

Monniasza commented 7 months ago

I can't run most apps from Flatpak, including Cura, Minetest, The Powder Toy. PrusaSlicer runs, but there's no content in the window. I'm specifically using GeForce 1050 Mobile with nvidia-driver-535 version 535-161.07-5ubuntu0.22.04.1. The issue occurs even if I explicitly allow DRI access. Here's a example log:

ibEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI3: Screen seems not DRI3 capable

(endeavour:2): GLib-GObject-CRITICAL **: 19:20:15.577: invalid (NULL) pointer instance

(endeavour:2): GLib-GObject-CRITICAL **: 19:20:15.577: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(endeavour:2): GtdWindow-CRITICAL **: 19:20:15.577: gtd_window_get_current_workspace: assertion 'GTD_IS_WINDOW (self)' failed

(endeavour:2): Gdk-WARNING **: 19:20:16.134: The program 'endeavour' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 1154 error_code 8 request_code 149 (unknown) minor_code 4)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
guihkx commented 7 months ago

Just to be sure, the Flatpak drivers match the ones on the host, right? You can check that with:

$ cat /sys/module/nvidia/version
$ flatpak info "org.freedesktop.Platform.GL.nvidia-$(cat /sys/module/nvidia/version | tr '.' '-')"

The first command will display the driver version on the host, and the second one will check if the appropriate Flatpak package for the driver is installed.

Both commands should not fail.

Monniasza commented 7 months ago

The second command fails, but the first one runs okay.

535.161.07
błąd: Nie zainstalowano org.freedesktop.Platform.GL.nvidia-535-161-07/*unspecified*/*unspecified*
guihkx commented 7 months ago

That means the appropriate Flatpak package for that driver version is missing.

If you run flatpak update, the driver package should be picked up for installation automatically, and after that you should have no issues anymore.

Monsterovich commented 7 months ago
┌(monsterovich@pc)─(pts/1)─(~)
└─(>) flatpak install org.freedesktop.platform.GL.nvidia-535-161-07
Looking for matches?
error: No remote refs found similar to ?org.freedesktop.platform.GL.nvidia-535-161-07?
guihkx commented 7 months ago

Oh, that driver version isn't present on Flathub yet, sorry.

I'll open a pull request to add it.

After the PR gets merged, it will still take a few hours before it's available for you, however.

rocketguedes commented 6 months ago

I think I have the same proplem, my driver versions isn't present on Flathub.

cat /sys/module/nvidia/version 
535.161.08
flatpak remote-ls | grep -i nvidia-535-161
nvidia-535-161-07   org.freedesktop.Platform.GL.nvidia-535-161-07       1.4 x86_64
nvidia-535-161-07   org.freedesktop.Platform.GL32.nvidia-535-161-07     1.4 x86_64
guihkx commented 6 months ago

@rocketguedes I've opened a pull request to add that version here: #247

Monniasza commented 3 months ago

Again, this bug occurs after updating Nvidia drivers again.

guihkx commented 3 months ago

Again, this bug occurs after updating Nvidia drivers again.

This is technically not a "bug": It's just a matter of adding the missing driver version here, as per what the README says.

With what driver version are you having issues?

Monniasza commented 3 months ago

It has been already updated