AMD GPU suddenly unusably slow (mesa issue?)

After a system reboot, wayland/sway takes multiple seconds to render each frame. I did verify that hardware rendering is still in use. It didn’t, as far as I can see, fall back to llvmpipe. It was working perfectly before.

Anyone else seeing this? I suspect this has to do with a debian package upgrade (Mesa drivers? I’m not sure).

  • kernel: 5.13.9 (unchanged, so unlikely to be the issue, also linux framebuffer terminal still works fine)
  • libgles2-mesa 21.2.5-1
  • AMD RX550 GPU
7:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7)

I suspect it was this upgrade:

2021-11-06 15:51:31 upgrade libegl-mesa0:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:31 upgrade libgl1-mesa-dri:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:33 upgrade libglx-mesa0:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:33 upgrade libglapi-mesa:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:33 upgrade libegl1-mesa:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:33 upgrade libegl1-mesa-dev:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:35 upgrade libgl1-mesa-dev:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:36 upgrade libgles2-mesa-dev:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:45 upgrade mesa-va-drivers:riscv64 21.2.4-1 21.2.5-1
2021-11-06 15:51:46 upgrade mesa-vdpau-drivers:riscv64 21.2.4-1 21.2.5-1

Nothing new in dmesg. When I have some time I’ll try if reverting to the old version solves the issue.


apt install libgbm-dev=21.2.4-1 libegl-mesa0=21.2.4-1 libgbm1=21.2.4-1 libgl1-mesa-dri=21.2.4-1 libglx-mesa0=21.2.4-1 libglapi-mesa=21.2.4-1 libegl1-mesa=21.2.4-1 libegl1-mesa-dev=21.2.4-1 libgl1-mesa-dev=21.2.4-1 libgles2-mesa-dev=21.2.4-1 mesa-va-drivers=21.2.4-1 mesa-vdpau-drivers=21.2.4-1

Fails, it cannot find the version anymore. I guess building from source is the only way, it’d be necessary for bisecting anyway…

It seems to be a problem with debian’s build. Building mesa (21.3.0, at least) from source solved the problem.