Skip to content

Graphics (GPU)

Marchyo supports Intel, AMD, and NVIDIA GPUs, including hybrid graphics configurations with NVIDIA PRIME.

Specify which GPU vendors are present in your system:

marchyo.graphics.vendors = [ "intel" ];

For hybrid graphics laptops with two GPUs:

marchyo.graphics.vendors = [ "intel" "nvidia" ];
Vendor Description
"intel" Intel integrated graphics (iGPU)
"amd" AMD GPUs (integrated or discrete)
"nvidia" NVIDIA discrete GPUs

When vendors is empty (default), Intel packages are applied on x86_64 for backward compatibility. If vendors is left empty while marchyo.desktop.enable = true, evaluation emits a warning telling you to set vendors explicitly (e.g. ["nvidia"] or ["amd"]).

Option Type Default Description
marchyo.graphics.nvidia.open bool true Use open-source kernel modules (recommended for RTX 20xx+, required for RTX 50xx)
marchyo.graphics.nvidia.powerManagement bool false Experimental power management (may improve laptop battery life)
marchyo.graphics.nvidia = {
open = true;
powerManagement = false;
};

For laptops with both an integrated GPU and a discrete NVIDIA GPU:

marchyo.graphics = {
vendors = [ "intel" "nvidia" ];
prime = {
enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
mode = "offload";
};
};

Run lspci | grep -E 'VGA|3D' and convert hex bus IDs to the PCI:bus:device:function format (convert hex values to decimal).

Option Type Default Description
marchyo.graphics.prime.enable bool false Enable NVIDIA PRIME
marchyo.graphics.prime.intelBusId string "" PCI bus ID of Intel iGPU
marchyo.graphics.prime.amdgpuBusId string "" PCI bus ID of AMD iGPU
marchyo.graphics.prime.nvidiaBusId string "" PCI bus ID of NVIDIA dGPU
marchyo.graphics.prime.mode string "offload" PRIME render mode
Mode Description
"offload" On-demand rendering (default). Power efficient — use nvidia-offload <command> to run apps on the discrete GPU.
"sync" Always use discrete GPU. Best performance but more power consumption.
"reverse-sync" iGPU for display, dGPU for compute.

Enabling PRIME is validated with assertions — the build fails with a clear message if any of these are not met:

  • vendors must contain "nvidia" and an iGPU vendor ("intel" or "amd")
  • prime.nvidiaBusId must be set
  • prime.intelBusId must be set when "intel" is in vendors
  • prime.amdgpuBusId must be set when "amd" is the iGPU (i.e. "amd" in vendors without "intel")
marchyo.graphics.vendors = [ "intel" ];
marchyo.graphics.vendors = [ "amd" ];
marchyo.graphics = {
vendors = [ "nvidia" ];
nvidia.open = true;
};
marchyo.graphics = {
vendors = [ "intel" "nvidia" ];
nvidia.open = true;
prime = {
enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
mode = "offload";
};
};
marchyo.graphics = {
vendors = [ "amd" "nvidia" ];
nvidia.open = true;
prime = {
enable = true;
amdgpuBusId = "PCI:6:0:0";
nvidiaBusId = "PCI:1:0:0";
mode = "sync";
};
};