whatever, still sorta works

This commit is contained in:
Andreas Schaafsma 2024-12-09 23:35:27 +01:00
parent f7823d9ad3
commit 4454eb84fb

View File

@ -18,9 +18,13 @@ in
# Enable NVIDIA driver for X11 and Wayland # Enable NVIDIA driver for X11 and Wayland
# without modesetting, x server will be run by nvidia # without modesetting, x server will be run by nvidia
services.xserver.videoDrivers = [ services.xserver.videoDrivers = [
"nvidia"
# "nvidia-drm"
# "nvidia-uvm"
# "nvidia-modeset"
# "nvidiafb"
"amdgpu" "amdgpu"
# "modesetting" # "modesetting"
"nvidia"
]; ];
# Enable OpenGL # Enable OpenGL
@ -43,12 +47,12 @@ in
# Enable required Kernel Modules # Enable required Kernel Modules
boot.initrd.kernelModules = [ boot.initrd.kernelModules = [
"amdgpu"
"nvidia" "nvidia"
# # "nvidia-drm" "nvidia-drm"
# # "nvidiafb" "nvidia-uvm"
# # # "nvidia-uvm" "nvidia-modeset"
# # "nvidia-modeset" "nvidiafb"
"amdgpu"
# # "i2c-nvidia_gpu" # # "i2c-nvidia_gpu"
]; ];
@ -83,6 +87,37 @@ in
# options nouveau modeset=0 # options nouveau modeset=0
# ''; # '';
# services.xserver.config = lib.mkForce ''
# Section "ServerLayout"
# Identifier "layout"
# Screen 0 "amdgpu"
# Inactive "nvidia"
# Option "AllowNVIDIAGPUScreens"
# EndSection
# Section "Device"
# Identifier "nvidia"
# Driver "nvidia"
# BusID "PCI:01:0:0"
# EndSection
# Section "Screen"
# Identifier "nvidia"
# Device "nvidia"
# EndSection
# Section "Device"
# Identifier "amdgpu"
# Driver "amdgpu"
# BusID "PCI:50:0:0"
# EndSection
# Section "Screen"
# Identifier "amdgpu"
# Device "amdgpu"
# EndSection
# '';
# Configure NVIDIA driver # Configure NVIDIA driver
hardware.nvidia = { hardware.nvidia = {
# Modesetting is required. # Modesetting is required.
@ -116,7 +151,7 @@ in
# package = config.boot.kernelPackages.nvidiaPackages.none; # package = config.boot.kernelPackages.nvidiaPackages.none;
# package = config.boot.kernelPackages.nvidiaPackages.production; # package = config.boot.kernelPackages.nvidiaPackages.production;
nvidiaPersistenced = true; nvidiaPersistenced = true;
forceFullCompositionPipeline = false; forceFullCompositionPipeline = true;
prime = { prime = {
offload = { offload = {