You are not logged in.

#1 2020-06-15 22:39:04

eschwab
Member
Registered: 2020-06-15
Posts: 3

[SOLVED] Artifacts with mesa-20 and radeonsi

History

In late February. I updated my system with the usual `pacman -Syu` no ignored pkgs. Upon launching CS:GO later that day I found that all the textures in the game are full of artifacts. After some digging and mucking about trying to narrow down the issue, I was 95% certain that `mesa` was the problem. It had updated from `mesa-19.3.4-2 --> mesa-20.0.0-1`. I tried to downgrade `{lib32-,}mesa` and `{lib32-,}vulkan-radeon` but ran into issues starting X. I eventually gave up looking for a fix and just downgraded the entire system thus reverting the previous `pacman -Syu`. Ok, CS:GO is back to normal. I then successfully incrementally upgraded non-video driver related pkgs until a short list of held pkgs remained (mesa, llvm-libs, linux, glib2, libffi and some others).

Now jump to 2020-06-13 when I decide to once again try a full system update since I noticed that `mesa-21.1.1-1` was in extra. Same problem as before. Artifacts, artifacts everywhere. So I tried switching from `vulkan-radeon` to `amdvlk` with no effect. I am still 95% certain that the fault lies with `mesa`. Then I tried to downgrade back to `mesa-19.3.4-2` and when I `start x`, X fails with the error:

    MESA-LOADER: failed to open radeonsi (search paths /usr/lib/dri)    
    failed to load driver: radeonsi
    MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/dri)
    failed to load driver: kms_swrast
    MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/dri)
    failed to load driver: kms_swrast
    MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
    failed to load swrast driver
    MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
    failed to load swrast driver

`/usr/lib/dri` contains :

    i915_dri.so         
    i965_dri.so         
    iris_dri.so         
    kms_swrast_dri.so   
    nouveau_dri.so      
    nouveau_vieux_dri.so
    r200_dri.so         
    r300_dri.so         
    r600_dri.so         
    radeon_dri.so       
    radeonsi_dri.so     
    swrast_dri.so       
    virtio_gpu_dri.so   
    vmwgfx_dri.so       

So after more digging, I know that `mesa` and `llvm` are closely linked. That any changes to `llvm and llvm-libs` requires a rebuild of `mesa`  So I aquired the PKGBUILD for `mesa-19.3.4-2` and installed all the make deps and the make fails with:

`mesa-19.3.4/src/gallium/targets/opencl/meson.build:36:0: ERROR: C++ library 'clangCodeGen' not found`

I am using `extra-x86_64-build` to manage the clean chroot build environment and my system is currently up to date with `pacman -Syu`, no ignored pkgs, no downgraded pkgs.

The Question

So I don't really know what I should do. Somehow research the bug in `mesa` that was introduced with `v20.0.0` or find a way to build `v19.3.4`?

My hope was that rebuilding `mesa` against the new `llvm{-libs,}-10.0.0-2` would be a solution, but I can't build `mesa`.

Side note: I can build `mesa-git` from the AUR. Same make deps and no `clangCodeGen not found` error. But, alas, that is `mesa-20.2.0` and still produces artifacts in game.

More Info

I know now that this is an issue with OpenGL/radeonsi and that the vulkan drivers have nothing to do with it. I have tried the `mesa-git` pkg from the Chaotic-AUR unofficial repo with no success. The reason I think I need to rebuild `mesa-19.3.4-2` is that the old binary of `mesa-19.3.4-2` I have was not built against the current version of `llvm`. I don't mind downgrading `llvm` if that needs to be done as well.

System setup:

    AMD Ryzen 3200U
    Radeon RX Vega 3
    xf86-video-amdgpu

Last edited by eschwab (2020-06-16 18:12:53)

Offline

#2 2020-06-16 00:41:17

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Artifacts with mesa-20 and radeonsi

Are you sure the artifacts are caused by the Mesa version? To get proof that it's the package versions causing the problem, you can do the following:

You can downgrade the whole system to a certain date with a special mirror server named "Arch Linux Archive". Here's the ArchWiki article about that special mirror:

https://wiki.archlinux.org/index.php/Arch_Linux_Archive

Check out section 3.2 in that article.

After you've chosen a certain date and edited your mirrorlist file, you need to then update your system like this:

sudo pacman -Syuu

This pacman command line has two "-u" arguments. Without the second "-u", pacman will refuse to go back to old versions of packages.

Offline

#3 2020-06-16 01:53:33

eschwab
Member
Registered: 2020-06-15
Posts: 3

Re: [SOLVED] Artifacts with mesa-20 and radeonsi

Yes, I did revert to a previous working state. Which, of course, did identify a list of potential problematic packages. And from there I incrementally updated a few packages at a time to see if they cause the problem. In the end I was left with a very short list and mesa was the top contender for being the problem.

I eventually gave up looking for a fix and just downgraded the entire system thus reverting the previous `pacman -Syu`.

Offline

#4 2020-06-16 05:49:41

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Artifacts with mesa-20 and radeonsi

There's someone sharing a PKGBUILD here that could help with building a certain mesa version you want:

https://github.com/Frogging-Family/mesa-git

You can download it like this, you'll get a subfolder with the PKGBUILD and the other files:

git clone https://github.com/Frogging-Family/mesa-git.git

By default it will build the very latest development version. You can tell it to build a certain commit in "customization.cfg" on the line "_mesa_commit=...".

Inside that "customization.cfg" file, you can also change what drivers it will build to speed things up. You can make it build just the AMD stuff. I use this here with an AMD RX480 card:

_dri_drivers=
_gallium_drivers="radeonsi,svga,swrast"
_vulkan_drivers="amd"

I'm guessing it will take 25 minutes to build on your 3200U CPU.

The commit hash for the 19.3.5 version is this here:

4ef9bd07c59c47dff551d6cd8e0e64fb489b04aa

I found it on this page here:

https://gitlab.freedesktop.org/mesa/mesa/-/tags

EDIT:

The Mesa bug tracker is here:

https://gitlab.freedesktop.org/mesa/mes … &state=all

I could find this bug here that could be about your problem, it's also a person with 3200U graphics:

https://gitlab.freedesktop.org/mesa/mesa/-/issues/2908

The people in the thread write that this environment variable works around the problem:

AMD_DEBUG=nodmacopyimage

Last edited by Ropid (2020-06-16 06:00:26)

Offline

#5 2020-06-16 11:32:55

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [SOLVED] Artifacts with mesa-20 and radeonsi

And that workaround also solved issues for another archlinux user with a radeon vega mobile / picasso graphics iGPU,
https://bbs.archlinux.org/viewtopic.php?id=254694 .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2020-06-16 18:12:22

eschwab
Member
Registered: 2020-06-15
Posts: 3

Re: [SOLVED] Artifacts with mesa-20 and radeonsi

I can confirm that the workaround solves my issue as well. Thank you Lone_Wolf and Ropid.

Offline

Board footer

Powered by FluxBB