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 = {
614615 } ;
615616 in
616617 lib . mkMerge [
617- ( lib . mkIf cfg . powerManagement . enable {
618+ ( lib . mkIf ( cfg . powerManagement . enable && ! kernelSuspendNotifier ) {
618619 nvidia-suspend = nvidiaService "suspend" ;
619620 nvidia-hibernate = nvidiaService "hibernate" ;
620621 nvidia-resume = ( nvidiaService "resume" ) // {
681682 // lib . optionalAttrs (
682683 ( offloadCfg . enable || cfg . modesetting . enable ) && lib . versionAtLeast nvidia_x11 . version "545"
683684 ) { nvidia-drm . fbdev = 1 ; }
685+ // lib . optionalAttrs ( cfg . powerManagement . enable && kernelSuspendNotifier ) {
686+ nvidia . NVreg_UseKernelSuspendNotifiers = 1 ;
687+ }
684688 // lib . optionalAttrs cfg . powerManagement . enable { nvidia . NVreg_PreserveVideoMemoryAllocations = 1 ; }
685689 // lib . optionalAttrs useOpenModules { nvidia . NVreg_OpenRmEnableUnsupportedGpus = 1 ; }
686690 // lib . optionalAttrs cfg . powerManagement . finegrained {
You can’t perform that action at this time.
0 commit comments