Skip to content

Auto-detect GPU and select optimal graphics driver for new containers - #1998

Open
gigachadmma69 wants to merge 1 commit into
brunodev85:mainfrom
gigachadmma69:feature/gpu-auto-detection
Open

Auto-detect GPU and select optimal graphics driver for new containers#1998
gigachadmma69 wants to merge 1 commit into
brunodev85:mainfrom
gigachadmma69:feature/gpu-auto-detection

Conversation

@gigachadmma69

Copy link
Copy Markdown

Summary

  • Detect the device GPU at container creation time and default to the optimal graphics driver
  • Adreno GPUs: default to Turnip + DXVK (best performance path)
  • Mali / PowerVR / other GPUs: default to VirGL + WineD3D (compatible path)

Problem

Currently, all new containers default to turnip regardless of the actual GPU hardware. This causes immediate black screens or crashes on non-Adreno devices (Samsung Exynos with Mali, MediaTek Dimensity with Mali, etc.). Users have to manually discover they need to switch to VirGL, which is unintuitive and the most common source of "nothing works" first-run reports.

Related issues: #145, #550, #586, #608, #1127

Changes

GPUInformation.java -- Added GPU family detection methods:

  • isAdreno() / isMali() / isPowerVR() -- detect GPU family from GL_RENDERER string
  • getRecommendedGraphicsDriver() -- returns "turnip" for Adreno, "virgl" for others
  • getRecommendedDXWrapper() -- returns "dxvk" for Adreno, "wined3d" for others

ContainerDetailFragment.java -- When creating a new container (not editing existing), use the detected GPU's recommended driver/wrapper instead of the hardcoded turnip/dxvk defaults.

Impact

  • Zero behavior change for Adreno users (still defaults to turnip)
  • Immediate fix for Mali/PowerVR users who currently get broken first-run experience
  • Existing containers are not affected (only applies when creating new containers)

Test plan

  • Create new container on Adreno device -- should default to Turnip + DXVK
  • Create new container on Mali device -- should default to VirGL + WineD3D
  • Edit existing container -- should show current saved values, not auto-detected
  • Override auto-detected defaults manually -- should work as before

…ners

When creating a new container, detect the device GPU and default to the
appropriate graphics driver:
- Adreno GPUs: default to Turnip + DXVK (best performance)
- Mali/PowerVR/other GPUs: default to VirGL + WineD3D (compatible)

Previously, all new containers defaulted to Turnip regardless of GPU,
causing black screens and crashes on non-Adreno devices (Samsung Exynos,
MediaTek Dimensity). Users had to manually discover they needed to
switch to VirGL, which was the #1 source of "nothing works" reports.

Added helper methods to GPUInformation:
- isAdreno(), isMali(), isPowerVR() for GPU family detection
- getRecommendedGraphicsDriver() returns optimal driver for detected GPU
- getRecommendedDXWrapper() returns optimal DX wrapper for detected GPU
@Jeney6

Jeney6 commented Feb 28, 2026

Copy link
Copy Markdown

So problem when I download games

@rdblac

rdblac commented Mar 2, 2026

Copy link
Copy Markdown

@brunodev85 🙏🏻
ability to add turnip drivers using bylaws turnip tool will be good for newer devices

@Jeney6

Jeney6 commented Mar 10, 2026 via email

Copy link
Copy Markdown

@mabiruk

mabiruk commented Apr 12, 2026

Copy link
Copy Markdown

Similarly, ability to automatically detect or at least manually set/override to the more performant CPU topology would be nice - both custom masks and custom order. Notably, at least in my usage with Retroid pocket G2, it seems to completely ignore environment variables I try to adjust it with, or even the GUI's own affinity settings, leaving the most powerful core seemingly completely unutilized, and the order in which it's using the cores is inverted - using the weakest cores for the main thread. I suspect it's something to do with how hardcoded container setup might be? It should be made easy to override, not whatever it's doing right now.

@Bilawal70

Bilawal70 commented Aug 18, 2026

Copy link
Copy Markdown

Op your idea is great but how you explained it is not, let me explain
Every gpu has different vulkan version and opengl es version, and every driver vulkan or gl based have different minimum requirements, so the auto-ness of this system comes to if the version of driver is compatible but as Bruno has done great work in co-implementing both only the requirements part is the issue, so if the system detects vulkan 1.1 or above it selects the compatible or at least to requirements and vice versa for gl , so it's not that you have Snapdragon or mali or something else it's driver based (if any thing I said is wrong please correct me)

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.

5 participants