File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
nixos/modules/hardware/video Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2020 busIDType = lib . types . strMatching "([[:print:]]+:[0-9]{1,3}(@[0-9]{1,10})?:[0-9]{1,2}:[0-9])?" ;
2121 ibtSupport = useOpenModules || ( nvidia_x11 . ibtSupport or false ) ;
2222 settingsFormat = pkgs . formats . keyValue { } ;
23+ kernelSuspendNotifier = useOpenModules && lib . versionAtLeast nvidia_x11 . version "595" ;
2324in
2425{
2526 options = {
620621 } ;
621622 in
622623 lib . mkMerge [
623- ( lib . mkIf cfg . powerManagement . enable {
624+ ( lib . mkIf ( cfg . powerManagement . enable && ! kernelSuspendNotifier ) {
624625 nvidia-suspend = nvidiaService "suspend" ;
625626 nvidia-hibernate = nvidiaService "hibernate" ;
626627 nvidia-resume = ( nvidiaService "resume" ) // {
687688 // lib . optionalAttrs (
688689 ( offloadCfg . enable || cfg . modesetting . enable ) && lib . versionAtLeast nvidia_x11 . version "545"
689690 ) { nvidia-drm . fbdev = 1 ; }
691+ // lib . optionalAttrs ( cfg . powerManagement . enable && kernelSuspendNotifier ) {
692+ nvidia . NVreg_UseKernelSuspendNotifiers = 1 ;
693+ }
690694 // lib . optionalAttrs cfg . powerManagement . enable { nvidia . NVreg_PreserveVideoMemoryAllocations = 1 ; }
691695 // lib . optionalAttrs useOpenModules { nvidia . NVreg_OpenRmEnableUnsupportedGpus = 1 ; }
692696 // lib . optionalAttrs cfg . powerManagement . finegrained {
You can’t perform that action at this time.
0 commit comments