From 44882560395ceedb1651868d30fc27324ef905a1 Mon Sep 17 00:00:00 2001 From: luochen570 <1160510664@qq.com> Date: Mon, 2 Mar 2026 16:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=09modified:=20=20=20hosts/desktop/configuratio?= =?UTF-8?q?n.nix=20=09modified:=20=20=20hosts/desktop/hardware-configurati?= =?UTF-8?q?on.nix=20=09modified:=20=20=20modules/drivers/nvidia.nix=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B9=B6=E6=95=B4=E7=90=86=E4=BA=86desktop?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/desktop/configuration.nix | 2 +- hosts/desktop/hardware-configuration.nix | 34 ------------------------ modules/drivers/nvidia.nix | 2 ++ 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 1ed8107..a330f85 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -12,7 +12,7 @@ # Enable CUPS to print documents. - services.printing.enable = true; + # services.printing.enable = true; # Enable sound with pipewire. services.pulseaudio.enable = false; diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index 6724971..e159054 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -37,39 +37,5 @@ hardware.graphics = { enable = true; }; - - # Load nvidia driver for Xorg and Wayland - services.xserver.videoDrivers = ["nvidia"]; - - 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 - # of just the bare essentials. - powerManagement.enable = false; - - # Fine-grained power management. Turns off GPU when not in use. - # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = false; - - # Use the NVidia open source kernel module (not to be confused with the - # independent third-party "nouveau" open source driver). - # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: - # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus - # Only available from driver 515.43.04+ - open = true; - - # Enable the Nvidia settings menu, - # accessible via `nvidia-settings`. - nvidiaSettings = true; - - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; } diff --git a/modules/drivers/nvidia.nix b/modules/drivers/nvidia.nix index 0d16e30..918ba76 100644 --- a/modules/drivers/nvidia.nix +++ b/modules/drivers/nvidia.nix @@ -7,6 +7,8 @@ modesetting.enable = true; open = true; nvidiaSettings = true; + powerManagement.enable = false; + powerManagement.finegrained = false package = config.boot.kernelPackages.nvidiaPackages.latest; };