scx_loader is a system daemon and DBus-based loader for sched_ext schedulers.
scxctl is the command-line client for interacting with the loader, allowing users to switch schedulers, modes, and arguments dynamically.
Both tools were originally part of the main sched-ext/scx repository and are now developed independently.
- Systemd service:
scx_loader.service - DBus interface for scheduler management (
org.scx.Loader) - CLI client
scxctlfor manual control - Multiple runtime modes (Auto, Gaming, LowLatency, PowerSave, Server)
- Per-scheduler arguments via TOML configuration
- Installable directly from crates.io or buildable from source
cargo install scx_loader
cargo install scxctlThe binaries will be installed in ~/.cargo/bin.
Ensure this directory is in your PATH:
export PATH="$HOME/.cargo/bin:$PATH"Clone and compile the repository:
git clone https://github.com/sched-ext/scx-loader.git
cd scx-loader
# Build optimized binaries
cargo build --releaseThen install them system-wide:
sudo install -Dm755 target/release/scx_loader /usr/bin/
sudo install -Dm755 target/release/scxctl /usr/bin/or
sudo find target/release \
-maxdepth 1 -type f -executable ! -name '*.so' \
-exec install -Dm755 -t /usr/bin/ {} +Make sure you have also installed the necessary configuration files.
sudo install -Dm644 services/scx_loader.service \
-t /usr/lib/systemd/system/
sudo install -Dm644 services/org.scx.Loader.service \
-t /usr/share/dbus-1/system-services/
sudo install -Dm644 configs/org.scx.Loader.conf \
-t /usr/share/dbus-1/system.d/
sudo install -Dm644 configs/scx_loader.toml \
/usr/share/scx_loader/config.tomlAlternatively, you can use xtask to install the required files:
cargo xtask installThe xtask install command respects several environment variables for customizing installation paths, which is useful for packaging by distributions:
VENDOR_PREFIX: Overrides the default/usrprefix for installation paths. (e.g.,/usr/local)VENDOR_DATADIR: Overrides the default/usr/sharefor data files.VENDOR_SYSCONFDIR: Overrides the default/etcfor configuration files.VENDOR_LIBDIR: Overrides the default$VENDOR_PREFIX/libfor library files.
Additionally, the --destdir flag can be used with xtask install to create package:
cargo xtask install --destdir $pkgdirscx_loader reads a TOML configuration file that defines the default scheduler and mode, along with per-scheduler arguments.
Example configuration:
# This field specifies the scheduler that will be started automatically when scx_loader starts (e.g., on boot).
default_sched = "scx_cosmos"
# This field specifies the mode which will be used when scx_loader starts (e.g., on boot).
default_mode = "Auto"
# This "structure" allows configuring flags for each scheduler mode of particular scx scheduler
#[scheds.'scheduler']
#auto_mode = []
#gaming_mode = []
#lowlatency_mode = []
#powersave_mode = []
#server_mode = []scx_loader searches configuration files in the following order:
/etc/scx_loader/config.toml/etc/scx_loader.toml$VENDORDIR/scx_loader/config.toml$VENDORDIR/scx_loader.toml
$VENDORDIRdefaults to/usr/share, but distributions may override it.
This environment variable applies only at build time, so developers or distributions must set it before building.
The package provides a systemd service unit for automatic startup:
sudo systemctl enable --now scx_loader.serviceYou can check its status using:
systemctl status scx_loader.serviceSee: scxctl
📖 Full usage guide available in the CachyOS wiki.
Pull requests and discussions are welcome! Follow Rust coding conventions and include descriptive commit messages. Bug reports and proposals can be submitted in the scx-tools issue tracker.