Skip to content

fix: Meta Quest 3/3s crashing on Turnip driver#1185

Open
lvonasek wants to merge 2 commits intoutkarshdalal:masterfrom
WinlatorXR:fix-quest3-turnip
Open

fix: Meta Quest 3/3s crashing on Turnip driver#1185
lvonasek wants to merge 2 commits intoutkarshdalal:masterfrom
WinlatorXR:fix-quest3-turnip

Conversation

@lvonasek
Copy link
Copy Markdown
Contributor

@lvonasek lvonasek commented Apr 11, 2026

Description

Meta Quest 3/3s has Adreno 740 which is normally Turnip compatible but Meta did there something on the driver level (around VR features like SpaceWarp) which made Turnip incompatible. The users starting games on that device see "GPU compatible" but when they start any 3D game, it just keeps crashing.

This PR blacklists Turnip on Meta Quest 3/3s and newer and report the GPU with manufacturer postfix (considering a company having a breaking change on a driver level usually spreads the change around own device portfolio). That means we generate only one additional GPU "Adreno (TM) 740 - Oculus" which will cover the mentioned devices.

This approach avoids making incorrect compatibility reports and applying Turnip on the blacklisted devices. I tried to write it as generic as possible to be able to cover similar future cases.

Recording

Before the fix: https://github.com/user-attachments/assets/14819fdf-ce00-4d71-8ef0-28a7c7240c7d
With the fix: https://github.com/user-attachments/assets/9101636b-4af8-4bf3-b857-37d681e0a11f

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Fixes crashes on Meta Quest 3/3s and newer by disabling Turnip and using the system graphics driver. Prevents false “GPU compatible” messages and filters out Turnip configs on blacklisted devices.

  • Bug Fixes
    • Introduces GPUBlackist to detect Meta/Oculus devices by product and disable Turnip on Quest 3/3s and future devices; allowed on Quest 1/2/Pro.
    • When blacklisted, appends Build.MANUFACTURER to the GPU renderer (e.g., “Adreno (TM) 740 - Meta/Oculus”) to create a distinct GPU entry.
    • In BestConfigService, ignores Turnip in graphicsDriverVersion and graphicsDriverConfig; in GPUInformation, gates isTurnipCapable with the blacklist.

Written for commit bd0f598. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Added device-specific blacklist to prevent incompatible GPU driver information from being used on certain Meta/Oculus devices, improving stability.
    • Refined GPU capability detection and reporting to better identify unsupported devices and include manufacturer info in detected renderer details.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

📝 Walkthrough

Walkthrough

Adds a new GPU blacklist class and uses it to exclude Turnip driver data: GPUBlackist determines device-specific Turnip blacklisting; GPUInformation consults it when reporting renderer and capability; BestConfigService omits Turnip-related config fields when blacklisted.

Changes

Cohort / File(s) Summary
GPU Blacklist Class
app/src/main/java/com/winlator/core/GPUBlackist.java
Added new public class with isTurnipBlacklisted() implementing manufacturer/product checks (Meta/Oculus products).
GPU Information
app/src/main/java/com/winlator/core/GPUInformation.java
Updated GPU info loading to append Build.MANUFACTURER to renderer when Turnip is blacklisted and modified isTurnipCapable(Context) to return false if GPUBlackist.isTurnipBlacklisted() is true.
Configuration Service
app/src/main/java/app/gamenative/utils/BestConfigService.kt
Changed config parsing to conditionally include graphicsDriverVersion and graphicsDriverConfig only when values do not contain "turnip" (case-insensitive) or when GPUBlackist.isTurnipBlacklisted() is false; otherwise omit those fields from the result map.

Sequence Diagram(s)

sequenceDiagram
    participant BestConfig as BestConfigService
    participant GPUInfo as GPUInformation
    participant Blacklist as GPUBlackist
    participant Result as ResultMap

    BestConfig->>GPUInfo: request GPU renderer/info
    GPUInfo->>Blacklist: isTurnipBlacklisted()
    Blacklist-->>GPUInfo: true/false
    GPUInfo-->>BestConfig: renderer, driverVersion, driverConfig
    BestConfig->>Blacklist: isTurnipBlacklisted() (if needed)
    alt not blacklisted and values don't contain "turnip"
        BestConfig->>Result: include graphicsDriverVersion/config
    else blacklisted or contains "turnip"
        BestConfig->>Result: omit those fields
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • phobos665

Poem

🐰 I nibble code and sniff the log,

Turnip clues hidden in the fog,
Meta signs make me pause and stare,
I skip the bits that shouldn't be there,
Hopping onward, configs fair. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: blacklisting the Turnip driver on Meta Quest 3/3s to fix crashes.
Description check ✅ Passed The PR description is comprehensive and well-structured, providing clear context about the issue, solution, and implementation approach.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/src/main/java/com/winlator/core/GPUInformation.java (1)

164-179: Normalize Build.PRODUCT before the switch for safer allowlist matching.

At Lines 167-175, matching is case-sensitive. Normalizing once avoids accidental false blacklisting if product casing varies.

♻️ Proposed hardening
 public static boolean isTurnipBlacklisted() {
     if ((Build.MANUFACTURER.compareToIgnoreCase("OCULUS") == 0) ||
         (Build.MANUFACTURER.compareToIgnoreCase("META") == 0)) {
-        return switch (Build.PRODUCT) {
+        String product = Objects.toString(Build.PRODUCT, "").toLowerCase(Locale.ENGLISH);
+        return switch (product) {
             //Quest 1
             case "monterey", "vr_monterey" -> false;
             //Quest 2, Quest Pro
             case "hollywood", "seacliff" -> false;
             //Quest 3, Quest 3s
             case "eureka", "stinson", "panther" -> true;
             //future devices
             default -> true;
         };
     }
     return false;
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/winlator/core/GPUInformation.java` around lines 164 -
179, The switch in isTurnipBlacklisted currently matches Build.PRODUCT
case-sensitively; normalize Build.PRODUCT once (e.g., toLowerCase or
toUpperCase) before the switch and use the normalized value in the cases so
comparisons like "monterey", "vr_monterey", "hollywood", "seacliff", "eureka",
"stinson", "panther" are matched reliably; update the switch expression to use
the normalizedProduct variable and keep the same case literals normalized to the
same form.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/main/java/app/gamenative/utils/BestConfigService.kt`:
- Around line 733-742: The contains("turnip") checks on filteredJson values are
case-sensitive and can be bypassed by mixed-case payloads; update the checks in
BestConfigService (the branches handling "graphicsDriverVersion" and
"graphicsDriverConfig" from filteredJson) to perform case-insensitive matching
(e.g., use a case-insensitive contains or normalize the string) before
consulting GPUInformation.isTurnipBlacklisted(), then only set
resultMap["graphicsDriverVersion"] and resultMap["graphicsDriverConfig"] when
the case-insensitive check allows it.

---

Nitpick comments:
In `@app/src/main/java/com/winlator/core/GPUInformation.java`:
- Around line 164-179: The switch in isTurnipBlacklisted currently matches
Build.PRODUCT case-sensitively; normalize Build.PRODUCT once (e.g., toLowerCase
or toUpperCase) before the switch and use the normalized value in the cases so
comparisons like "monterey", "vr_monterey", "hollywood", "seacliff", "eureka",
"stinson", "panther" are matched reliably; update the switch expression to use
the normalizedProduct variable and keep the same case literals normalized to the
same form.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4544a771-87a4-4efd-ad2e-e0ae4a2a59c4

📥 Commits

Reviewing files that changed from the base of the PR and between 277cc9c and 3147060.

📒 Files selected for processing (2)
  • app/src/main/java/app/gamenative/utils/BestConfigService.kt
  • app/src/main/java/com/winlator/core/GPUInformation.java

@lvonasek lvonasek force-pushed the fix-quest3-turnip branch from b4dc6e2 to 9327ae2 Compare April 11, 2026 20:36
@lvonasek lvonasek force-pushed the fix-quest3-turnip branch from 9327ae2 to bd0f598 Compare April 11, 2026 20:38
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/src/main/java/com/winlator/core/GPUBlackist.java (1)

5-5: Rename and lock down this utility class for maintainability.

GPUBlackist appears misspelled and is instantiable. Recommend renaming to GPUBlacklist and adding a private constructor (optionally final class).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/winlator/core/GPUBlackist.java` at line 5, Rename the
misspelled utility class GPUBlackist to GPUBlacklist and make it
non-instantiable by adding a private constructor; also consider declaring the
class final to prevent subclassing. Update the class declaration (change
GPUBlackist to GPUBlacklist) and add a private GPUBlacklist() { /* prevent
instantiation */ } constructor, and ensure all references/usages of GPUBlackist
are updated to the new GPUBlacklist identifier.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/main/java/com/winlator/core/GPUBlackist.java`:
- Around line 8-10: The manufacturer check in GPUBlackist currently uses exact
equalsIgnoreCase on Build.MANUFACTURER ("OCULUS"/"META") which misses branded
variants; change the condition to a null-safe, case-insensitive substring or
prefix match (e.g., use toUpperCase/Locale.ROOT and contains or startsWith) for
Build.MANUFACTURER so any variant like "Meta_X" or "OculusVR" still triggers the
blacklist switch on Build.PRODUCT; update the condition that surrounds the
switch (the if that references Build.MANUFACTURER) to use this hardened match.

---

Nitpick comments:
In `@app/src/main/java/com/winlator/core/GPUBlackist.java`:
- Line 5: Rename the misspelled utility class GPUBlackist to GPUBlacklist and
make it non-instantiable by adding a private constructor; also consider
declaring the class final to prevent subclassing. Update the class declaration
(change GPUBlackist to GPUBlacklist) and add a private GPUBlacklist() { /*
prevent instantiation */ } constructor, and ensure all references/usages of
GPUBlackist are updated to the new GPUBlacklist identifier.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 915bd2a0-ab25-441c-a8e7-787c5dbae445

📥 Commits

Reviewing files that changed from the base of the PR and between 3147060 and bd0f598.

📒 Files selected for processing (3)
  • app/src/main/java/app/gamenative/utils/BestConfigService.kt
  • app/src/main/java/com/winlator/core/GPUBlackist.java
  • app/src/main/java/com/winlator/core/GPUInformation.java
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/main/java/app/gamenative/utils/BestConfigService.kt
  • app/src/main/java/com/winlator/core/GPUInformation.java

@utkarshdalal
Copy link
Copy Markdown
Owner

please attach before and after video of this fix

@lvonasek
Copy link
Copy Markdown
Contributor Author

please attach before and after video of this fix

Videos attached

@utkarshdalal
Copy link
Copy Markdown
Owner

makes sense, will review again. Which driver should be used? System?

@lvonasek
Copy link
Copy Markdown
Contributor Author

makes sense, will review again. Which driver should be used? System?

Yes. System driver works on Quest reliable.

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.

2 participants