stuck rendering with !glibc (musl) and amdgpu
Affected version
- 41.1, 41.3
- Alpine Linux 3.15.0
- AMDGPU
- musl libc (well basically anything not using glibc)
Bug summary
When starting mutter or any other application using mutter (like gdm) graphics do not render until VTs are switched manually. At that point the rendering advances a bit then gets stuck again.
There are two files attached to this issue. The first one is the initial startup of mutter and the 2nd one is the
same but with a VT switch included. As you can see cogl_onscreen_swap_buffers
gets called so the screen advances.
Steps to reproduce
- take and amdgpu system
- install anything that does not use glibc
- start mutter
Relevant logs, screenshots, screencasts etc.
If pageflipping is disabled the rendering works fine, however that will take a different codepath in mutter. I assume glibc hides a bug.
I have no real insight into mutter itself but the following patch makes it work as expected:
--- ./src/backends/meta-stage-impl.c.orig Tue Jan 18 20:20:59 2022
+++ ./src/backends/meta-stage-impl.c Tue Jan 18 20:15:44 2022
@@ -571,10 +571,14 @@
* the resize anyway so it should only exhibit temporary
* artefacts.
*/
+#if 0
if (use_clipped_redraw)
swap_region = cairo_region_reference (fb_clip_region);
else
swap_region = cairo_region_create ();
+#else
+ swap_region = cairo_region_reference (fb_clip_region);
+#endif
g_clear_pointer (&redraw_clip, cairo_region_destroy);
g_clear_pointer (&fb_clip_region, cairo_region_destroy);
Edited by Robert Nagy