CS2 refuses to launch with discrete graphics card
Your system information
- System information from steam (
Steam->Help->System Information) in a gist: https://gist.github.com/dc03/3f20f941e0e0c4d88e426f490219988e - Have you checked for system updates?: [Yes/No] Yes, everything is up to date.
Please describe your issue in as much detail as possible:
Describe what you expected should happen and what did happen. Please link any large pastes as a Github Gist.
I have a laptop with switchable graphics, with an AMD Renoir iGPU and an NVIDIA GTX 1650 as the discrete GPU (running Pop!_OS 22.04 LTS). The bumblebee service is disabled, though it makes no difference either way.
Expected: Able to launch the game using the discrete GPU when using either "NVIDIA Graphics" or "Hybrid Graphics", using the "Launch using discrete graphics card" option from the Pop!_OS launcher or using optirun/primusrun/pvkrun etc.
Actual:
- On "Hybrid Graphics": Trying to launch the game using optirun/primusrun/pvkrun etc. does nothing, the "STOP" button shows up in steam for a moment or two and then reverts back to "PLAY". Copying the command that steam runs and running it in a console causes no output anywhere. Trying to use the environment variables
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidiato launch the game causes it to skip the discrete GPU and it just uses the iGPU. - On "NVIDIA Graphics": The game launches, but kinda, as it doesn't show up on nvtop and doesn't do anything (just gets stuck showing me a screenshot of the desktop effectively).
Steps for reproducing this issue:
- Acquire a laptop with an AMD iGPU and an NVIDIA dGPU.
- Install Pop!_OS 22.04 LTS.
- Try to launch the game with the discrete GPU.
Hello @dc03, give the workaround at https://github.com/ValveSoftware/csgo-osx-linux/issues/3340#issuecomment-1741781041 a try.
Hello @dc03, give the workaround at #3340 (comment) a try.
Hi, so the command would be something like VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json optirun %command% -vulkan, right? Unfortunately, still no dice.
I suspect it is because nvidia_icd.json does not actually exist:
>> ls /usr/share/vulkan/icd.d
intel_hasvk_icd.i686.json intel_icd.i686.json lvp_icd.i686.json nvidia_icd.disabled_by_nv_vulkan_wrapper radeon_icd.i686.json
intel_hasvk_icd.x86_64.json intel_icd.x86_64.json lvp_icd.x86_64.json nv_vulkan_wrapper.json radeon_icd.x86_64.json
EDIT: Also, using nvidia_icd.disabled_by_nv_vulkan_wrapper and nv_vulkan_wrapper.json does not work either...
For something like nvidia_icd.disabled_by_nv_vulkan_wrapper to exist as a renamed nvidia_icd.json, there's something profoundly wrong with the design of whatever renamed that file. I'm guessing that was done by primus_vk, but I'm not particularly familiar with that software.
Please copy the contents of Steam Runtime Diagnostics from Steam (Steam -> Help -> Steam Runtime Diagnostics) and put it in a gist, then include a link to the gist in this issue report.
For something like
nvidia_icd.disabled_by_nv_vulkan_wrapperto exist as a renamednvidia_icd.json, there's something profoundly wrong with the design of whatever renamed that file. I'm guessing that was done byprimus_vk, but I'm not particularly familiar with that software.Please copy the contents of Steam Runtime Diagnostics from Steam (
Steam->Help->Steam Runtime Diagnostics) and put it in a gist, then include a link to the gist in this issue report.
Here you go: https://gist.github.com/dc03/3e226a66e7e11de8c18c76cf50904e04
Thanks, that helps clarify that bumblebee and/or primus_vk is actively interfering with access to Vulkan on you NVIDIA GPU. This is something to follow up on their side.
Thanks, that helps clarify that bumblebee and/or primus_vk is actively interfering with access to Vulkan on you NVIDIA GPU. This is something to follow up on their side.
Yup, it was primus_vk (as it sets up the file rename as per apt). Uninstalling the following packages fixed the issue:
nvidia-primus-vk-common
nvidia-primus-vk-wrapper
primus-vk
And now the game runs basically perfectly with this:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%
Thanks for helping me out with this!