protonscr

Shader Pre-Caching doesn't work with AMD Radeon RX 6400 on Ubuntu 20.04.4

steamclosed AMD driversDistro Family: Ubuntu
ValveSoftware/steam-for-linux#8644 · opened 2022-06-22 by usokawa · updated 2022-06-25 · 4 comments · github
Uusokawa 2022-06-22 github

Your system information

  • Steam client version: Jun 7 2022, at 03:18:43 (1654574690)
  • Distribution: Ubuntu 20.04.4
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

talking about "Apex Legends",

with AMD Radeon RX 470, I could see "Processing Vulkan shaders..." dialog very long time after I clicked "Play" button. but it doesn't happen with AMD Radeon RX 6400 on same machine. (I changed GPU from RX 470 to RX 6400)

in game, frame rate was good with RX 470, but it's very unstable with RX 6400.

below is "du -sh 1172470" result under steamapps/shadercache/,

RX 470

2.6G	1172470

RX 6400

112M	1172470

Shader Pre-Caching with RX 6400 seems to be working for some games (I can see "Processing Vulkan shaders..." dialog and some amount of caches under steamapps/shadercache/), but not for all games.

for using RX 6400 on Ubuntu 20.04.4 (Linux 5.13), I'm using amdgpu kernel driver from Radeon™ Software for Linux®. (this page offers amdgpu-install_22.10.2.50102-1_all.deb package, but newer version is available)

here is Steam System Information.

Steps for reproducing this issue:

  1. rm -rf steamapps/shadercache/*
  2. Settings -> Shader Pre-Caching -> [v] Enable Shader Pre-Caching
  3. Play "Apex Legends"
  4. See "Processing Vulkan shaders..." happens
Uusokawa 2022-06-23 github

it might be "having multiple GPUs" issue. I'm investigating now...

Uusokawa 2022-06-24 github

amdgpu kernel driver from AMD is mostly working with libdrm from kisak-mesa ppa. but for Shader Pre-Caching, libdrm from AMD seems to be required.

I'll summarize what I have done tomorrow.


after installing libdrm package from AMD, I can see "Processing Vulkan shaders..." dialog for Apex Legends. but frame rate is still unstable (or worse?) with RX 6400 and it's also unstable with RX 470 :( watching frame rate in Apex Legends might not be good way to check Shader Pre-Caching functionality.

install installer script and add AMD apt source repository
$ sudo apt install ./amdgpu-install_22.10.3.50103-1_all.deb

install amdgpu-dkms package
$ amdgpu-install --usecase=dkms

install libdrm package
$ sudo apt install libdrm-amdgpu-amdgpu1 libdrm-amdgpu-amdgpu1:i386

there are some other packages such as mesa in AMD repository. it might change situation, but I didn't try them.

Uusokawa 2022-06-25 github

I stopped using amdgpu and libdrm from Radeon™ Software for Linux®. now I'm using Linux 5.14 kernel from linux-oem-20.04 package instead. it works fine with libdrm from kisak-mesa ppa.

here is new Steam System Information

Shader Pre-Caching seems to be working well. I'll check a little more, but probably "use newer kernel" (in this case Linux 5.14 from linux-oem-20.04 package) is the answer of this issue.

Kkisak-valve maintainer 2022-06-25 github

Hello @usokawa, thanks for investigating this.

The kisak-mesa PPA, like other mesa PPAs is not intended to be mixed with other driver installation methods and this reads like a subtle and unsupportable edge case between AMD's standalone installer and the video driver. At this point I don't think this is an issue on the Steam client's side, and as the PPA maintainer, no action will be taken there. Libdrm in the PPA gets updated as required by the mesa point release.

If you do find a workable hypothesis for what's happening with the standalone amdgpu kernel module and mesa PPA, then report it to your video driver vendor.

Nothing extracted yet.