From b3f30401748c2ca3ab4fa4f9162f2ae63b06a416 Mon Sep 17 00:00:00 2001 From: Syed Daanish Date: Thu, 9 Jul 2026 23:32:00 +0100 Subject: [PATCH] Change nvidia version to make hibernation work --- modules/workstation/graphics.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/workstation/graphics.nix b/modules/workstation/graphics.nix index b8f6b4b..926bc8c 100644 --- a/modules/workstation/graphics.nix +++ b/modules/workstation/graphics.nix @@ -1,23 +1,27 @@ -{ config, ... }: +{ config, pkgs, ... }: { - boot.blacklistedKernelModules = [ - "nouveau" - ]; + boot.blacklistedKernelModules = [ "nouveau" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; + # This version is being hardcoded here so that we dont follow nixos-unstable if it updates beyond what the nvidia driver supports. + boot.kernelPackages = pkgs.linuxPackages_6_18; boot.kernelParams = [ "mem_sleep_default=deep" "video=efifb:1920x1080" - "nvidia.NVreg_TemporaryFilePath=/var/tmp" ]; - hardware.graphics.enable = true; + hardware.graphics = { + enable = true; + enable32Bit = true; + }; hardware.nvidia = { modesetting.enable = true; powerManagement.enable = true; + # This nvidia version is used as any version later than this fail to suspend by hanging the system. + # This seems to stem from certain hardware issues with my msi laptop motherboard. + package = config.boot.kernelPackages.nvidiaPackages.legacy_580; open = true; prime = { offload = {