You are not logged in.

#1 2026-02-24 06:47:14

tkoham
Member
Registered: 2026-02-24
Posts: 4

[SOLVED] Is this the expected vulkan behavior with PRIME offload?

hello everyone,

Just had a couple questions about what I should be expecting with a fresh install and a hybrid graphics setup.

I followed the guide on the wiki on setting up prime with nvidia gpus, set up power management, etc. and rebooted. Minimal config. Didn't install anything other than the appropriate DDX driver and nvidia-open + deps and nvidia-prime.

Everything seems to be working other than needing to make a startup script that kills KDE's sensor polling of the dGPU so it can hit d3cold and suspend.

My impression from the wiki was that I would have to manually configure every app I launched to use the dgpu, but any process, even started from terminal that uses vulkan seems to run on the dGPU automatically. Also, wine applications and anything started from steam. the only thing I can get to run on the iGPU seems to be glxgears, the compositor, and firefox's version of webgl

If I enable vulkan/webGPU on firefox in about:config it launches on  the dGPU.

It's great that I didn't have to sit around and add lines to a bunch of .desktop entries to get that to happen, but I cant find any of the relevant environment variables that would make this happen anywhere. I tried grepping printenv, searching through user profiles and bashrc, etc. nothing.

I also don't seem to have any way to override this behavior.

Did I not get the memo on something important here?

I've double checked, I've got mesa and vulkan-radeon installed and everything, like the few processes that do run on integrated graphics have hardware 3d acceleration

This setup is mostly fine, but let's say for instance that I know some games I have installed that run absolutely fine on the iGPU and I don't want to waste my battery. I don't seem to have a way to do that.

Any help would be appreciated. Thanks in advance.

Last edited by tkoham (2026-02-25 12:43:02)

Offline

#2 2026-02-24 09:49:18

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Is this the expected vulkan behavior with PRIME offload?

any process, even started from terminal that uses vulkan seems to run on the dGPU automatically

https://wiki.archlinux.org/title/Vulkan … en_devices

Offline

#3 2026-02-25 01:16:24

tkoham
Member
Registered: 2026-02-24
Posts: 4

Re: [SOLVED] Is this the expected vulkan behavior with PRIME offload?

seth wrote:

any process, even started from terminal that uses vulkan seems to run on the dGPU automatically

https://wiki.archlinux.org/title/Vulkan … en_devices

Oh wow yeah, that'd do it. I must have missed that last night and I was so convinced that the nvidia specific __VK_LAYER_NV_optimus=NVIDIA_only  must be set globally somewhere that I went on a wild goose chase trying to find it. I appreciate the help.

My apologies if this is linked in the prime or optimus wiki pages, I was doing my best to be thorough before bringing the issue here in the first place. I even started looking for documentation changes in the nvidia driver manual on internet archive.



Just so I'm understanding this correctly -- these vulkan/glx specific environment variables override anything you try to set with DRI_PRIME or __NV_PRIME_RENDER_OFFLOAD or setting desktop entries to prefersnondefaultgpu?

Because that's the behavior I'm experiencing. It's honestly more or less how I'd like the system to behave, with a couple exceptions, so if I can set one or two things to run on the igpu, like firefox,  and leave the default behavior as-is without breaking everything, that'd be ideal.

Thanks again man.

Last edited by tkoham (2026-02-25 01:17:57)

Offline

#4 2026-02-25 01:51:17

tkoham
Member
Registered: 2026-02-24
Posts: 4

Re: [SOLVED] Is this the expected vulkan behavior with PRIME offload?

Alright! that seems to be doing the trick.

so for anyone who doesn't want to do all of this manually, For future reference:

MESA_VK_DEVICE_SELECT=YOUR:IGPU! VK_DRIVER_FILES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json (or intel_whatever.arch.json) __GLX_VENDOR_LIBRARY_NAME=mesa DXVK_FILTER_DEVICE_NAME="Vulkan Name String"

Is the catch-all string for forcing stuff back onto the igpu. (Probably need to change the radeon driver to i686 if your particular process needs the lib32 driver)

You can get all those variables concisely by running:

MESA_VK_DEVICE_SELECT=list vulkaninfo

and ls the driver path in the command to get the correct driver name assuming it's installed.

Should work on steam games, wine applications, and native stuff, but not all the arguments are strictly necessary for one or the other. Obviously the dxvk argument is only there for wine stuff, etc. --- but you're not gonna break anything by passing it with the testing I've done. Also don't prime run steam if you have these set as launch options. Steam games inherit the environment from whatever you pass launching steam, and I have no idea how that would behave. Might work fine, but why run steam on the power hungry GPU if you don't have to?

I would imagine this would break if you're using switcheroo and you've set the desktop entry instead of just prepending the command with these (wrong icd driver/glx forced onto dGPU), or maybe it overrides prime offload entirely, but I haven't tested that yet.

Honestly I'm just glad this turned out to be so simple.

Gonna make a wrapper bash script called subprime-run, throw it somewhere in the path, and call it a day.

Last edited by tkoham (2026-02-25 01:54:57)

Offline

#5 2026-02-25 07:37:56

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,365

Re: [SOLVED] Is this the expected vulkan behavior with PRIME offload?

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#6 2026-02-25 12:48:19

tkoham
Member
Registered: 2026-02-24
Posts: 4

Re: [SOLVED] Is this the expected vulkan behavior with PRIME offload?

done and done!

Offline

Board footer

Powered by FluxBB