Frogging-Family / nvidia-all

Nvidia driver latest to 396 series AIO installer
725 stars 62 forks source link

Add Flatpak host GL driver support #156

Open orowith2os opened 1 year ago

orowith2os commented 1 year ago

Closes https://github.com/Frogging-Family/nvidia-all/issues/155

Needs testing to be sure everything works properly. I don't own a NVIDIA GPU, so I can't do it.

You can test by installing, making sure /var/lib/flatpak/extension/org.freedesktop.Platform.GL.host/x86_641.4 exists and is filled with the NVIDIA files, and running FLATPAK_GL_DRIVERS=host flatpak run test.openglorvulkan.app.

ptr1337 commented 1 year ago

I don't know if this really should be enabled as default. That will raise the package size.

orowith2os commented 1 year ago

Many people also use flatpak, especially as it makes things Just Work, and several applications only officially support Flatpak for cross-distribution distribution like Bottles and OBS Studio. I think it makes sense to have it enabled by default, especially since using a development NVIDIA driver isn't as easy with Flatpak, which some people might want to do.

If bubblewrap supported making symlinks not dangle inside of a sandbox, I could just symlink these, but I can't, so we can copy them over. Plus, you'd have about the same storage usage as if you used Flatpak like before anyways. I'm not worrying about it.

Tk-Glitch commented 1 year ago

I'm not convinced about having that enabled by default. We got quite a few users who don't want anything flatpak on their machine, so I'd like to keep "Arch-style" packages as the default. Other than that, nice addition ! Thanks for looking into it orowith2os ! :frog: :heart:

orowith2os commented 1 year ago

This still needs testing, once it's confirmed to work I'm open to disabling it. I'll also add a lil console note for it, since it seems appropriate to mention it there.

konkitoman commented 6 months ago

I cannot run any flatpak application that uses GPU drivers from the latest vulkan dev driver 535.43.22, so i tested this!

On my machine i merged this into master!

To test if the flatpak host driver is installed i run paru -Q flatpak-host-driver-tkg And the output was flatpak-host-driver-tkg 535.43.22-252

There is no test.openglorvulkan.app But i tried to run OBS and ATLauncher with FLATPAK_GL_DRIVERS=host flatpak run

OBS message Failed to initialize video. Your GPU may not be supported, or your graphics drivers may need to be updated. ATLauncher message Failed to find any valid GLFW profile. Trying 4.6: GLFW error: [0x10006]GLX: Failed to load GLX

More info I removed all flatpak packages that had `org.freedesktop.GL` in there name but that before i installed this! `flatpak update` wants to install the `org.freedesktop.GL.default` but `FLATPAK_GL_DRIVERS=host flatpak update` do not! There is directories in `/var/lib/flatpak/extension/org.freedesktop.Platform.GL.host/x86_64/1.4` and `/var/lib/flatpak/extension/org.freedesktop.Platform.GL.host/i386/1.4` But in `flatpak list` output there is no `org.freedesktop.Platform.GL.host`!