Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Flesh out NVIDIA support for biarch and multiarch systems #4207
Conversation
ikeydoherty
added some commits
Nov 13, 2017
|
Note that there is probably going to be a seccomp build failure in the tests, I saw this locally even on clean git as it wanted a |
ikeydoherty
referenced this pull request
in solus-project/linux-steam-integration
Nov 13, 2017
Closed
Snap version 0.6 fails to launch on Ubuntu 17.10 #35
codecov-io
commented
Nov 13, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #4207 +/- ##
=========================================
+ Coverage 75.72% 75.8% +0.07%
=========================================
Files 437 439 +2
Lines 37869 37995 +126
=========================================
+ Hits 28678 28801 +123
- Misses 7190 7192 +2
- Partials 2001 2002 +1
Continue to review full report at Codecov.
|
|
Validation instructions for LSI to check this change
wget https://packages.solus-project.com/lsi/1/solus-runtime-gaming_0.0.0_amd64.snap
wget https://packages.solus-project.com/lsi/1/linux-steam-integration_0.6_amd64.snap
sudo snap install --dangerous solus-runtime-gaming*.snap
sudo snap install --dangerous --devmode linux-steam-integration*.snap
snap run linux-steam-integration |
| + # Support reading the Vulkan ICD files | ||
| + /var/lib/snapd/lib/vulkan/ r, | ||
| + /var/lib/snapd/lib/vulkan/** r, | ||
| + /var/lib/snapd/hostfs/usr/share/vulkan/icd.d/10_nvidia*.json r, |
bboozzoo
Nov 13, 2017
Contributor
/var/lib/snapd/hostfs/usr/share/vulkan/icd.d/*.json r, should catch ICDs from all drivers.
ikeydoherty
Nov 13, 2017
Contributor
And we don't want all drivers, that's the point. We only want NVIDIA drivers exposed - not having mesa vulkan exposed :)
ikeydoherty
Nov 13, 2017
Contributor
TLDR a runtime should provide its own mesa and vulkan (libvulkan.so.1) like the solus-runtime-gaming does, but we accept host ICDs from vulkan to allow the NVIDIA vulkan stuff to work properly.
bboozzoo
Nov 13, 2017
Contributor
Maybe I'm missing something here, but we're already allowing to use the host's GL implementation. I guess the same would be fitting for Vulkan. Meaning, we should probably allow to access all ICDs. otherwise the client would end up having access to a single implementation only.
If you'd want to use a specific ICD then there's VULKAN_ICD_FILENAMES environment library.
ikeydoherty
Nov 13, 2017
•
Contributor
No we don't - we only allow the host GL library for the NVIDIA library. Allowing mesa to cross-contaminate would be utterly catastrophic. Likewise exposing the invalid ICDs for Vulkan which have the potential to clash with the internal vulkan icds provided by the snaps own mesa build will cause things to break.
solus-runtime-gaming already has its own mesa, and default vulkan icds for the open source vulkan drivers. We glob this vulkan directory to add the host NVIDIA ICDs as thats the only host GL library we'd ever share. FWIW I'm fully aware of VK_ICD_FILENAMES, please read the actual commit messages where I documented that.
ikeydoherty
Nov 13, 2017
Contributor
LSI reference: https://github.com/solus-project/linux-steam-integration/blob/master/src/shim/shim.c#L150
ikeydoherty
Nov 13, 2017
Contributor
Its ugly ugly evil stuff and I wish we didn't have to support it, but there it is :/ FWIW I'll be following up with a highly similar change at some point which will expose the OpenCL ICD definitions (primarily to have CUDA working) - but this will require me to work on a patch to send to Khronos to have something like a OCL_ICD_FILENAMES variable too. We'd want this for stuff like Blender+NVCC combinations, etc. Having the context here now though will help when it comes to implementing that next step. :) It'd be down to the internal runtime to provide something like beignet as the open source solution.
bboozzoo
Nov 13, 2017
Contributor
I remember it to be a bit of a hassle with OpenCL. If all else fails you can always try mounting tmpfs over the vendors directory and expose the just file that you need. Ugly as hell, but you wouldn't need to through back and forth with the Khronos group :)
ikeydoherty
Nov 13, 2017
Contributor
This is true, but if necessary we can carry the relevant patch in the runtime, as the ocl-icd package is only tiny for the sake of the patch to actually support it
|
Please |
|
Sorry didn't even see the indent file there nor find references to it. Sorta had to wind it wrt. style as its a weird one. |
|
Oh my pleasure @mvo5 :) Can't wait to get this stuff out in the wild and in the store :D |
| @@ -129,7 +129,7 @@ func (s *HTestSuite) TestSnapRunSnapExecEnv(c *C) { | ||
| "SNAP_ARCH": arch.UbuntuArchitecture(), | ||
| "SNAP_COMMON": "/var/snap/snapname/common", | ||
| "SNAP_DATA": "/var/snap/snapname/42", | ||
| - "SNAP_LIBRARY_PATH": "/var/lib/snapd/lib/gl:/var/lib/snapd/void", | ||
| + "SNAP_LIBRARY_PATH": "/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void", |
mvo5
merged commit 096ede7
into
snapcore:master
Nov 15, 2017
1 check passed
|
Yay - ty :) |
ikeydoherty commentedNov 13, 2017
This change implements proper support for NVIDIA on both biarch and multiarch systems, chiefly:
emul32) variant of the libraries within the Snaps/var/lib/snapd/lib/vulkan)SNAP_LIBRARY_PATHby default