[PR #22] [CLOSED] feat: add LTS_DISPLAY_GPU to fix multi-GPU image corruption #27

Closed
opened 2026-11-01 11:24:05 +00:00 by roman · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Arbitrate3280/LutrisToSunshine/pull/22
Author: @joeknock90
Created: 5/7/2026
Status: ❌ Closed

Base: main ← Head: fix/mutli_gpu_selection


📝 Commits (1)

  • c0c43df feat: add LTS_DISPLAY_GPU to fix multi-GPU image corruption

📊 Changes

1 file changed (+36 additions, -0 deletions)

View changed files

📝 display/manager.py (+36 -0)

📄 Description

Hi me again... I guess. I'm a vibe coder now 🤮

This is an attempt to fix #20

I ran into the same issue on my system with a 9900x3D with iGPU enabled (no display attached) and a 9070XT (displays attached).

My uneducated guess is that because the iGPU was claiming /dev/dri/renderD128 and the dGPU had /dev/dri/renderD129, the sway setup was setting up the DMA-BUF on the first available gpu in the list. This explained why I would get corruption when explictly setting /dev/dri/renderD129 (dGPU) in sunshine as the encoder, but it worked fine when using /dev/dri/renderD128 (iGPU).

I wanted AV1 so I once again threw the issue into Gemini.

I'm sure there's a better way to do this, probably by creating an option in the lutristosunshine display enable option to choose which GPU to use if multiple are available.

For now, this change lets you set LTS_DISPLAY_GPU=/dev/dri/renderD12* before running the display enable command.

Gemini was also kind enough to configure the display enable script to ensure this variable is synced to the sunshine encoder option.

Below is Gemini's wording:

Synchronizes GPU targeting between the Sway compositor and Sunshine encoder using the LTS_DISPLAY_GPU environment variable. This prevents corruption caused by DMA-BUF mismatches on systems with multiple GPUs (e.g., iGPU + dGPU).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Arbitrate3280/LutrisToSunshine/pull/22 **Author:** [@joeknock90](https://github.com/joeknock90) **Created:** 5/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/mutli_gpu_selection` --- ### 📝 Commits (1) - [`c0c43df`](https://github.com/Arbitrate3280/LutrisToSunshine/commit/c0c43df8f17fce3ff99c2f87a6515ac9934e4b1f) feat: add LTS_DISPLAY_GPU to fix multi-GPU image corruption ### 📊 Changes **1 file changed** (+36 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `display/manager.py` (+36 -0) </details> ### 📄 Description Hi me again... I guess. I'm a vibe coder now :vomiting_face: This is an attempt to fix #20 I ran into the same issue on my system with a 9900x3D with iGPU enabled (no display attached) and a 9070XT (displays attached). My uneducated guess is that because the iGPU was claiming /dev/dri/renderD128 and the dGPU had `/dev/dri/renderD129`, the sway setup was setting up the DMA-BUF on the first available gpu in the list. This explained why I would get corruption when explictly setting `/dev/dri/renderD129` (dGPU) in sunshine as the encoder, but it worked fine when using `/dev/dri/renderD128` (iGPU). I wanted AV1 so I once again threw the issue into Gemini. I'm sure there's a better way to do this, probably by creating an option in the `lutristosunshine display enable` option to choose which GPU to use if multiple are available. For now, this change lets you set LTS_DISPLAY_GPU=/dev/dri/renderD12* before running the `display enable` command. Gemini was also kind enough to configure the display enable script to ensure this variable is synced to the sunshine encoder option. Below is Gemini's wording: Synchronizes GPU targeting between the Sway compositor and Sunshine encoder using the LTS_DISPLAY_GPU environment variable. This prevents corruption caused by DMA-BUF mismatches on systems with multiple GPUs (e.g., iGPU + dGPU). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
roman 2026-11-01 11:24:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Arbitrate3280/LutrisToSunshine#27
No description provided.