Skip to content

export-gpu: optionally pick the display GPU (GAMESCOPE_PREFER_DRM) for render/scanout split#114

Open
relil wants to merge 1 commit into
bazzite-org:mainfrom
relil:prefer-drm
Open

export-gpu: optionally pick the display GPU (GAMESCOPE_PREFER_DRM) for render/scanout split#114
relil wants to merge 1 commit into
bazzite-org:mainfrom
relil:prefer-drm

Conversation

@relil

@relil relil commented Jun 16, 2026

Copy link
Copy Markdown

Extends export-gpu so a render/scanout split is fully configurable from the same helper.

Today export-gpu writes VULKAN_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 writes GAMESCOPE_PREFER_DRM=/dev/dri/by-path/…-card to ~/.config/environment.d/. gamescope then renders the UI + games on VULKAN_ADAPTER (e.g. a headless/fast dGPU) while scanning out through the display GPU — hybrid / eGPU / muxless setups that otherwise black-screen.

  • Additive & opt-in: auto-detects connected cards, prompts, and does nothing if you skip — existing behaviour is unchanged.
  • Uses the stable /dev/dri/by-path/…-card path (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.

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).
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.

1 participant