ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.21k stars 174 forks source link

Building Vulkan shader cache takes several hours #7408

Open Fieneppi opened 3 years ago

Fieneppi commented 3 years ago

System information

Please describe your issue in as much detail as possible:

Processing Vulkan shaders takes several hours for some games. The biggest offender so far is Warframe (I tried to launch it for a couple of days already without a result) and Path of Exile (did not try to launch it recently, but faced same problems in the past month or two). More so, for Warframe it takes several hours without producing any result: process hangs at about 60% and starts moving back and forth. This is how system load looks in KSysGuard during this phase: image For reference, the same system load from KSysGuard, but for Final Fantasy XIV (which finishes processing Vulkan shaders in about 10 to 15 minutes without issues): image

Trying to skip this process (by pressing "Skip" or "x" buttons) results in Steam closing (crashing?).

System information collected through Steam is here.

Steps for reproducing this issue:

  1. Have shader pre-caching enabled (and background processing is disabled).
  2. Download and install, e.g. Warframe.
  3. Try to launch it.
demoth commented 3 years ago

+1 exactly the same behavior: System information: https://pastebin.com/j6wWFuvd

I noticed that for quake champions it works fine, takes about 5 mins or so

Redbatman89 commented 3 years ago

What GPU Driver do you have? When I upgraded to Nvidia 455.28 my shader took a long time too. Using Timesift to roll back to 440.100 fixed it for me.

Fieneppi commented 3 years ago

I have an AMD video card and using Mesa 20.1.8, so I doubt this will work for me. I also did not notice any changes to the shader processing times with driver updates, it was always taking too long for Warframe and PoE since fossilize has been added to Steam. It's just this issue and #7306 combined makes it unplayable and I was forced to disable pre-caching for now, which is a shame - it helped a lot with Warfarme's stuttering.

NikoBellicRU commented 3 years ago

Takes a long time here also depending on the game and i noticed that fossilize is not using all my cores,i checked in system monitor it uses 3 cores of 4 so maybe that's not helping? Anyways at least it's worth the wait.

LiamDawe commented 3 years ago

Had this issue today with Deep Rock Galactic. Ended up hard-rebooting and removing the game for now, as it seems to be the only game I get the issue with I don't want to turn off the whole feature because of it.

It was at least 2+ hours, desktop was completely unusable.

System info: https://gist.github.com/LiamDawe/ffb4945d85c111200d2bb93d587542fc

D33M0N commented 3 years ago

Same issue kind of. Vega 64 (with mesa 20.3.0_devel), Horizon Zero Dawn, takes 15-30 minutes to compile shaders. My problem is that it starts this re-compile thing EVERY SINGLE TIME I start the game. However as I let it finish first time around, I didn't bother to wait second time and pressed "Skip" and the game started just fine and worked as good as the first time when I let the shaders compile finish. So now I am always pressing "Skip" and it works fine. And it keeps trying to re-compile them every time.

I have set enabled "Enable Shader Pre-Caching (9005 MB Pre-cached)" <= btw this 9005MB number does not increase anymore long time ago regardless how much more it pre-cached.; (actual size of the /home/deemon/.steam/steam/steamapps/shadercache folder is 42.5G, out of which Horizon Zero Dawn cache alone is 9.4G)

also enabled "Allow background processing of Vulkan shaders" which causes it to run for every other game installed in the system... once luckily, but still tries to re-compile again already compiled shaders for games when starting them.

mandaputtra commented 3 years ago

I got the same issue here, here's mine

OS: Ubuntu 20.04.1 LTS
KERNEL: 5.4.0-42-generic
CPU: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
GPU: AMD RAVEN (RX560X)
GPU DRIVER: 4.6 Mesa 20.0.8
RAM: 14 GB

I enable all options that makes shaders caching faster but, still ~ sometimes it just take too long for a game. Most noticable on my system are Dota 2.

mashu commented 3 years ago

Did you solve the issue with Dota2 compiling shaders for an hour? I really hope this is one time only. I haven't started the game yet, but just started googling as this does not look reasonable.

mandaputtra commented 3 years ago

Nope, yeah it only happen like once a month so it didn't really bother me - I still can accept it. Having SSD also help fasten the vulkan shader cache building.

m0n0x41d commented 3 years ago

Hey, I have the same problem. RDR2, Witcher 3 and Cyberpunk compile shaders with every run. Quite annoying.

Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] vendor: Sapphire Limited Nitro+ driver: amdgpu v: kernel bus-ID: 01:00.0 chip-ID: 1002:67df class-ID: 0300 Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: amdgpu,ati unloaded: modesetting alternate: fbdev,vesa resolution: 1: 1920x1080~75Hz 2: 768x1366~60Hz s-dpi: 96 OpenGL: renderer: Radeon RX 590 Series (POLARIS10 DRM 3.39.0 5.9.16-1-MANJARO LLVM 12.0.1) v: 4.6 Mesa 21.1.5 direct render: Yes

mashu commented 3 years ago

Yeah happened to me that after Dota2 update i had to wait another hour again to start a game. Seems it's happening every update, that would be ok if it was reasonable 1min max process and not 1h. Linux kernel compiles faster with all modules enabled.

On Sat, Aug 7, 2021, 18:01 Ivan @.***> wrote:

Hey, I have the same problem. RDR2, Witcher 3 and Cyberpunk compile shaders with every run. Quite annoying.

Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] vendor: Sapphire Limited Nitro+ driver: amdgpu v: kernel bus-ID: 01:00.0 chip-ID: 1002:67df class-ID: 0300 Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: amdgpu,ati unloaded: modesetting alternate: fbdev,vesa resolution: 1: 1920x1080~75Hz 2: 768x1366~60Hz s-dpi: 96 OpenGL: renderer: Radeon RX 590 Series (POLARIS10 DRM 3.39.0 5.9.16-1-MANJARO LLVM 12.0.1) v: 4.6 Mesa 21.1.5 direct render: Yes

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/steam-for-linux/issues/7408#issuecomment-894672593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATFB53WF3544F4U6Z65L3T3VKFZANCNFSM4STC2UGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

lfilho commented 2 years ago

Same here, with Horizon Zero Down. Happens every game launch, even without any other updates to the game or the steam client.

Antagram commented 1 year ago

Same here! This has happened to me since I ditch windows and started gaming on linux. Tried with different configs and distros with the same result. My main config and distro right now:

i7 3940xm gtx 980m Pop_OS!

Found this on steam's forums if it helps, there are other bug reports there and in this github, but they always close them and not pay attention:

https://steamcommunity.com/groups/steamclientbeta/discussions/0/4622335767028553884/

tatsujb commented 2 weeks ago

same issue with Ubuntu trying to play rocket league.

Processing takes about an hour and the process speeds it's way through the first 75-80% in the first couple seconds and then dramatically slows down for the next hour.