Skip to content

Studio Desktop: turn GPU compositing on for NVIDIA X11 drivers 590 and newer - #19186

Merged
danielhanchen merged 2 commits into
unslothai:mainfrom
oobabooga:studio/nvidia-x11-compositing-590
Nov 24, 2026
Merged

danielhanchen merged 2 commits into
unslothai:mainfrom
oobabooga:studio/nvidia-x11-compositing-590

Conversation

@oobabooga

@oobabooga oobabooga commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Reported on Reddit (#18259): on Linux Mint X11 with an RTX 5090 and driver 595.99.02, chat scrolling in the desktop app stalls and then jumps ahead. Below driver 610, Desktop turns WebKit compositing off on NVIDIA X11, and without compositing WebKit has no threaded scrolling. #18267 made wheel scrolling step instead of animate on that path. With this PR, 590 and 595 hosts like this one get compositing back, and with it smooth scrolling.

The 610 cutoff comes from #15546, which had data only for 580 (composited WebKit leaks one sync_file fd per frame) and 610/615 (clean). 590 and 595 were never tested.

This PR lowers the cutoff to 590, based on live measurements: each driver below was installed on a real machine, booted, and tested.

How it was measured

  • Hardware and OS: one workstation with an RTX 6000 Ada and an RTX 3090, running an Ubuntu 24.04-based distribution.
  • Driver installs: each driver was the full Ubuntu noble package set from Launchpad, installed with apt and built with DKMS.
  • Load check: after each reboot, nothing ran unless /proc/driver/nvidia/version showed the expected version and module flavor.

Each boot ran two tests:

  1. The minimal EGL reproducer from NVIDIA forum thread 384832. One context issues two eglWaitSync calls per frame, one of them on an imported native fence, and the test counts the fds left after 200 frames. It ran three times per boot. A control mode with a single wait ran once and leaked 0 fds on every driver, leaking or not.
  2. The Unsloth desktop app itself. It was a build of main with a test-only scrolling hook, on the bundled WebKitGTK 2.50.4, with UNSLOTH_WEBKIT_DISABLE_COMPOSITING=0. That variable selects the same composited shared-memory plan this gate turns on. The app ran on an Xvfb display and scrolled continuously for 150 seconds while the web process's sync_file fds were counted every 5 seconds.

Results

Driver Module Kernel Reproducer (leaked fds per 200 frames, 3 runs) App sync_file fds at 150 s Verdict
580.178.04 proprietary 7.0.0-42 199, 199, 199 326 leak
580.178.04 open 7.0.0-42 199, 199, 199 376 leak
580.178.04 open 6.8.0-147 199, 199, 199 336 leak
580.196.07 open 7.0.0-42 199, 199, 199 508 leak
590.48.01 open 6.8.0-147 0, 0, 0 4 (max 5) no leak
590.48.01 proprietary 6.8.0-147 0, 0, 0 4 no leak
595.58.03 open 7.0.0-42 0, 0, 0 4 (max 7) no leak
595.91.07 open 7.0.0-42 0, 0, 0 4 no leak
615.71.09 open 7.0.0-42 0, 0, 0 4 (max 7), two runs no leak

The driver branch decides the outcome:

  • The 580 branch never received the fix. 580.196.07, released in October 2026 after 590 was already out, still leaks at the same rate as 580.178.04.
  • The kernel module flavor makes no difference. On 580.178.04, the open module leaks exactly like the proprietary one, and on 590.48.01 both are clean. This fits the leak being in NVIDIA's userspace EGL library, which both flavors share.
  • The kernel is not the cause. The 590.48.01 module does not compile against kernel 7.0, so 590 was tested on 6.8.0-147, where 580.178.04 also leaked.
  • The app matches the reproducer every time. Where the reproducer leaks, the app gains 2 to 3 fds per second while scrolling; elsewhere it stays flat at 2 to 7.

Change

  • NVIDIA_COMPOSITING_MIN_BRANCH in studio/src-tauri/src/linux_webkit.rs goes from 610 to 590, with the comment, log reason and tests updated to match. All 882 studio/src-tauri binary tests pass, and rustfmt is clean.
  • The old-driver warning in settings says 590 instead of 610 in all 25 locales. Only the number changes.
  • Nothing else moves: 580 and older (the last branch for Maxwell, Pascal and Volta), unreadable branches, Wayland and non-NVIDIA hosts keep their current plans, and UNSLOTH_WEBKIT_DISABLE_COMPOSITING=1 still turns compositing off.

Not tested

  • 590.44.01, the first 590 release. Ubuntu does not carry it, and the module from NVIDIA's own repository did not build for either test kernel.
  • 595 with the proprietary module.
  • CPU use. A 595.91.07 report of the web process spinning at 100% CPU reproduces with compositing off on WebKitGTK 2.52.6, so it does not depend on this gate.
  • The desktop X server; the app runs used Xvfb.

…d newer

The sync_file leak that keeps compositing off on NVIDIA X11 is tied to the
580 branch, not to anything below 610. Measured on real driver installs:
580.178.04 leaks with both the open and proprietary kernel modules, and
580.196.07, the newest 580 release, still leaks. 590.48.01 (open and
proprietary), 595.58.03 and 595.91.07 do not.

Lower NVIDIA_COMPOSITING_MIN_BRANCH from 610 to 590 and update the tests,
the log reason and the driver warning string in every locale.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-24T01:38:54.628926Z de81743 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T11:08:38.912649Z c24c50e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: c24c50e63b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: c24c50e63b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen danielhanchen reopened this Nov 24, 2026
@danielhanchen
danielhanchen merged commit a1845e9 into unslothai:main Nov 24, 2026
67 of 106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants