Skip to content

cogl-gpu-info: Recognize newer Mesa GL_VENDOR strings - #889

Closed
KAMI911 wants to merge 1 commit into
linuxmint:masterfrom
KAMI911:fix/llvmpipe-mesa-vendor-detection
Closed

KAMI911 wants to merge 1 commit into
linuxmint:masterfrom
KAMI911:fix/llvmpipe-mesa-vendor-detection

Conversation

@KAMI911

@KAMI911 KAMI911 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • check_mesa_vendor() only matched "Tungsten Graphics, Inc", "VMware, Inc." and "Mesa Project". Mesa 20.3/22.3 report GL_VENDOR as "Mesa/X.org", and Mesa 25.0+ report plain "Mesa", so on those versions the vendor is never recognized.
  • Because the llvmpipe/softpipe/swrast architecture checks in mesa_architectures are only reached after the vendor matches, meta_renderer_is_hardware_accelerated() falls through to COGL_GPU_INFO_ARCHITECTURE_UNKNOWN, which it treats as hardware-accelerated — so on llvmpipe (VMs without 3D, systems without a working GPU driver) Cinnamon's software-rendering fallback never engages: software_rendering stays false, animations stay enabled, and the "check your video drivers" notification never shows, even though rendering is fully done in software.
  • This is a likely contributing factor to Cinnamon intermittently gets stuck in a continuous repaint loop after login (llvmpipe threads ~14% each, idle desktop) cinnamon#14058 (continuous repaint loop / high llvmpipe CPU after login on VMs), and matches the root cause already identified in llvmpipe is reported as hardware accelerated since 5.4, so software rendering is never detected #879 by @Fantu — this PR implements the vendor-string fix (their "option 1" from that issue), scoped to the single function where the gap is, with no change to any other vendor's detection path.

Fixes #879

Test plan

  • On a VM with virtio-gpu (no 3D) / llvmpipe, verify glxinfo -B shows Accelerated: no and, after this change, Looking Glass reports Meta.get_backend().is_rendering_hardware_accelerated() as false and software_rendering as true
  • Verify hardware-accelerated GPUs (Intel/AMD/NVIDIA) are unaffected (code inspection: unrelated vendor branches unchanged)

check_mesa_vendor() only matched "Tungsten Graphics, Inc", "VMware,
Inc." and "Mesa Project". Mesa 20.3 and 22.3 report GL_VENDOR as
"Mesa/X.org", and Mesa 25.0+ report plain "Mesa", so on those
versions the vendor is never recognized, the llvmpipe/softpipe/swrast
architecture checks in mesa_architectures are never reached, and
meta_renderer_is_hardware_accelerated() falls through to
COGL_GPU_INFO_ARCHITECTURE_UNKNOWN, which it treats as hardware
accelerated.

As a result, on llvmpipe (VMs without 3D, systems without a working
GPU driver), Cinnamon's software-rendering fallback never engages:
software_rendering stays false, animations stay enabled, and the
"check your video drivers" notification never shows, even though
rendering is fully done in software.

Fixes: linuxmint#879

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Fantu

Fantu commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

I went through the change: it's correct and safe. The vendor is only used to pick the architecture table, so hardware Mesa drivers that report "Mesa" are still treated as accelerated. The two strings also cover every Mesa release I could check ("Mesa/X.org" in 20.3 and 22.3, "Mesa" from 24.0 to 26.2).

As I wrote in #879, though, I'd still prefer option 2, checking only GL_RENDERER as muffin 5.2 did and as mutter has done since d133f94f: the vendor string has already changed twice, while "llvmpipe" in the renderer string has stayed the same. Either way this fixes the detection on current Mesa, so it's up to the maintainers.

About linuxmint/cinnamon#14058: I had suggested the same link there, through the startup animation, which only runs when software_rendering is false. The reporter tested it with startup-animation set to false and logins still got stuck (2 of 3), so that lead was dropped. I wouldn't expect this PR to fix that issue.

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.

llvmpipe is reported as hardware accelerated since 5.4, so software rendering is never detected

3 participants