Steam using CPU to process vulkan shaders instead of GPU?

Hey all, I have a RTX 3060 and a Ryzen 5600G and I'm on Ubuntu 22.04. Since Steam has shader pre-processing on Linux I thought I'd ask on a Linux gaming community about this. I noticed that when Steam processes Vulkan shaders, it uses the CPU (my CPU heats up a lot and the process manager shows CPU being used while GPU is not used at all). Is there a way to make Steam use the GPU to process Vulkan shaders instead, or am I wrong and Vulkan shaders have to be processed on CPU? I'd presume that things like shaders would process faster on a GPU (it takes a long time for them to process on the CPU). Anyone know anything about this?

deltaroot,

Deltaroot fortifies cyber defense for IT/OT landscapes, shielding digital assets from threats. Our proactive strategies and advanced technologies ensure robust protection. Trust Deltaroot to safeguard your operations with precision and resilience against cyber adversaries.

flubba86,

Your CPU compiles shaders, the GPU runs them. Vulkan shader pre-processing is a form of pre-compiling all the possible shaders your GPU might need before it runs the game (to avoid stutters and freezes later). This is done on the CPU.

Mounticat,
Mounticat avatar

Thanks! Makes sense. I saw "shaders" and linked it to the GPU.

Peafield,

I ran into this exact same problem and spent a painfully long week trying to fix it. Unfortunately I couldn’t… My only solution was to switch distros and the problem disappeared. I went with Fedora and now every game works like a dream. I still don’t know what the issue was but it seems to be something to do with having an AMD system and using steam on Ubuntu.

Probably not the solution you’re looking for, but it is a solution!

ichbinjasokreativ,

All-amd Ubuntu user here. No issues.

tal, (edited )
@tal@lemmy.today avatar

You can turn off shader precompilation in Steam, but that’s not tied to the distro.

If you have it off, you won’t need to have the pass run before starting a game, but then the problem that it was aimed at solving comes up – shader compilation has to happen during gameplay, and this can cause momentary hiccups when a shader is used for the first time.

Steam can optionally do background shader compilation, in which case it’ll run at some point after updating a game, rather than right before a game runs. That may or may not be what one wants.

Mounticat,
Mounticat avatar

Interesting! I think I'll keep it on and just deal with the fact that it runs on CPU and takes a while, then. I was just wondering if it running on CPU was a mistake or something wrong on my part.

madmonki,

My guess is your mesa driver was old so you didn’t have graphics pipeline library enabled by default. distros doesn’t differ but packages.

Peafield,

Nope. Had the latest mesa drivers I could get and it still didn’t work.

tal,
@tal@lemmy.today avatar

I don’t believe that there’s a shader compiler that runs on the GPU.

deathmetal27,

Valve created the ACO shader compiler, but it’s only for AMD GPUs.

tal,
@tal@lemmy.today avatar

ACO runs on the CPU.

The output it produces is for AMD GPUs.

deathmetal27,

Oh, my bad. I think I misremembered.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux_gaming@lemmy.world
  • rosin
  • magazineikmin
  • GTA5RPClips
  • khanakhh
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • thenastyranch
  • everett
  • osvaldo12
  • kavyap
  • cubers
  • DreamBathrooms
  • megavids
  • Durango
  • modclub
  • ngwrru68w68
  • vwfavf
  • ethstaker
  • tester
  • cisconetworking
  • tacticalgear
  • Leos
  • provamag3
  • normalnudes
  • anitta
  • JUstTest
  • All magazines