LLVM upgrade broke Mesa. I downgraded. What now?

Hi. I was on testing branch and I’m using nonfree repo (AMD GPU). Today after llvm, llvm-libs and lib32-llvm-libs upgrade from 16.0.6 to 17.0.6-2 I had issues like parts of the screen flickering and errors when trying to open e.g. mpv:

libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open swrast [...]

^ that and more. So I used manjaro-downgrade to downgrade the 3 above mentioned packages to 16.0.6, after reboot it works fine.

But what do I do now?

AFAIU upgrading will break it again. Do I keep the packages from upgrading until llvm 17.0.6-3 gets released? For now I switched to stable branch but yay still tries to upgrade llvm so I’m guessing it should work but I’m supposed to do something after upgrading. Should I reinstall something…?

My currently installed `mesa` and `llvm` related packages
❯ yay -Ss mesa | grep Installed
mesa-nonfree/lib32-vulkan-radeon 10:24.0.2-2 (2.5 MiB 10.3 MiB) (Installed)
mesa-nonfree/lib32-mesa 10:24.0.2-2 (17.6 MiB 83.6 MiB) (Installed)
mesa-nonfree/vulkan-radeon 10:24.0.2-2 (2.4 MiB 10.4 MiB) (Installed)
mesa-nonfree/lib32-libva-mesa-driver 10:24.0.2-2 (3.9 MiB 14.8 MiB) (Installed)
mesa-nonfree/libva-mesa-driver 10:24.0.2-2 (4.1 MiB 15.2 MiB) (Installed)
mesa-nonfree/lib32-vulkan-mesa-layers 10:24.0.2-2 (280.3 KiB 699.2 KiB) (Installed)
mesa-nonfree/vulkan-mesa-layers 10:24.0.2-2 (264.1 KiB 655.8 KiB) (Installed)
mesa-nonfree/mesa-vdpau 10:24.0.2-2 (3.8 MiB 14.4 MiB) (Installed)
multilib/lib32-vulkan-radeon 1:24.0.2-2 (2.5 MiB 10.3 MiB) (Installed: 10:24.0.2-2)
multilib/lib32-mesa 1:24.0.2-2 (17.6 MiB 83.6 MiB) (Installed: 10:24.0.2-2)
multilib/lib32-libva-mesa-driver 1:24.0.2-2 (3.9 MiB 14.8 MiB) (Installed: 10:24.0.2-2)
multilib/lib32-glu 9.0.3-1 (144.5 KiB 361.5 KiB) (Installed)
multilib/lib32-vulkan-mesa-layers 1:24.0.2-2 (280.0 KiB 699.2 KiB) (Installed: 10:24.0.2-2)
multilib/lib32-mesa-demos 9.0.0-1 (1.9 MiB 22.7 MiB) (Installed)
extra/vulkan-radeon 1:24.0.2-2 (2.4 MiB 10.4 MiB) (Installed: 10:24.0.2-2)
extra/libva-mesa-driver 1:24.0.2-2 (4.1 MiB 15.2 MiB) (Installed: 10:24.0.2-2)
extra/glu 9.0.3-1 (149.7 KiB 370.9 KiB) (Installed)
extra/vulkan-mesa-layers 1:24.0.2-2 (263.9 KiB 655.8 KiB) (Installed: 10:24.0.2-2)
extra/mesa-utils 9.0.0-3 (157.2 KiB 807.9 KiB) (Installed)
extra/mesa-vdpau 1:24.0.2-2 (3.8 MiB 14.4 MiB) (Installed: 10:24.0.2-2)
extra/mesa-demos 9.0.0-3 (2.9 MiB 23.3 MiB) (Installed)
extra/mesa 1:24.0.2-2 (18.7 MiB 96.2 MiB) (Installed: 10:24.0.2-2)
mesa-nonfree/mesa 10:24.0.2-2 (18.7 MiB 96.2 MiB) (Installed)

❯ yay -Ss llvm | grep Installed
multilib/lib32-llvm-libs 17.0.6-2 (35.7 MiB 145.5 MiB) (Installed: 16.0.6-2)
extra/comgr 6.0.0-1 (42.9 MiB 162.8 MiB) (Installed)
extra/openmp 17.0.6-1 (924.9 KiB 21.8 MiB) (Installed)
extra/rocm-llvm 6.0.0-2 (707.4 MiB 3.3 GiB) (Installed)
extra/libc++abi 17.0.6-1 (134.4 KiB 977.6 KiB) (Installed)
extra/clang 17.0.6-1 (41.4 MiB 198.1 MiB) (Installed)
extra/libc++ 17.0.6-1 (1.2 MiB 11.0 MiB) (Installed)
extra/lld 17.0.6-1 (1.6 MiB 5.6 MiB) (Installed)
extra/llvm-libs 17.0.6-2 (31.6 MiB 128.5 MiB) (Installed: 16.0.6-1)
extra/llvm 17.0.6-2 (18.4 MiB 104.9 MiB) (Installed: 16.0.6-1)

The problem lies in your mesa-nonfree repo, which is not part of Manjaro. Your options have been provided here, choose wisely.

1 Like

The nonfree repo requires unstable branch - testing is not the same.

2 Likes

That is not correct. All branches are also affected by this problem, because there is a lack of sync between non-free mesa and llvm-libs at the same time.

Do not worry, there is a stabil solution.
  1. Switch back to Mesa from a branch of your choice instead of using non-free Mesa
  2. (Optional) you can write your own shell script that checks video codecs what you need. If codecs are missing, you will be notified by your script.
  3. Go Arch mirror website Arch Linux - libva-mesa-driver 1:24.0.5-1 (x86_64) or archive Index of /packages/l/libva-mesa-driver/
  4. Search a matched version of libva-mesa-driver, then download
  5. Install it with sudo pacman -U <package>
1 Like

Compile yourself (no need for unstable branch).

What you need:
sudo pacman -S base-devel git pacman-contrib

Download:

Extract the package and open the folder.
Edit PKGBUILD like this: ( -D video-codecs=all) is the secret sauce.

.
.
.
-D valgrind=enabled
-D video-codecs=all
-D vulkan-drivers=amd,intel,intel_hasvk,swrast,virtio
-D vulkan-layers=device-select,intel-nullhw,overlay

Close editor, open a terminal inside the mesa folder and type the command:

makepkg -si

…you will be asked for your password, and then be patient for some minutes.
Done. I use stable btw.

2 Likes

It will take a few hours, then you can update again.

In the meantime, and if urgent, you could install llvm15-libs which helped in my case.

1 Like

So I waited a few hours and indeed a new set of mesa packages got released to mesa-nonfree, as @mithrial said it would.

  1. I switched back to testing
  2. did the full upgrade (yay -Syuu in terminal)

However, it didn’t work - the issue came back, so I assumed I need unstable after all, as mentioned by @linux-aarhus so once again:

  1. I switched to unstable
  2. did the full upgrade

Now the issue is gone. I switched back to testing to avoid more unstable packages.

I think @Zesko is also right - the main issue is lack of sync between the community and official repos. And yeah, if I was in a pinch, I’d probably go with @leledumbo 's suggestion and removed mesa-nonfree or recompiled as described by @banjo . Fortunately, I wasn’t in a hurry because TBH messing with those things isn’t my forte.

Thank you all for your help and guidance. Now back to Star Citizen. :joy:

The original marked solution is completely erroneous and this thread is full of misinformation. Marked the proper answer as the solution, closing and unlisting it before search engines crawl it.