Nvidia gfx OR apu gfx

Hi everybody. My laptop has an amd apu + an nvidia card. I currently have 2 partitions, one with nvidia drivers and software, and one where nvidia is blacklisted as most of the time the apu is enough and my laptop runs much cooler (and much more stable.)

I wanted to ask, is there a better solution so that I can use a single partition, and completely disable or enable nvidia on demand (along with its bloated drivers) without affecting the rest of my system?

I’ve heard about envycontrol but I’m not sure if it’s what I’m looking for.

The NVIDIA Optimus article contains lots of options you might review for switching between iGPU and dGPU, including EnvyConrol that you mentioned.

The article claims that PRIME Render Offload is the method officially supported by Nvidia.

1 Like

The standard approach is prime render offload.

The default configuration for this stuff on arch and arch based distros is honestly an embarrassment so it’s not strange you got confused about it,

There’s a prime-run package to run things on the nvidia gpu, for instance you can do prime-run game to run the game on the nvidia gpu instead of ur igpu. This package should be installed as part of ur nvidia drivers if u install them the normal way on endeavouros (have them installed during installation, or use nvidia-inst)

However, the default configuration, at least on arch, is for prime-run only to work for opengl applications.I think it’s because honestly the person who made it made it before the days of vulkan and that it’s never been updated lol.

So the default configuration is that opengl games/apps run on the igpu, and u use prime-run to run it on the nvidia gpu, and vulkan games/apps always run on the nvidia-gpu, and manual reconfiguration of system variables is required to change that, as well as manual editing of the prime-run script to account for vulkan as well.

It’s honestly laughable that nothing has been done about this for many many years, it’s almost as if there isn’t a single arch dev on arch or any arch-based distros with a hybrid graphics laptop :rofl:

But, if you want to use vulkan by default on ur apu, this is how I do it:

In ~/.profile or something to that effect (this variable needs to be set by default for your user or system, i’m not sure how to do it systemwide, but .profile or .bash_profile should be able to get it done on a per-user basis), put

export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.i686.json #Run Vulkan on AMD

You can test it using a combination of mangohud and vkcube

Confirming that it is running on ur amd gpu.

Then you ened to edit the /usr/bin/prime-run script like this

#!/bin/bash
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"

To use nvidia for vulkan again. then test with prime-run mangohud vkcube

You can do the same test with mangohud and glxgears to test opengl behavior.

And with that setup, by default your pc will use the igpu for just about everything, and if you use prime-run it’ll use the nvidia gpu instead.

1 Like

Thank you

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.