Skip to content

fix(desktop): chat videos no longer render black on hybrid NVIDIA Linux laptops - #14174

Open
AI091 wants to merge 1 commit into
pingdotgg:mainfrom
AI091:t3code/fix-thread-video-crashes
Open

AI091 wants to merge 1 commit into
pingdotgg:mainfrom
AI091:t3code/fix-thread-video-crashes

Conversation

@AI091

@AI091 AI091 commented Sep 28, 2026 •

Copy link
Copy Markdown

Summary

On hybrid Linux laptops where the iGPU drives the display, some distros set LIBVA_DRIVER_NAME=nvidia for the whole session. Omarchy does this by default, and it's already tracked there (omacom/omarchy#12594, #13081, #13549). Chromium's NVIDIA check only looks at the GPU it renders on, so video decoding moves to the NVIDIA card and the frames never reach the screen. In T3 Code, chat videos show as black boxes and pressing play spins at 0:00.

This isn't a T3 Code bug, and the real fix belongs upstream. Omarchy has already merged one (omacom/omarchy#11690), but it isn't in a release yet, and other distros or users can set the same variable. I'm opening this because a lot of T3 Code users run Omarchy and the accommodation is small, but I'm happy to close it if you'd rather leave this to the distro.

The change: on Linux, when LIBVA_DRIVER_NAME=nvidia, the desktop app starts Chromium with disable-accelerated-video-decode (5 lines in DesktopPreReadyPlatform.ts). On NVIDIA-only machines Chromium already refuses that driver, so nothing changes there. On hybrid machines video decodes on the CPU instead, which is cheap for short chat recordings. Other platforms and environments are unaffected.

Evidence

Same thread, same build, same session env (LIBVA_DRIVER_NAME=nvidia), on a hybrid AMD iGPU + RTX 4060 laptop running Hyprland.

  • Before: both clips are black boxes, and play spins at 0:00. The GPU process holds about 280 MB of NVIDIA memory for the two paused clips (1.4 GB in a test thread with six).

    before

    before.mp4

  • After: first frames show and playback works. The NVIDIA VA-API driver no longer loads, and no NVIDIA memory is used.

    after

    after.mp4

  • apps/desktop typecheck, lint, and format pass.

Merge Danger

Door: two-way. One Chromium switch, only when that env var is set.
Blast radius: small. Only Linux desktop users with LIBVA_DRIVER_NAME=nvidia, who lose hardware video decode in T3 Code.

Made with Claude Opus 5.5 via Claude Code, running in T3 Code.

…ux laptops

Some distros (Omarchy by default) set LIBVA_DRIVER_NAME=nvidia session-wide. On hybrid laptops Chromium renders on the iGPU, so its NVIDIA guard passes and video decode moves to the NVIDIA GPU, whose frames never display. Disable accelerated video decode when that driver is forced.
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 28, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This startup change fixes a targeted Linux/NVIDIA playback issue by changing Chromium's default video-decoding mode for affected sessions, with potential CPU, power, and playback-performance tradeoffs across all videos. The product-default change should be confirmed by a human maintainer.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 79c43819-5fe6-49d9-a4e7-d2a5285543c7

📥 Commits

Reviewing files that changed from the base of the PR and between b528a70 and 3f57800.

📒 Files selected for processing (1)
  • apps/desktop/src/app/DesktopPreReadyPlatform.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

On Linux, Electron setup now appends Chromium’s disable-accelerated-video-decode switch when LIBVA_DRIVER_NAME is exactly "nvidia".

Changes

Linux video decode configuration

Layer / File(s) Summary
Conditional Chromium switch
apps/desktop/src/app/DesktopPreReadyPlatform.ts
When LIBVA_DRIVER_NAME is "nvidia", Linux setup appends disable-accelerated-video-decode to Electron’s command line.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 3f578

No confirmed issue blocks merging the Linux video workaround on the available evidence.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 3f578

The change is limited to Linux launches with a specific video-driver setting. It disables hardware video decoding for that app process and does not appear to grant access or change credentials. Its process-wide effect and restart-only rollback warrant a design review.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new behavior is scoped to affected Linux desktop processes, although the switch applies across each affected Electron instance.

Trust Boundaries and Controls

  • observed — The changed branch selects a fixed Chromium switch from a host environment value; it introduces no renderer input, IPC call, credential operation, or privilege-granting switch in that branch.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the desktop video rendering fix for hybrid NVIDIA Linux laptops, which matches the main change.
Description check ✅ Passed The description clearly explains the problem, affected environment, proposed workaround, scope, evidence, and validation. It does not use the template headings or include the checklist, but it provide…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant