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

オープン
#879 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c
領域
desktop

調査の方向性

Start with cogl/cogl/cogl-gpu-info.c and src/backends/meta-renderer.c, then compare the renderer checks mentioned from muffin 5.2 and Mutter. Reproduce the mismatch with the llvmpipe setup described in the issue; done when hardware acceleration is reported as false for software renderers and Cinnamon enables software rendering as expected.

索引モデルが issue の本文から書いたものです。

説明

Since the rebase onto mutter 3.36 (8599127f, first released in 5.4.0), meta_backend_is_rendering_hardware_accelerated() returns true under llvmpipe. As a result Cinnamon's software rendering mode (animations disabled, "Check your video drivers" notification) is never enabled automatically.

meta_renderer_is_hardware_accelerated() (meta-renderer.c) relies on cogl_context->gpu.architecture. In cogl-gpu-info.c the llvmpipe/softpipe/swrast architectures are only looked up after check_mesa_vendor() has matched GL_VENDOR, and it only knows "Tungsten Graphics, Inc", "VMware, Inc." and "Mesa Project". llvmpipe reports "Mesa/X.org" (Mesa 20.3 and 22.3) or plain "Mesa" (Mesa 25.0 and later), so the vendor is unknown, the architecture is unknown, and unknown counts as hardware.

Before the rebase, muffin 5.2 checked GL_RENDERER directly in src/core/main.c (llvmpipe, Rasterizer, softpipe) and set CINNAMON_SOFTWARE_RENDERING, which is how the notification still showed up on 5.2 (e.g. in a VM without 3D: linuxmint/lmde-5-cinnamon-beta#20). Mutter dropped the vendor-based check in 2020 and only looks at the renderer string (d133f94f).

Tested on Cinnamon/muffin 6.7.8 in a VM with virtio-gpu without 3D: glxinfo -B shows llvmpipe and Accelerated: no, while in Looking Glass Meta.get_backend().is_rendering_hardware_accelerated() is true, software_rendering is false and animations are enabled.

Two possible fixes:

  1. add the new vendor strings to check_mesa_vendor();
  2. check only GL_RENDERER in meta_renderer_is_hardware_accelerated(), as muffin 5.2 and mutter do.

I'd go with 2, since the vendor string has already changed twice.

Either way it changes what users see: on llvmpipe (VMs without 3D, machines without a working GPU driver) Cinnamon would again disable animations and show the notification at every login (not in live sessions), which hasn't happened since 5.4. On the native backend it would also let should_force_shadow_fb() apply. That's why I'm asking before opening a PR: which way would you prefer?

This was first raised in linuxmint/Cinnamon#13996, which I'm closing because its premise turned out to be wrong.

主要言語
C
スター
249
フォーク
131
平均マージ
13日 16時間
マージ済み PR(30日)
7

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/muffin のほかの issue

linuxmint/muffin の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。