stable x11 config

This commit is contained in:
2024-12-09 22:25:47 +01:00
parent 72cac1e8c6
commit f7823d9ad3
4 changed files with 60 additions and 39 deletions

View File

@@ -17,9 +17,9 @@ in
# Enable NVIDIA driver for X11 and Wayland
# without modesetting, x server will be run by nvidia
services.xserver.videoDrivers = [
services.xserver.videoDrivers = [
"amdgpu"
# "modesetting"
#"modesetting"
"nvidia"
];
@@ -29,6 +29,11 @@ in
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
hardware.graphics.enable32Bit = true; # For 32 bit applications
# Enable Switcheroo
services.switcherooControl.enable = true;
# Use Beta Driver Package
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
@@ -39,20 +44,19 @@ in
# Enable required Kernel Modules
boot.initrd.kernelModules = [
"amdgpu"
# "modesetting"
# "nvidia"
# "nvidia-drm"
# "nvidiafb"
# # "nvidia-uvm"
# "nvidia-modeset"
# "i2c-nvidia_gpu"
"nvidia"
# # "nvidia-drm"
# # "nvidiafb"
# # # "nvidia-uvm"
# # "nvidia-modeset"
# # "i2c-nvidia_gpu"
];
boot.kernelParams = [
# "amdgpu.modeset=1"
# "nvidia-drm.fbdev=1"
# "nvidia-drm.modeset=0"
# "nvidia-drm.modeset=1"
# # "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
"amd_iommu=on"
# "vfio-pci.ids=\"10de:2489,10de:228b\""
@@ -83,7 +87,7 @@ in
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
@@ -111,7 +115,7 @@ in
package = config.boot.kernelPackages.nvidiaPackages.beta;
# package = config.boot.kernelPackages.nvidiaPackages.none;
# package = config.boot.kernelPackages.nvidiaPackages.production;
nvidiaPersistenced = true;
forceFullCompositionPipeline = false;
prime = {
@@ -123,12 +127,11 @@ in
# reverseSync.enable = false;
# Make sure to use the correct Bus ID values for your system!
# intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:01:0:0";
nvidiaBusId = "PCI:1:0:0";
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
};
};
# Add user to extra groups
users.users.andreas = {
extraGroups = [ "video" "render" ];