Skip to content

Refactor Nvidia Workaround#1386

Merged
CyberTimon merged 1 commit into
CyberTimon:mainfrom
RayJW:nvidia-linux-workaround
Jul 23, 2026
Merged

Refactor Nvidia Workaround#1386
CyberTimon merged 1 commit into
CyberTimon:mainfrom
RayJW:nvidia-linux-workaround

Conversation

@RayJW

@RayJW RayJW commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

This reworks the workaround for Linux system to only automatically apply to Nvidia systems, and use a softer workaround __NV_DISABLE_EXPLICIT_SYNC=1, that doesn't disable hardware rendering (thanks to this comment).
The original toggle is preserved as a last resort solution, but not enabled by default any more. This should greatly improve the user experience on Linux systems for basically every one.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Performance improvement
  • Code refactoring
  • Documentation update
  • UI/UX improvement
  • Build/CI or Dependency update

Changes Made

  • Add Nvidia hardware detection
  • Migrate settings to enable hardware rendering again on Linux systems
  • Fix logic mistake in Linux detection
  • Update English description to match new behaviour

Testing

  • I have tested these changes locally and confirmed that they work as expected without issues

Test Configuration:

  • OS: CachyOS
  • Hardware: Ryzen 9, 64 GB RAM, AMD GPU

Checklist

  • My code follows the project's code style
  • I haven't added unnecessary AI-generated code comments
  • My changes generate no new warnings or errors

Additional Notes

It would obviously be great if more people could test this. Ideally at least someone previously affected by the crashes to ensure it doesn't re-introduce that.

AI Disclaimer:

Please state the involvement of AI in this PR:

  • This PR is entirely AI-generated
  • This PR is AI-generated but guided by a human
  • This PR was handwritten with AI assistance (spell check, logic suggestions, error resolving)
  • This PR contains only blood, sweat, and coffee (AI-free)

@RayJW
RayJW requested a review from CyberTimon as a code owner July 16, 2026 18:14
@RayJW

RayJW commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

I just realized, that we could use the [webkit2gtk_nvidia_quirk](https://crates.io/crates/webkit2gtk-nvidia-quirk) crate from the mdns-browser project as an alternative.
I leave that call up to you @CyberTimon, the code would probably be cleaner, and it would require less work from our side in case things change. It does however introduce another dependency, so that's a trade-off worth considering.

@CyberTimon

Copy link
Copy Markdown
Owner

@RayJW Yes this dependency looks good. It seems pretty small and is a no-op on non-linux OS'es. Would you like to implement this dependency?

@RayJW
RayJW force-pushed the nvidia-linux-workaround branch from 117f623 to df1f8e5 Compare July 18, 2026 12:38
@RayJW

RayJW commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

@RayJW Yes this dependency looks good. It seems pretty small and is a no-op on non-linux OS'es. Would you like to implement this dependency?

Done :)

@RayJW
RayJW force-pushed the nvidia-linux-workaround branch 2 times, most recently from 7c7a9ec to 24ff452 Compare July 20, 2026 10:05
@RayJW
RayJW force-pushed the nvidia-linux-workaround branch from 24ff452 to 3127f8e Compare July 23, 2026 07:52
@CyberTimon

Copy link
Copy Markdown
Owner

Hi @RayJW,

Could we achieve this without adding a separate linux_gpu_optimization_migrated_v1 setting entry / migration logic?

While I know that's the cleanest option for the enduser, I'm not sure if the added maintenance overhead makes sense here. As this is my first larger application, I'd really appreciate your opinion on it.

Thanks a lot!

Timon

@RayJW

RayJW commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Hi @RayJW,

Could we achieve this without adding a separate linux_gpu_optimization_migrated_v1 setting entry / migration logic?

While I know that's the cleanest option for the enduser, I'm not sure if the added maintenance overhead makes sense here. As this is my first larger application, I'd really appreciate your opinion on it.

Thanks a lot!

Timon

Honestly, I would keep it. It's just 12 lines of code, runs once, and worst case we can always remove it without any repercussions later on.
Otherwise, all current users of RapidRAW will be stuck with the mostly unnecessarily slow performance unless they manually switch the setting.

I hope that makes sense? :)

@CyberTimon

Copy link
Copy Markdown
Owner

Thanks for the explaination - that makes sense.

Have a nice evening,
Timon

@CyberTimon
CyberTimon merged commit 8354d46 into CyberTimon:main Jul 23, 2026
12 checks passed
@RayJW
RayJW deleted the nvidia-linux-workaround branch July 23, 2026 17:50
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