Yeah, its known that setting up an nvidia card is notoriously hard on linux. I believe Linus T had something nice to say about them. But what you’re looking for does exist and can be setup with a little bit of tinkering.
Personally, I use NixOS, so I just have to add a few lines of code to my nix flake. Here are the directions
Then you just add an environment variable for the applications you want to run. If you don’t use Nix and want to set it up manually, as always the Arch Wiki comes into play. See section 1.3.1.2.
To sum that up, install the nvidia drivers through the package manger, mod probe the kernel, and add some udev rules. You’ll need to add those environment variables again for any application you want to use the gpu.
Edit: I forgot to mention its called Nvidia Prime. If you search the distro of your choice plus that it should help.
My laptop says otherwise lol and because you didnt read the links I put
services.xserver.videoDrivers = [
"amdgpu""nvidia"
];
hardware.nvidia.prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
# Make sure to use the correct Bus ID values for your system!
nvidiaBusId = "PCI:0:2:0";
amdgpuBusId = "PCI:54:0:0";
};
Is all it takes to install Nvidia Prime Offloading on a NixOS machine with AMD iGPU and an Nvidia dGPU.
Nvidia isn’t too bad these days, especially for 20 series and newer since they switched to using the “open-source” driver by default. It’s mainly PRIME that’s the problem (where you have both onboard graphics and a discrete GPU and the system has to switch between them), and the problems aren’t exclusive to Nvidia.
Yeah, its known that setting up an nvidia card is notoriously hard on linux. I believe Linus T had something nice to say about them. But what you’re looking for does exist and can be setup with a little bit of tinkering.
Personally, I use NixOS, so I just have to add a few lines of code to my nix flake. Here are the directions
Then you just add an environment variable for the applications you want to run. If you don’t use Nix and want to set it up manually, as always the Arch Wiki comes into play. See section 1.3.1.2.
To sum that up, install the nvidia drivers through the package manger, mod probe the kernel, and add some udev rules. You’ll need to add those environment variables again for any application you want to use the gpu.
Edit: I forgot to mention its called Nvidia Prime. If you search the distro of your choice plus that it should help.
Nvidia itself is fine, as long as you don’t also have an AMD gpu. My main rig runs a Nvidia card and it’s just fine. I use Arch btw
My laptop says otherwise lol and because you didnt read the links I put
services.xserver.videoDrivers = [ "amdgpu" "nvidia" ]; hardware.nvidia.prime = { offload = { enable = true; enableOffloadCmd = true; }; # Make sure to use the correct Bus ID values for your system! nvidiaBusId = "PCI:0:2:0"; amdgpuBusId = "PCI:54:0:0"; };Is all it takes to install Nvidia Prime Offloading on a NixOS machine with AMD iGPU and an Nvidia dGPU.
Nvidia isn’t too bad these days, especially for 20 series and newer since they switched to using the “open-source” driver by default. It’s mainly PRIME that’s the problem (where you have both onboard graphics and a discrete GPU and the system has to switch between them), and the problems aren’t exclusive to Nvidia.