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

run: Unset EGL driver paths #5785

Merged
merged 3 commits into from Apr 24, 2024
Merged

run: Unset EGL driver paths #5785

merged 3 commits into from Apr 24, 2024

Conversation

fooishbar
Copy link
Contributor

@fooishbar fooishbar commented Apr 24, 2024

Similar to how b8d8d80 inhibited passthrough of environment variables pointing the Vulkan loader towards a specific ICD, do the same for the EGL paths used by libglvnd to discover the GL driver to use.

These paths are typically referencing the host filesystem; if the user is referencing paths only available in the sandbox, they can use --env or overrides for them.


cf. #5553, cc @TingPing

It's worth noting that this doesn't apply to GLX because it only takes a vendor name, then loads a DSO based on that name from the dlopen path.

Copy link
Collaborator

@smcv smcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For completeness, should we also be doing this for __EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES and __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS?

@smcv
Copy link
Collaborator

smcv commented Apr 24, 2024

...and perhaps also VK_LAYER_PATH, VK_ADD_LAYER_PATH, VK_ADD_DRIVER_FILES?

@fooishbar
Copy link
Contributor Author

Yeah nice, thanks. To be honest I hadn't looked too closely at the Vulkan loader for this one, and I'd also completely forgotten that NVIDIA EGLStreams shim even existed.

@smcv
Copy link
Collaborator

smcv commented Apr 24, 2024

CI failure looks like Github/Microsoft brokenness rather than your fault:

E: Failed to fetch https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

@smcv
Copy link
Collaborator

smcv commented Apr 24, 2024

CI failure looks like Github/Microsoft brokenness rather than your fault

I'm attempting to fix this in #5786.

@smcv
Copy link
Collaborator

smcv commented Apr 24, 2024

ensure_driver_environment() in https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/steam-runtime-tools/system-info.c?ref_type=heads has a long list of similar search-path/driver-choice environment variables, although as you noted above, some of them (like the __GLX_VENDOR_LIBRARY_NAME) are just a basename or similar and not a complete absolute path or list of paths.

Similar to how b8d8d80 inhibited passthrough of environment
variables pointing the Vulkan loader towards a specific ICD, do the same
for the EGL paths used by libglvnd to discover the GL driver to use, as
well as for NVIDIA's EGLStream shim.

These paths are typically referencing the host filesystem; if the user
is referencing paths only available in the sandbox, they can use --env
or overrides for them.

Signed-off-by: Daniel Stone <[email protected]>
Following on from b8d8d80, add more environment variables used by
the Vulkan loader which expect paths to be provided.

These paths are typically referencing the host filesystem; if the user
is referencing paths only available in the sandbox, they can use --env
or overrides for them.

Signed-off-by: Daniel Stone <[email protected]>
@smcv smcv merged commit 18b8508 into flatpak:main Apr 24, 2024
9 checks passed
@fooishbar
Copy link
Contributor Author

thanks for all your help, and @rmader for rubber-ducking me to get here in the first place :)

@rmader
Copy link

rmader commented Apr 24, 2024

Thanks for fixing this, I guess it will avoid a lot of cursing :P

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

Successfully merging this pull request may close these issues.

None yet

4 participants