add option for system76 scheduler and enable on acer
This commit is contained in:
@@ -89,6 +89,7 @@ rec {
|
|||||||
laptop = true;
|
laptop = true;
|
||||||
gaming = true;
|
gaming = true;
|
||||||
enableTailscale = true;
|
enableTailscale = true;
|
||||||
|
system76Scheduler = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.vmVariant = {
|
virtualisation.vmVariant = {
|
||||||
|
|||||||
@@ -21,5 +21,6 @@
|
|||||||
desktop/touchpad.nix
|
desktop/touchpad.nix
|
||||||
desktop/pulseaudio.nix
|
desktop/pulseaudio.nix
|
||||||
desktop/tailscale.nix
|
desktop/tailscale.nix
|
||||||
|
desktop/system76-scheduler.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -1,195 +1,198 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
options.lumpiasty.system76Scheduler = lib.mkEnableOption "Enable system76-scheduler";
|
||||||
|
|
||||||
# Enable system76-scheduler
|
config = lib.mkIf (config.lumpiasty.system76Scheduler) {
|
||||||
# Config basically rewrite of stock, a bit tuned
|
# Enable system76-scheduler
|
||||||
services.system76-scheduler = {
|
# Config basically rewrite of stock, a bit tuned
|
||||||
enable = true;
|
services.system76-scheduler = {
|
||||||
useStockConfig = false;
|
enable = true;
|
||||||
settings = {
|
useStockConfig = false;
|
||||||
processScheduler = {
|
settings = {
|
||||||
pipewireBoost = {
|
processScheduler = {
|
||||||
enable = true;
|
pipewireBoost = {
|
||||||
profile = {
|
enable = true;
|
||||||
nice = -6;
|
profile = {
|
||||||
ioClass = "best-effort";
|
nice = -6;
|
||||||
ioPrio = 0;
|
ioClass = "best-effort";
|
||||||
|
ioPrio = 0;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
foregroundBoost = {
|
||||||
foregroundBoost = {
|
enable = true;
|
||||||
enable = true;
|
foreground = {
|
||||||
foreground = {
|
nice = 0;
|
||||||
nice = 0;
|
ioClass = "best-effort";
|
||||||
ioClass = "best-effort";
|
ioPrio = 0;
|
||||||
ioPrio = 0;
|
};
|
||||||
};
|
background = {
|
||||||
background = {
|
nice = 6;
|
||||||
nice = 6;
|
ioClass = "idle";
|
||||||
ioClass = "idle";
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
assignments = {
|
||||||
|
sound-server = {
|
||||||
|
nice = -15;
|
||||||
|
ioClass = "realtime";
|
||||||
|
ioPrio = 0;
|
||||||
|
matchers = [
|
||||||
|
# original config matches on /usr/bin/..., but this is NixOS
|
||||||
|
"pipewire"
|
||||||
|
"pipewire-pulse"
|
||||||
|
"jackd"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
recording = {
|
||||||
|
nice = -9;
|
||||||
|
ioClass = "best-effort";
|
||||||
|
ioPrio = 0;
|
||||||
|
matchers = [
|
||||||
|
"amsynth"
|
||||||
|
"jamesdsp"
|
||||||
|
"jitsi"
|
||||||
|
"mumble"
|
||||||
|
"obs"
|
||||||
|
"teams"
|
||||||
|
"wireplumber"
|
||||||
|
"zoom"
|
||||||
|
"bitwig-studio"
|
||||||
|
"include name=\"Bitwig*\""
|
||||||
|
];
|
||||||
|
};
|
||||||
|
games = {
|
||||||
|
nice = -5;
|
||||||
|
ioClass = "best-effort";
|
||||||
|
ioPrio = 0;
|
||||||
|
matchers = [
|
||||||
|
"lutris"
|
||||||
|
"steam"
|
||||||
|
"heroic"
|
||||||
|
"itch"
|
||||||
|
"vrcompositor"
|
||||||
|
"vrdashboard"
|
||||||
|
"vrmonitor"
|
||||||
|
"vrserver"
|
||||||
|
"include descends=\"steam\""
|
||||||
|
"include descends=\"lutris\""
|
||||||
|
"include descends=\"heroic\""
|
||||||
|
"include descends=\"itch\""
|
||||||
|
];
|
||||||
|
};
|
||||||
|
desktop-environment = {
|
||||||
|
nice = -3;
|
||||||
|
ioClass = "best-effort";
|
||||||
|
ioPrio = 0;
|
||||||
|
matchers = [
|
||||||
|
"cosmic-comp"
|
||||||
|
"gnome-shell"
|
||||||
|
"i3wm"
|
||||||
|
"kwin"
|
||||||
|
"kwin_wayland"
|
||||||
|
"Xwayland"
|
||||||
|
"sway"
|
||||||
|
"Hyprland"
|
||||||
|
"gamescope"
|
||||||
|
"Xorg"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
session-services = {
|
||||||
|
nice = 9;
|
||||||
|
ioClass = "idle";
|
||||||
|
matchers = [
|
||||||
|
"include parent=\"gnome-session-binary\""
|
||||||
|
"include parent=\"gvfsd\""
|
||||||
|
"include cgroup=\"/user.slice/*.service\" parent=\"systemd\""
|
||||||
|
"include cgroup=\"/user.slice/*/session.slice/*\" parent=\"systemd\""
|
||||||
|
"exclude cgroup=\"/user.slice/*/app.slice/*\""
|
||||||
|
"exclude cgroup=\"/user.slice/*/session.slice/*\""
|
||||||
|
"exclude cgroup=\"/user.slice/*app-dbus*\""
|
||||||
|
];
|
||||||
|
};
|
||||||
|
system-services = {
|
||||||
|
nice = 12;
|
||||||
|
ioClass = "idle";
|
||||||
|
matchers = [
|
||||||
|
"include cgroup=\"/system.slice/*\""
|
||||||
|
];
|
||||||
|
};
|
||||||
|
package-manager = {
|
||||||
|
nice = 15;
|
||||||
|
class = "batch";
|
||||||
|
ioClass = "idle";
|
||||||
|
matchers = [
|
||||||
|
"include name=\"apt-*\""
|
||||||
|
"include name=\"dpkg-*\""
|
||||||
|
"apt"
|
||||||
|
"dpkg"
|
||||||
|
"flatpak"
|
||||||
|
"fwupd"
|
||||||
|
"packagekitd"
|
||||||
|
"update-initramfs"
|
||||||
|
"nix"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
batch = {
|
||||||
|
nice = 19;
|
||||||
|
class = "idle";
|
||||||
|
ioClass = "idle";
|
||||||
|
matchers = [
|
||||||
|
"include name=\"sbuild-*\""
|
||||||
|
"\"7z\""
|
||||||
|
"\"7za\""
|
||||||
|
"\"7zr\""
|
||||||
|
"ar"
|
||||||
|
"boinc"
|
||||||
|
"c++"
|
||||||
|
"cargo"
|
||||||
|
"clang"
|
||||||
|
"cmake"
|
||||||
|
"cpp"
|
||||||
|
"FAHClient"
|
||||||
|
"FAHCoreWrapper"
|
||||||
|
"fossilize-replay"
|
||||||
|
"g++"
|
||||||
|
"gcc"
|
||||||
|
"gradle"
|
||||||
|
"javac"
|
||||||
|
"ld"
|
||||||
|
"lld"
|
||||||
|
"make"
|
||||||
|
"mold"
|
||||||
|
"mvn"
|
||||||
|
"ninja"
|
||||||
|
"rust-analyzer"
|
||||||
|
"rustc"
|
||||||
|
"sbuild"
|
||||||
|
"tar"
|
||||||
|
"tracker-miner-fs-3"
|
||||||
|
"unrar"
|
||||||
|
"zip"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
exceptions = [
|
||||||
|
"include descends=\"chrt\""
|
||||||
|
"include descends=\"gamemoderun\""
|
||||||
|
"include descends=\"ionice\""
|
||||||
|
"include descends=\"nice\""
|
||||||
|
"include descends=\"taskset\""
|
||||||
|
"include descends=\"schedtool\""
|
||||||
|
"chrt"
|
||||||
|
"dbus"
|
||||||
|
"dbus-broker"
|
||||||
|
"gamemoderun"
|
||||||
|
"ionice"
|
||||||
|
"nice"
|
||||||
|
"rtkit-daemon"
|
||||||
|
"systemd"
|
||||||
|
"taskset"
|
||||||
|
"schedtool"
|
||||||
|
"/etc/profiles/per-user/user/bin/easyeffects*"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
assignments = {
|
# Add https://github.com/maxiberta/kwin-system76-scheduler-integration kwin script
|
||||||
sound-server = {
|
|
||||||
nice = -15;
|
|
||||||
ioClass = "realtime";
|
|
||||||
ioPrio = 0;
|
|
||||||
matchers = [
|
|
||||||
# original config matches on /usr/bin/..., but this is NixOS
|
|
||||||
"pipewire"
|
|
||||||
"pipewire-pulse"
|
|
||||||
"jackd"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
recording = {
|
|
||||||
nice = -9;
|
|
||||||
ioClass = "best-effort";
|
|
||||||
ioPrio = 0;
|
|
||||||
matchers = [
|
|
||||||
"amsynth"
|
|
||||||
"jamesdsp"
|
|
||||||
"jitsi"
|
|
||||||
"mumble"
|
|
||||||
"obs"
|
|
||||||
"teams"
|
|
||||||
"wireplumber"
|
|
||||||
"zoom"
|
|
||||||
"bitwig-studio"
|
|
||||||
"include name=\"Bitwig*\""
|
|
||||||
];
|
|
||||||
};
|
|
||||||
games = {
|
|
||||||
nice = -5;
|
|
||||||
ioClass = "best-effort";
|
|
||||||
ioPrio = 0;
|
|
||||||
matchers = [
|
|
||||||
"lutris"
|
|
||||||
"steam"
|
|
||||||
"heroic"
|
|
||||||
"itch"
|
|
||||||
"vrcompositor"
|
|
||||||
"vrdashboard"
|
|
||||||
"vrmonitor"
|
|
||||||
"vrserver"
|
|
||||||
"include descends=\"steam\""
|
|
||||||
"include descends=\"lutris\""
|
|
||||||
"include descends=\"heroic\""
|
|
||||||
"include descends=\"itch\""
|
|
||||||
];
|
|
||||||
};
|
|
||||||
desktop-environment = {
|
|
||||||
nice = -3;
|
|
||||||
ioClass = "best-effort";
|
|
||||||
ioPrio = 0;
|
|
||||||
matchers = [
|
|
||||||
"cosmic-comp"
|
|
||||||
"gnome-shell"
|
|
||||||
"i3wm"
|
|
||||||
"kwin"
|
|
||||||
"kwin_wayland"
|
|
||||||
"Xwayland"
|
|
||||||
"sway"
|
|
||||||
"Hyprland"
|
|
||||||
"gamescope"
|
|
||||||
"Xorg"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
session-services = {
|
|
||||||
nice = 9;
|
|
||||||
ioClass = "idle";
|
|
||||||
matchers = [
|
|
||||||
"include parent=\"gnome-session-binary\""
|
|
||||||
"include parent=\"gvfsd\""
|
|
||||||
"include cgroup=\"/user.slice/*.service\" parent=\"systemd\""
|
|
||||||
"include cgroup=\"/user.slice/*/session.slice/*\" parent=\"systemd\""
|
|
||||||
"exclude cgroup=\"/user.slice/*/app.slice/*\""
|
|
||||||
"exclude cgroup=\"/user.slice/*/session.slice/*\""
|
|
||||||
"exclude cgroup=\"/user.slice/*app-dbus*\""
|
|
||||||
];
|
|
||||||
};
|
|
||||||
system-services = {
|
|
||||||
nice = 12;
|
|
||||||
ioClass = "idle";
|
|
||||||
matchers = [
|
|
||||||
"include cgroup=\"/system.slice/*\""
|
|
||||||
];
|
|
||||||
};
|
|
||||||
package-manager = {
|
|
||||||
nice = 15;
|
|
||||||
class = "batch";
|
|
||||||
ioClass = "idle";
|
|
||||||
matchers = [
|
|
||||||
"include name=\"apt-*\""
|
|
||||||
"include name=\"dpkg-*\""
|
|
||||||
"apt"
|
|
||||||
"dpkg"
|
|
||||||
"flatpak"
|
|
||||||
"fwupd"
|
|
||||||
"packagekitd"
|
|
||||||
"update-initramfs"
|
|
||||||
"nix"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
batch = {
|
|
||||||
nice = 19;
|
|
||||||
class = "idle";
|
|
||||||
ioClass = "idle";
|
|
||||||
matchers = [
|
|
||||||
"include name=\"sbuild-*\""
|
|
||||||
"\"7z\""
|
|
||||||
"\"7za\""
|
|
||||||
"\"7zr\""
|
|
||||||
"ar"
|
|
||||||
"boinc"
|
|
||||||
"c++"
|
|
||||||
"cargo"
|
|
||||||
"clang"
|
|
||||||
"cmake"
|
|
||||||
"cpp"
|
|
||||||
"FAHClient"
|
|
||||||
"FAHCoreWrapper"
|
|
||||||
"fossilize-replay"
|
|
||||||
"g++"
|
|
||||||
"gcc"
|
|
||||||
"gradle"
|
|
||||||
"javac"
|
|
||||||
"ld"
|
|
||||||
"lld"
|
|
||||||
"make"
|
|
||||||
"mold"
|
|
||||||
"mvn"
|
|
||||||
"ninja"
|
|
||||||
"rust-analyzer"
|
|
||||||
"rustc"
|
|
||||||
"sbuild"
|
|
||||||
"tar"
|
|
||||||
"tracker-miner-fs-3"
|
|
||||||
"unrar"
|
|
||||||
"zip"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
exceptions = [
|
|
||||||
"include descends=\"chrt\""
|
|
||||||
"include descends=\"gamemoderun\""
|
|
||||||
"include descends=\"ionice\""
|
|
||||||
"include descends=\"nice\""
|
|
||||||
"include descends=\"taskset\""
|
|
||||||
"include descends=\"schedtool\""
|
|
||||||
"chrt"
|
|
||||||
"dbus"
|
|
||||||
"dbus-broker"
|
|
||||||
"gamemoderun"
|
|
||||||
"ionice"
|
|
||||||
"nice"
|
|
||||||
"rtkit-daemon"
|
|
||||||
"systemd"
|
|
||||||
"taskset"
|
|
||||||
"schedtool"
|
|
||||||
"/etc/profiles/per-user/user/bin/easyeffects*"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
# Add https://github.com/maxiberta/kwin-system76-scheduler-integration kwin script
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user