Currently, only release 26.04 and newer are supported. If you're using an earlier release, upgrade to the latest release (26.04) using the command below:
$ sudo do-release-upgrade
$ sudo apt install -y build-essential cmake cargo rustc clang llvm pkg-config libelf-dev protobuf-compiler libbpf-dev pahole
$ git clone https://github.com/sched-ext/scx.git
$ cd scx
$ cargo build --release
$ ls -d scheds/rust/scx_* | xargs -I{} cargo install --path {}
sudo pacman -S scx-scheds
Devario provides
scx-scheds-git and scx-tools-git built from main, in two repositories
(enable only one):
devario-scx– upstreammainwithout experimental backports.devario-scx-dev– additionally carries scheduler backports not yet merged upstream; may regress, intended for testers.
Import and locally sign the signing key, with pacman-key:
sudo pacman-key --recv-keys BB62CD2725FD8E25558F900A84F94F672976872C --keyserver hkps://keyserver.ubuntu.com
sudo pacman-key --lsign-key BB62CD2725FD8E25558F900A84F94F672976872C
or with Shelly:
shelly keyring recv BB62CD2725FD8E25558F900A84F94F672976872C --keyserver hkps://keyserver.ubuntu.com
shelly keyring lsign BB62CD2725FD8E25558F900A84F94F672976872C
Add one of the repositories to /etc/pacman.conf:
# Upstream-based
[devario-scx]
SigLevel = Required DatabaseOptional
Server = https://mirrors.seafoam-labs.org/devario-scx/$arch# Experimental backports
[devario-scx-dev]
SigLevel = Required DatabaseOptional
Server = https://mirrors.seafoam-labs.org/devario-scx-dev/$archThen install:
sudo pacman -Syu scx-scheds-git scx-tools-git
Note that main is a development branch, not a stable release.
In addition to the packages from the previous step, install the following.
$ sudo pacman -Sy cargo bpf pahole
Make sure you build the kernel with the right configuration, installation should be easy (pahole is required for BTF):
emerge sys-kernel/scx dev-util/pahole
The kernel config used for CI can be used as a reference for required configs. See kernel.config for reference.
There are multiple ways to install scx_scheds on Fedora. The simplest way is to use the schedulers COPR package, which is maintained by the CachyOS community.
$ sudo dnf copr enable bieszczaders/kernel-cachyos-addons
$ sudo dnf install scx-schedsAlternatively, we also provide a -git package that is synced daily to match the upstream repository.
No additional steps needed here other than what is mentioned in the main README.md.
From 26.11 users needs to migrate it to scx-loader instead. Using a kernel of version 6.12+ or later is required.
{
services.scx-loader.enable = true;
# see other options: https://github.com/sched-ext/scx/blob/main/scheds/README.md
services.scx-loader.config.default_sched = "scx_bpfland";
boot.kernelPackages = pkgs.linuxPackages_latest;
}Then rebuild and reboot your system. You can check if the scheduler is running by:
systemctl status scx.serviceThe scx package is included in openSUSE Factory and can be installed directly from Tumbleweed.
All schedulers are provided in the scx package
Example:
$ sudo zypper install scx
$ sudo scx_rustyNo additional steps needed here other than what is mentioned in the main README.md.
A package must deliver these together, since each depends on the others:
scxcliat/usr/bin/scxcli, the path the polkit policy names;services/catalog.jsonas/usr/share/scx/catalog.json;tools/scxcli/org.sched_ext.scxcli.policyas/usr/share/polkit-1/actions/org.sched_ext.scxcli.policy;scxtui, with a runtime dependency on the package that shipsscxcli(it exits at startup whenscxcliis missing).
By hand:
cargo build --release -p scxcli -p scxtui
install -Dm755 target/release/scxcli /usr/bin/scxcli
install -Dm755 target/release/scxtui /usr/bin/scxtui
install -Dm644 services/catalog.json /usr/share/scx/catalog.json
install -Dm644 tools/scxcli/org.sched_ext.scxcli.policy \
/usr/share/polkit-1/actions/org.sched_ext.scxcli.policy
Or, for the data files, xtask install. It puts scx.service,
/etc/default/scx, /usr/share/scx/catalog.json and the polkit policy
in place and nothing else: it installs no binaries (the package does
that; note that cargo install scxcli on its own lands in
~/.cargo/bin, not at the /usr/bin/scxcli the policy names), does
not build, does not call systemctl,
and on a live system leaves an existing /etc/default/scx alone. The
paths are the ones the tools are built with and do not move; only the
unit directory and the polkit actions directory can be set, since those
differ between distributions. The policy is installed as shipped, after
a check that every action in it names /usr/bin/scxcli.
Build xtask once, then install from the built binary with
--source-dir, so the install step neither compiles nor runs cargo
(cargo xtask … is cargo run, which would build on demand, and
without --source-dir xtask asks cargo metadata --no-deps for the
checkout, which sudo may not find on its PATH):
cargo build --release -p xtask
sudo target/release/xtask install --source-dir .
For a package build, stage into DESTDIR and let the package manager
own the files:
# build()
cargo build --release -p xtask -p scxcli -p scxtui
# package()
target/release/xtask install --source-dir . --destdir "$pkgdir"
install -Dm755 target/release/scxcli "$pkgdir/usr/bin/scxcli"
install -Dm755 target/release/scxtui "$pkgdir/usr/bin/scxtui"
--unitdir (default /usr/lib/systemd/system) and --polkitdir
(default /usr/share/polkit-1/actions) set the two directories that
vary. Directories the install creates are 0755 whatever the umask;
directories that exist keep their mode.
See services/CATALOG.md for the contract.