NVIDIA: Difference between revisions
Artoria2e5 (talk | contribs) |
Artoria2e5 (talk | contribs) No edit summary |
||
Line 23: | Line 23: | ||
Make sure to allow [[Unfree Software|unfree software]]. The unfree NVIDIA packages include <code>nvidia-x11</code>, <code>nvidia-settings</code>, and <code>nvidia-persistenced</code>. | Make sure to allow [[Unfree Software|unfree software]]. The unfree NVIDIA packages include <code>nvidia-x11</code>, <code>nvidia-settings</code>, and <code>nvidia-persistenced</code>. | ||
== Modifying NixOS configuration == | == Modifying NixOS configuration == | ||
Line 98: | Line 78: | ||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
=== Determining the correct driver version === | |||
You might need to determine the appropriate driver version for your card. The following options are available: | |||
<syntaxhighlight lang="nix"> | |||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; | |||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; | |||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production; # (installs 550) | |||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; | |||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470; | |||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_390; | |||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_340; | |||
</syntaxhighlight> | |||
Out of the above, `stable` and `beta` will work for the latest RTX cards and some lower cards so long as they're not considered "legacy" by Nvidia. For "legacy" cards, you can consult the [https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/ Nvidia official legacy driver list] and check whether your device is supported by the 470, 390 or 340 branches. If so, you can use the corresponding <code>legacy_470</code>, <code>legacy_390</code> or <code>legacy_340</code> driver. For a full list of options, consult the [https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix nvidia-x11 module repository]. | |||
{{note|As of early March 2024 the <code>production</code> driver has been updated from <code>535</code> to <code>550</code>. This is a breaking change for some people, especially those on Wayland. | |||
To resolve this, follow the steps under [[Nvidia#Running the new RTX SUPER on NixOS stable|Running the new RTX SUPER on NixOS stable]]}} | |||
Once you've determined the correct driver version, note it down; you'll need it in the next step. | |||
== Laptop configuration: hybrid graphics (Optimus PRIME) == | == Laptop configuration: hybrid graphics (Optimus PRIME) == |