Skip to content

meta-renderer: Detect software rendering from GL_RENDERER - #892

Closed
KAMI911 wants to merge 2 commits into
linuxmint:masterfrom
KAMI911:renderer-string-sw-detection
Closed

KAMI911 wants to merge 2 commits into
linuxmint:masterfrom
KAMI911:renderer-string-sw-detection

Conversation

@KAMI911

@KAMI911 KAMI911 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Summary

The two commits are independent; either one fixes the detection on current Mesa. This supersedes #889 if you prefer the combined approach.

Fixes #879

Test plan

  • The GL_RENDERER matching helper was compiled and checked standalone (llvmpipe, softpipe, "Software Rasterizer", NULL, and Radeon/Intel strings).
  • Not built in the full tree here (missing graphene-gobject), so please check CI.
  • On a VM without 3D (llvmpipe), Meta.get_backend().is_rendering_hardware_accelerated() should be false and software_rendering true.
  • Hardware Intel/AMD/NVIDIA are unaffected.

🤖 Generated with Claude Code

KAMI911 and others added 2 commits November 12, 2026 16:26
meta_renderer_is_hardware_accelerated() relied solely on the cogl GPU
architecture, which is only resolved after GL_VENDOR matched a known Mesa
vendor string. Mesa has reported "Mesa Project", "Mesa/X.org" and plain
"Mesa" over time, so llvmpipe/softpipe/swrast fall through to
ARCHITECTURE_UNKNOWN, which is treated as hardware accelerated.

Check GL_RENDERER directly (llvmpipe, softpipe, software rasterizer), as
muffin 5.2 did and as mutter has done since d133f94f, so detection does
not depend on the vendor string. The architecture switch is kept as a
fallback.

Fixes linuxmint#879

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
check_mesa_vendor() only matched "Tungsten Graphics, Inc", "VMware, Inc."
and "Mesa Project". Mesa 20.3 and 22.3 report "Mesa/X.org" and Mesa 25.0
and later report plain "Mesa", so the vendor was never recognized and the
llvmpipe/softpipe/swrast architectures were never resolved.

meta_renderer_is_hardware_accelerated() now checks GL_RENDERER directly,
so this is no longer required for correctness there, but it keeps the
cogl architecture information accurate for the architecture fallback.
The vendor is only used to select the architecture table, so hardware
drivers reporting these strings are unaffected.

Refs linuxmint#879

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mtwebster

mtwebster commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

You need to figure how to test this stuff yourself. "Ran in xvfb" is not enough either. I can plug the same prompts into claude and come up with the same solutions, probably better because I can provide better context than you. You're not doing anything but spending tokens and dumping it on me to test.

Install a distro you can test on. Learn to build the cinnamon stack. It's not that difficult. Install Ubuntu 26.04 and build cinnamon on it.

You're not the only one doing this but you're generating enough work for us I feel obliged to say something.

Does this one supercede #889 or what?

@KAMI911

KAMI911 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

I will find a way to test it on real hardware.

At the moment, I am under considerable time pressure, as we are busy preparing several events dedicated to open-source software and promoting Linux Mint.

These include a retro gaming event [1] and a community-organized Linux Install Fest [2], where we aim to introduce visitors to free and open-source software and encourage them to give Linux Mint a try.

From time to time, we also participate in other events with our own booth, such as SysAdminDay [3] and Fantasy Expo [4]. These are great opportunities to meet people, talk about free software and Linux, demonstrate Linux Mint, and introduce it to new users.

Promoting open-source software and helping people discover Linux is something we are passionate about, but organizing and attending these events also takes a significant amount of time and effort.

[1] https://linuxmint.hu/hir/2026/11/ket-nap-retro-videojatekos-idoutazas-budapesten-es-mi-is-ott-leszunk
[2] https://linuxmint.hu/hir/2026/10/ismerd-meg-a-szabad-szoftvereket-es-vidd-is-oket-haza

[3] https://linuxmint.hu/hir/2025/08/sysadminday-2025-egy-nap-ami-csak-roluk-szolt\

report form last year, but we did it in 2026 too

[4] https://linuxmint.hu/hir/2026/08/linux-mint-es-barataink-a-fantasy-expo-2026-on-gyere-onkentesnek-es-hozz-pendrive-ot-a

@KAMI911

KAMI911 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

You can decide whether to use #889 or #892. I created #892 because @Fantu expressed a preference for this approach in this comment.

I'm sorry if I'm creating any extra work for you. I'm simply very enthusiastic about contributing, improving existing solutions, fixing issues, and developing new features. My intention is always to help find the best possible solution.

@Fantu

Fantu commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

LLMs, even though they are called "AI", are not, so the results can vary a lot depending on several factors. First of all, I would recommend having at least some experience with what you are contributing to, so you can guide and correct the LLM better, and always testing. Unfortunately, as mtwebster said, there are too many people without experience who get LLMs to do a lot of things in a short time, but who end up causing mostly wasted time with poor or wrong results.

I have already given some advice to other people and I don't want to spend too much time rewriting everything, so I'll just mention a few things:

  • set in the LLM's main instructions and memory that it must state clearly when parts of the result are doubtful, not sufficiently verified, or based only on training data (often outdated), so you know what to check more carefully, even when it looks correct at first glance;
  • give it more context, for example upstream and dependency repositories and documentation: in my experience this can change the quality of the output a lot;
  • always test, both by having the LLM run tests and by testing manually.

Here is a public post with more information that might be useful: https://bugs.debian.org/1121872#64
It isn't enough to explain everything that's needed, and in any case, as with any tool, you also learn through experience.

mtwebster added a commit that referenced this pull request Nov 13, 2026
The llvmpipe/softpipe/swrast checks only ran after GL_VENDOR matched
a known Mesa vendor string. Mesa now reports "Mesa" (or "Mesa/X.org"),
so software renderers were treated as hardware accelerated and
Cinnamon's software rendering mode never engaged.

Backport of mutter d133f94f.

Fixes #879

ref: #892
@mtwebster

Copy link
Copy Markdown
Member

Went with this instead: f504625

It was an easy backport, and resolves the issue. Also 700 lines of code removed in a follow-up commit (8221e86)

@mtwebster mtwebster closed this Nov 13, 2026
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