Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy files from host? #301

Open
eszlari opened this issue Oct 10, 2024 · 3 comments
Open

Copy files from host? #301

eszlari opened this issue Oct 10, 2024 · 3 comments

Comments

@eszlari
Copy link
Contributor

eszlari commented Oct 10, 2024

I guess this question kind of obvious, but I haven't found an issue here that states it explicitly:

Why not copy the files from the host?

The list of all files is known for every release (maybe we could ask Nvidia to have the installer generate a list in the future).

Is it because of the different file system layouts of different distros? While a simple search & copy approach might not be very elegant, it should be possible to make it reliable and it would still be much faster than downloading files from the internet that are already stored locally.

@TingPing
Copy link
Member

You can but its not related to this package - https://blog.tingping.se/2018/08/26/flatpak-host-extensions.html

@TingPing
Copy link
Member

There is a new standard that makes this easier, in theory - flatpak/flatpak#5885

@guihkx
Copy link
Collaborator

guihkx commented Oct 10, 2024

I believe TingPing already provided alternative solutions to this problem, but to answer your question directly:

I'm almost sure we cannot access host files at install-time.

In other words, by Flatpak design, we wouldn't be able to copy any driver file from the host when users ran flatpak install org.freedesktop.Platform.GL.nvidia....

But even if we could, I think it'd be much more difficult than it is now to deal with distros installing these files to different locations, or maybe not even installing some files we expect to be there...

https://blog.tingping.se/2018/08/26/flatpak-host-extensions.html

That's the alternative solution I've been using recently.

I basically made a script for my personal use (please do not run it as is on your machine), that creates hardlinks (to avoid file duplication) of host driver files to /var/lib/flatpak/extension/org.freedesktop.Platform.GL{,32}.host. After that, I just had to add FLATPAK_GL_DRIVERS=host to my /etc/environment and reboot.

This setup has been working great for me, but I basically hand-made that script specifically for the 470xx driver series, and using the install paths expected by Arch Linux. So while the script might work for other distros and for newer driver versions, I haven't tested it and I'm pretty sure some crucial files will be missing, too.

This kind of set up also requires manual work after driver upgrades (I added a comment on the script explaining why).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants