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

Đang mở
#879 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
desktop

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C
Star
249
Fork
131
Merge trung bình
13 ngày 16 giờ
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của linuxmint/muffin

Tất cả issue của linuxmint/muffin

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.