export-gpu: optionally pick the display GPU (GAMESCOPE_PREFER_DRM) for render/scanout split#114
Open
relil wants to merge 1 commit into
Open
export-gpu: optionally pick the display GPU (GAMESCOPE_PREFER_DRM) for render/scanout split#114relil wants to merge 1 commit into
relil wants to merge 1 commit into
Conversation
After choosing the render GPU (VULKAN_ADAPTER), offer to pin the DRM/KMS scanout device to the GPU the monitor is connected to, writing GAMESCOPE_PREFER_DRM to ~/.config/environment.d/. This enables a render/scanout split — gamescope renders the UI + games on the fast/headless GPU and scans out through the display GPU (hybrid / eGPU / muxless) — with no per-game launch options. Additive and opt-in: auto-detects cards with a connected output, prompts, and does nothing if skipped (default behaviour unchanged). Requires a gamescope built with --prefer-drm, which reads $GAMESCOPE_PREFER_DRM (ValveSoftware/gamescope#2220, bazzite-org/gamescope#11).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends
export-gpuso a render/scanout split is fully configurable from the same helper.Today
export-gpuwritesVULKAN_ADAPTER(the render GPU). This adds an optional step: after that, it detects the GPU(s) with a connected display, lets you pick one, and writesGAMESCOPE_PREFER_DRM=/dev/dri/by-path/…-cardto~/.config/environment.d/. gamescope then renders the UI + games onVULKAN_ADAPTER(e.g. a headless/fast dGPU) while scanning out through the display GPU — hybrid / eGPU / muxless setups that otherwise black-screen./dev/dri/by-path/…-cardpath (card numbers can swap between boots).Requires a gamescope built with
--prefer-drm, which reads$GAMESCOPE_PREFER_DRM:Tested on Bazzite + CachyOS Game Mode (Intel iGPU + AMD BC-160):
export-gpu→ BC-160 as render, Intel as scanout; gamescope composites on BC-160, outputs via Intel HDMI; Steam Big Picture + Cyberpunk 2077 work.