can't get clock offset to run in service/i3
This commit is contained in:
@@ -351,7 +351,7 @@ exec_always --no-startup-id sleep 5 && pactl list short sources | grep 'alsa_inp
|
|||||||
exec --no-startup-id /usr/bin/env dunst
|
exec --no-startup-id /usr/bin/env dunst
|
||||||
# alternative if you installed aside with XFCE4:
|
# alternative if you installed aside with XFCE4:
|
||||||
# exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd &
|
# exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd &
|
||||||
exec --no-startup-id nvidia-settings -a "[gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=230"
|
exec --no-startup-id sleep 5 && nvidia-settings -a "[gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=230"
|
||||||
|
|
||||||
# autotiling script
|
# autotiling script
|
||||||
# https://github.com/nwg-piotr/autotiling
|
# https://github.com/nwg-piotr/autotiling
|
||||||
|
|||||||
@@ -116,24 +116,27 @@ in {
|
|||||||
};
|
};
|
||||||
systemd.services.nvidiaSetClocks = lib.mkIf cfg.clock.enable {
|
systemd.services.nvidiaSetClocks = lib.mkIf cfg.clock.enable {
|
||||||
description = "Set GPU clocks";
|
description = "Set GPU clocks";
|
||||||
script = ''/run/current-system/sw/bin/nvidia-smi -i 0 -lgc ${toString cfg.clock.min},${toString cfg.clock.max}'';
|
script =
|
||||||
|
"/run/current-system/sw/bin/nvidia-smi -pm 1 && /run/current-system/sw/bin/nvidia-smi -i 0 -lgc ${
|
||||||
|
toString cfg.clock.min
|
||||||
|
},${toString cfg.clock.max}";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "display-manager.service" ];
|
after = [ "display-manager.service" ];
|
||||||
requires = [ "display-manager.service" ];
|
requires = [ "display-manager.service" ];
|
||||||
environment.DISPLAY = ":0";
|
environment.DISPLAY = ":0";
|
||||||
environment.XAUTHORITY = "/home/kopatz/.Xauthority";
|
environment.XAUTHORITY = "/home/kopatz/.Xauthority";
|
||||||
};
|
};
|
||||||
systemd.user.services.nvidiaSetOffset = lib.mkIf cfg.clock.enable {
|
# doesn't work
|
||||||
description = "Sets gpu offset";
|
#systemd.user.services.nvidiaSetOffset = lib.mkIf cfg.clock.enable {
|
||||||
enable = true;
|
# description = "Sets gpu offset";
|
||||||
serviceConfig = { Type = "oneshot"; };
|
# enable = true;
|
||||||
script = ''
|
# serviceConfig = { Type = "oneshot"; };
|
||||||
${config.hardware.nvidia.package.settings}/bin/nvidia-settings -a "[gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=${
|
# script = ''
|
||||||
toString cfg.clock.offset
|
# ${config.hardware.nvidia.package.settings}/bin/nvidia-settings -a "[gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=${
|
||||||
}"'';
|
# toString cfg.clock.offset
|
||||||
environment = { DISPLAY = ":0"; };
|
# }"'';
|
||||||
after = [ "xdg-desktop-autostart.target" ];
|
# environment = { DISPLAY = ":0"; };
|
||||||
wantedBy = [ "default.target" ];
|
# after = [ "graphical-session.target" ];
|
||||||
};
|
#};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user