feat(hosts/orion): enable Nvidia GPU w/ PRIME

This commit is contained in:
Price Hiller 2024-08-11 14:51:55 -05:00
parent b2b5099d76
commit 3e7ea0bf7b
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB
2 changed files with 29 additions and 36 deletions

View File

@ -28,13 +28,5 @@
]; ];
}; };
}; };
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver
libvdpau
];
};
services.spice-vdagentd.enable = true; services.spice-vdagentd.enable = true;
} }

View File

@ -1,30 +1,31 @@
{ pkgs, config, ... }:
{ {
inputs, services.xserver.videoDrivers = [ "nvidia" ];
lib, environment.variables.VDPAU_DRIVER = "va_gl";
pkgs, hardware = {
... enableRedistributableFirmware = true;
}: graphics = {
enable = true;
{ extraPackages = with pkgs; [
# NOTE: Disable Nvidia GPU vpl-gpu-rt
boot.extraModprobeConfig = '' intel-media-driver
blacklist nouveau intel-vaapi-driver
options nouveau iwlwifi power_save=1 modeset=0 libvdpau-va-gl
''; nvidia-vaapi-driver
services.udev.extraRules = '' ];
# Remove NVIDIA USB xHCI Host Controller devices, if present extraPackages32 = with pkgs.driversi686Linux; [ intel-vaapi-driver ];
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1" };
# Remove NVIDIA USB Type-C UCSI devices, if present nvidia = {
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1" package = config.boot.kernelPackages.nvidiaPackages.beta;
# Remove NVIDIA Audio devices, if present powerManagement.enable = true;
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1" prime = {
# Remove NVIDIA VGA/3D controller devices offload = {
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1" enable = true;
''; enableOffloadCmd = true;
boot.blacklistedKernelModules = [ };
"nouveau" nvidiaBusId = "PCI:1:0:0";
"nvidia" intelBusId = "PCI:0:2:0";
"nvidia_drm" };
"nvidia_modeset" };
]; };
} }