steam-for-linux icon indicating copy to clipboard operation
steam-for-linux copied to clipboard

Shader Cache is Being Downloaded and Compiled After Every Single Reboot

Open gardotd426 opened this issue 2 years ago • 105 comments

Your system information

  • Steam client version (build number or date): Sep 16 2021 at 00:09:09
  • Distribution (e.g. Ubuntu): Arch Linux
  • Opted into Steam client beta?: [Yes/No] Yes
  • Have you checked for system updates?: [Yes/No] Yes

Please describe your issue in as much detail as possible:

Every time I launch Steam after restarting my computer, Steam re-downloads and compiles the shader cache for every game. I have "Allow background processing of Vulkan shaders" enabled, and every time I launch Steam after a reboot, I have several downloads for shader caches, and opening the Settings and going to "Shader Pre-Caching" shows that the shaders are being compiled. After they're done, if I exit Steam and re-launch it without rebooting, nothing happens, but I can reliably reproduce it by simply rebooting.

Before this started a couple weeks ago, this was not an issue, and shaders would be downloaded and compiled only periodically or after an Nvidia driver update. Also, the size of the shader cache has ballooned to 15.5 GB, before it was only about 7 or 8 GB, and it consistently stayed around that size for months and months. I haven't installed any new games since then, the only thing that's changed is Doom Eternal added Ray Tracing and DLSS support.

I don't think this is the same as #6299, as it's not limited to Steam Play titles, it's all games. Also, it doesn't happen every time I launch Steam, only every time I reboot.

All of the updates are between 100 KB and 50 MB, except the Resident Evil 2 Remake which was just 2 GB, and Borderlands 3 which was 4.2 GB. Neither were game updates.

EDIT: After the latest round of downloads the shader cache has jumped up to 18 GB. Weirdly enough though, Disk Usage in the Download Manager shows 0 B/s throughout the downloads:

Screenshot_20210917_041713

Steps for reproducing this issue:

  1. Join the Client Beta
  2. Enable "Allow background processing of Vulkan shaders"
  3. Start Steam, download and compile shaders, exit Steam, reboot and relaunch Steam.

Hardware/System Info

Ryzen 9 5900X Nvidia RTX 3090 Nvidia Driver Version: 470.63.01 Arch Linux 5.14.3-tkg-cfs Steam System Info: https://gist.github.com/gardotd426/3aa96697991bcc8d796be45814435a83

gardotd426 avatar Sep 17 '21 08:09 gardotd426

Hello @gardotd426, this reads like the current intended behavior of the Steam client. These shader pre-cache updates were happening before, but with less visibility.

Since you've opened this issue report, we might as well ponder the finer details. Please attach ~/.local/share/Steam/logs/shader_log.txt as a file.

kisak-valve avatar Sep 17 '21 12:09 kisak-valve

shader_log.txt

gardotd426 avatar Sep 17 '21 14:09 gardotd426

Been happening for a month for me. Never ending downloading.

jarrard avatar Sep 17 '21 15:09 jarrard

What I'm mostly seeing in the log is:

[timestamp] [AppID <AppID #>] Starting Shader Swarm download job.
[timestamp] [AppID <AppID #>] Target manifest <target manifest #> of size <larger size>.
[timestamp] [AppID <AppID #>] Source manifest <source manifest #> of size <smaller size>u.
[timestamp] Committed bucket <#> (AppID <AppID #>) from <source manifest #> to <target manifest #>.
[timestamp] [AppID <AppID #>] Finished Shader Swarm download job: No Error

These look like legitimate pre-cache delta-patch update, and not a duplicate download.

There's also:

[2021-09-17 03:52:20] Queuing depot manifest 4256548600728534165 (2159391403 bytes) for bucket ID 1027610, type SteamSwarm/G7:CompatVideoTCMediaV1 (AppID 883710).
[...]
[2021-09-17 04:13:54] Committed bucket 1027610 (AppID 883710) from 0 to 4256548600728534165.
[2021-09-17 04:13:54] [AppID 883710] Finished Shader Swarm download job: No Error
[2021-09-17 03:52:20] Queuing depot manifest 1000222499080350120 (4542080587 bytes) for bucket ID 731639, type SteamSwarm/G7:CompatVideoTCMediaV1 (AppID 397540).
[...]
[2021-09-17 04:23:47] Committed bucket 731639 (AppID 397540) from 2385576768023649330 to 1000222499080350120.
[2021-09-17 04:23:47] [AppID 397540] Finished Shader Swarm download job: No Error

To me, Commited bucket # from 0 to <target manifest #> reads like Resident Evil 2 (883710) did full download of transcoded video content, and Borderlands 3 (397540) got an update to the transcoded video it uses with Proton, and that could account for the larger download sizes for those games.

(Speculation) I'm guessing that there's a single file size limit to delta patching with steampipe and the transcoded video .foz files easily exceed that limit, causing a full download in both cases.

Again, important detail here is that these aren't duplicate updates. Steam's pre-caching system is slowly discovering more shaders being used by the games in the wild, and adjustments are being made to the sets of transcoded video to improve in-game video playback of some games.

kisak-valve avatar Sep 17 '21 15:09 kisak-valve

I just got another update for every game in my library, this is the third time today that every game I have has had a shader cache update. Is that really intended behavior?

gardotd426 avatar Sep 18 '21 00:09 gardotd426

Yeah it is 100% broken imo. My cache is almost 10GB and I see it PROCESSING the same games over and over again for months now. This doesn't seem right to me! (My games list has barely changed, I'm not buying games constantly)

jarrard avatar Sep 18 '21 03:09 jarrard

Thanks @kisak-valve those log messages are interesting. Grepping my shader_log.txt and shader_log.previous.txt files I can see that only a single game ever downloads deltas (936790: Life is Strange True Colours) all the other ones (36 unique app ids) always download the full shader cache (and none of those contain the 'Source manifest' line). This definitely feels like an issue with the content delivery system not knowing about the existing shader content and mistakenly downloading the whole thing every time.

shader_log.previous.txt shader_log.txt

brain-anti-freeze avatar Sep 18 '21 08:09 brain-anti-freeze

I just deleted all my shadercache folder on all my drives and reconsolidate via symlink to the .steam folder. See if that helps, so far it seems ok. I feel steam for linux should just do this automatically...

jarrard avatar Sep 18 '21 13:09 jarrard

Same thing here. Since the new download UI was added I've noticed Steam downloads a metric fuckload (that's a technical term) of data every time I start it - so this behavior has probably been present way longer than that. I start Steam once every day after work, and then it runs until I shut down around bedtime.

EDIT: I'll get a screenshot tomorrow or the next day.

The downloads almost never have any information tagged on. I have no idea why Steam does it or what it is. Luckily I don't pay for bandwidth.

https://gist.github.com/folknor/73fcc0b5d229c86af44c4dfe9b409f8a

folknor avatar Sep 18 '21 22:09 folknor

steamdownloads Here we go, only 18 downloads today, and most of them quite small.

folknor avatar Sep 19 '21 06:09 folknor

Just noticed that BFV has a shadercache of 1.9GB!! Some of these games just have massive caches!

Screenshot_20210920_134528

jarrard avatar Sep 20 '21 04:09 jarrard

(@kisak-valve said): this reads like the current intended behavior of the Steam client. These shader pre-cache updates were happening before, but with less visibility.

Is it intended that the shader downloads are not tagged as such in the downloader? You put in the effort to make it so the download could have a little info icon telling you what sort of update it is, these should clearly be marked as shader updates, but they are not.

"A new (i) icon next to the game's title will reveal a tooltip displaying the types of content that is included in that update. Types consist of: Game Content, Downloadable Content, Workshop Content, and Shader Pre-caching. This icon only appears if the update is not solely game content." -- https://store.steampowered.com/oldnews/88497

Yet the "(i)" icon is nowhere to be seen:

Image of Steam downloader with shader updates

The fact that it's not there, makes it seem like the updates are, by implication, "solely game content" which is clearly false. It would solve a lot of confusion to fix this minor issue.

Once everyone understrand what these updates are, you could go on to perhaps offer an option to filter them out, but for that to work they must be properly tagged.

eloj avatar Sep 20 '21 14:09 eloj

Also same problem on my end too. RDR2 downloads 141 MB shader cache at every Steam client run. Doesn't happen right away, requires booting the game. After quitting from the title, download begins.

shader_log.previous.txt shader_log.txt

Leopard1907 avatar Sep 21 '21 00:09 Leopard1907

Hello @Leopard1907, looking at your log and described symptoms, I think you're seeing a separate issue from this issue report. Please open a new issue report.

kisak-valve avatar Sep 21 '21 00:09 kisak-valve

The Steam Client Beta from Sept 28 has really helped!

https://steamcommunity.com/groups/SteamClientBeta/announcements/detail/2874976428915672907

jazztickets avatar Sep 29 '21 16:09 jazztickets

I thought it had helped me as I was no longer getting the download after the game exits but after doing a bit more investigation it seems that it still does it but only for the transcoded_video.foz file but not the swarc file. However now most games now no longer downloads the shaders at all (even if I've deleted the directory or I turn shader caching off and back on again) and the amount shown in settings is still reset to 0 every time so the issue changed for me but still not working as expected.

brain-anti-freeze avatar Sep 29 '21 17:09 brain-anti-freeze

I'm seeing small amounts of files being downloaded but having a custom version of Proton installed stops it in it's tracks.

lucifertdark avatar Sep 29 '21 19:09 lucifertdark

After digging around a bit more (and turning caching off and on, deleting the cache folders, opting out and back into the beta etc) I now have 12 games which it downloads the caches for on every steam start but they all fail to process with the error Cannot find impl for original cache type 7 from depot. and no other downloads are taking place either in the background or after a game exits. It also now saves and uploads a minidump file on every steam start.

brain-anti-freeze avatar Sep 29 '21 19:09 brain-anti-freeze

I guess the lack of downloads might be due to the datasets starting over in this new beta and it will take time for the shaders to be recollected and become available for download again. I'll give it a few days and see if I'm getting anything.

brain-anti-freeze avatar Sep 29 '21 19:09 brain-anti-freeze

My latest log says I've been uploading shaders as well as downloading. The client is still reporting nothing pre-cached but I can live with that as long as the caching is actually happening.

lucifertdark avatar Sep 30 '21 10:09 lucifertdark

I'm seeing those too but the upload always fails with server busy

[2021-10-01 18:55:16] Register Shader request for 1162ba8b973ec4b6 / L2:b40f80f34cf78f091a6da598b73981d7 shader 0 failed with server reply: Busy [2021-10-01 18:55:16] Register Shader request for 1162ba8b973ec4b6 / L2:b40f80f34cf78f091a6da598b73981d7 shader 1 failed with server reply: Busy [2021-10-01 18:55:17] Register Shader request for 1162ba8b973ec4b6 / L2:b40f80f34cf78f091a6da598b73981d7 shader 2 failed with server reply: Busy [2021-10-01 18:55:17] Register Shader request for 1162ba8b973ec4b6 / L2:b40f80f34cf78f091a6da598b73981d7 shader 3 failed with server reply: Busy [2021-10-01 18:55:18] Register Shader request for 1162ba8b973ec4b6 / L2:b40f80f34cf78f091a6da598b73981d7 shader 4 failed with server reply: Busy [2021-10-01 18:55:18] Register Shader request for 1162ba8b973ec4b6 / L2:b40f80f34cf78f091a6da598b73981d7 shader 5 failed with server reply: Busy [2021-10-01 18:55:18] Register Shader request for 1162ba8b973ec4b6 / L2:b40f80f34cf78f091a6da598b73981d7 shader 6 failed with server reply: Busy

brain-anti-freeze avatar Oct 01 '21 17:10 brain-anti-freeze

Today's beta update has helped a little though, the Cannot find impl for original cache type 7 from depot. error has been resolved. The 12 caches that it now downloads on every steam client start are at least replaying properly. Unfortunately the initial bug is still present, its downloading the full shader cache for them each time (1.5Gb in total). Some games do now download a cache after they finish (RDR2 does), still the full unchanged file though.

Attached is the result of opening steam, waiting for the downloads and replays to finish then closing and re-opening it (identical downloads and replays happen).

shader_downloads.txt shader_log.previous.txt shader_log.txt

brain-anti-freeze avatar Oct 01 '21 18:10 brain-anti-freeze

Can you try today's Client Beta?

Plagman avatar Oct 02 '21 01:10 Plagman

I just got the update, it's only downloading shaders for Proton 6.3 & experimental, ignoring all other versions I have installed. This is the message I get for all the others...

Attempting to find current bucket (compat tool: 'proton_316'); temporary dir: /home/user/.local/share/Steam/shader_cache_temp_dir_d3d11_64 [2021-10-02 07:20:40] Unknown shader cache type, ignoring

lucifertdark avatar Oct 02 '21 06:10 lucifertdark

@Plagman today's beta resolves the downloads issue for me ! I'm only getting the expected downloads and replays now. All uploads still fail with server busy but that could very well be legit since the caching was started over. Thank you everyone who worked on resolving this issue !

brain-anti-freeze avatar Oct 02 '21 09:10 brain-anti-freeze

Myself and others have reported that Borderlands 3 is getting 4-6GB shader precache updates literally every day. That game specifically, and multiple people are experiencing it.

gardotd426 avatar Oct 06 '21 23:10 gardotd426

Same thing to me too. After steam client get this new UI update, i got often checking games or download chache. I'm lucky that i play only few games. I imagine if i had my full library, how many time i need to wait every time i stars steam client. With old client all was so much better.

deathxxx123 avatar Oct 11 '21 19:10 deathxxx123

Every time i restart steam it tries to download a 700MB "Shader pre-caching update" for No Man's Sky.

Verifying the integrity of files moves the game to completed. I am on the latest steam beta.

GithubUser5462 avatar Oct 13 '21 14:10 GithubUser5462

I just watched Borderlands 3 update and process it's shader cache twice in a row. Like literally back to back. And the overall shader cache jumped 3 GB up to 20GB total.

This is going to destroy battery life on the Steam Deck if it stays this way.

gardotd426 avatar Oct 15 '21 02:10 gardotd426

Hello @gardotd426, now that the shader pre-cache reset which was connected to the 2021-10-06 Steam client update has had some time to warm up, are you still seeing large shader pre-cache updates with Borderlands 3 on a regular basis?

kisak-valve avatar Nov 19 '21 23:11 kisak-valve