diff --git a/configuration.nix b/configuration.nix index 478c7bb..7fe1cc6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -54,6 +54,8 @@ "nvidia-x11" "nvidia-settings" + "nvidia-persistenced" + "vscode" "code" "Oracle_VM_VirtualBox_Extension_Pack" diff --git a/surfacebook-configuration.nix b/surfacebook-configuration.nix index ae21dff..04d8a13 100644 --- a/surfacebook-configuration.nix +++ b/surfacebook-configuration.nix @@ -31,6 +31,7 @@ in enable = true; finegrained = true; }; + nvidiaPersistenced = true; prime = { offload = { enable = true; @@ -42,14 +43,8 @@ in }; }; - # disable systemd services - systemd.services = { - nvidia-resume = { - enable = false; - restartIfChanged = false; - }; - }; - - # power tuning - powerManagement.powertop.enable = true; + # preserve video memory after suspend https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend + #boot.extraModprobeConfig = '' + # options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp + #''; }