CPU schedulers with sched_ext
sched_ext lets you run alternative CPU schedulers on Linux. A CPU scheduler decides how processor time is shared between applications. Different schedulers can change how your system responds under load.
This guide covers running sched_ext schedulers on Devario using packages from
the Devario repositories: how to install them, choose a scheduler with the
scxtui terminal interface or the scxcli command-line tool, and check what is
running. Service configuration and custom profiles are covered in
Advanced usage.
Install the tools
Section titled “Install the tools”Choose a package
Section titled “Choose a package”Prefer scx-scheds, the release package, for everyday use when it provides
the tools you need. scx-scheds-git follows development rather than a
release. It is not the stable version, and updates can introduce regressions.
Choose one package, not both.
The switching instructions below need scxcli, scxtui and scx.service.
The Devario scx repositories currently publish these in scx-scheds-git;
they do not publish a separate scx-scheds release package. The Git package
also declares that it provides scx-scheds, but that does not make it a stable
release. Check the package listing
before installing.
On Arch, the release package is available from the distribution repositories. Older releases do not include this switching interface, so their setup instructions differ.
Install sched_ext from Devario repos
Section titled “Install sched_ext from Devario repos”-
Choose one scx repository. Follow its setup page for the signing key, repository configuration and synchronization commands. Do not enable both.
- devario-scx: upstream
main, without extra scheduler backports. Use this if you do not need to test backports. - devario-scx-dev:
adds scheduler backports not yet merged upstream. Also offers
linux-devario-dev. Use this for testing.
Neither repository is a stable release channel. Both contain Git builds. On Devario, use Shelly and
/etc/shelly.conf; see native repository configuration. The pacman instructions are for an Arch-based installation using pacman. - devario-scx: upstream
-
Update your system and install
scx-scheds-git.Terminal window shelly upgrade standardshelly install standard scx-scheds-git polkitTerminal window sudo pacman -Syu scx-scheds-git polkitOn Arch-based systems, this package conflicts with
scx-scheds. Review the replacement prompt before proceeding.The package includes the schedulers,
scxcli,scxtui, thescxtopmonitor, and the service and policy files they use. You do not needscx-tools-gitfor this guide.polkitsuppliespkexec, which the tools need for switching as a normal user. It may already be installed with your desktop. -
Check your running kernel and the tools.
Terminal window test -d /sys/kernel/sched_ext && echo "sched_ext available"scxcli getThe first command should print
sched_ext available. If it does not, boot a kernel with sched_ext support, such as a Devario kernel, before continuing.state: default (kernel scheduler)is normal when no scx scheduler is running.
If you want the release package on Arch instead, use the distribution repositories, without adding a Devario scx repository:
sudo pacman -Syu scx-schedsCheck that your installed release includes scxcli and scxtui before
following the switching steps below. If it does not, use the setup documented
for that release, or choose the Git build if you want to test the newer tools.
Switch schedulers
Section titled “Switch schedulers”Use scxtui
Section titled “Use scxtui”Open a terminal as your normal desktop user and run:
scxtui- Use ↑ / ↓ to choose an entry in the recommended list.
- Press Enter to start it, or to switch from the scheduler already running.
- Check the status panel to confirm the scheduler is running.
- Press q to close the menu. The scheduler keeps running.
Your selection also starts at boot.
Switching normally needs no password in an active local session with pkexec
and the packaged polkit policy. Remote sessions and local administrator policies
can require authentication.
| Task | In scxtui |
|---|---|
| Return to the kernel scheduler and keep that choice after reboot | Select Default, then press Enter. |
| Pause the selected scheduler without forgetting it | Press s. It can start again at the next boot. |
| Resume a paused scheduler | Select its entry and press Enter. |
| Browse more installed schedulers | Press A to toggle the full list. |
| Read the service log | Press l, then q to return. |
| Refresh the display | Press R. |
Default and stop are different: Default disables the scx service; stopping it keeps the selected scheduler and its boot setting.
Use the command line
Section titled “Use the command line”List the recommended entries and check what is running:
scxcli listscxcli getStart a scheduler by the ID shown in the list. For example:
pkexec scxcli start scx_lavdscxcli getTo switch, run start again with another listed ID. The new selection takes
effect immediately and persists after reboot. To pause that selection and
resume it later:
pkexec scxcli stoppkexec scxcli startTo return to the kernel scheduler and disable scx at boot instead:
pkexec scxcli start defaultDefault clears the saved selection. To use scx again afterwards, choose an
entry with start ID. Running start without an ID cannot restore a cleared
selection.
Read-only commands do not need pkexec. Commands that change the scheduler
need root privileges; pkexec applies the installed polkit policy.
Which scheduler should I try?
Section titled “Which scheduler should I try?”You can keep Default if your system already behaves well. A different scheduler is not automatically faster, and one unsuited to your workload can perform worse.
Start with the descriptions in scxtui or scxcli list:
| Entry | What it is intended for |
|---|---|
| Default | The kernel’s built-in scheduler; also your baseline for comparison. |
Cosmos (scx_cosmos) |
Keeping the system responsive under load. |
LAVD (scx_lavd) |
Prioritizing tasks that need a quick response. |
EEVDF (scx_eevdf) |
Trying newer kernel scheduler updates without upgrading the kernel. |
Cake (scx_cake) |
Gaming responsiveness. |
Availability and recommendations depend on your installed build and catalog. Use the installed list rather than assuming every entry above is present.
Change one thing at a time and compare the same game, application or workload against Default. Keep the option that works better on your hardware. The full list marks featured, stable, experimental, and not in the catalog entries; these labels are guidance, not a promise of better performance.
Advanced usage
Section titled “Advanced usage”For custom options, service configuration or troubleshooting. You do not need these steps to switch schedulers.
Service and configuration
Section titled “Service and configuration”sched_ext runs a CPU scheduler as a BPF program. The running kernel must have
CONFIG_SCHED_CLASS_EXT=y; /sys/kernel/sched_ext exposes its state. Only one
scx scheduler can be attached at a time. When it exits, the kernel returns to
its own scheduler.
scxtui delegates changes to scxcli, which configures scx.service.
This path does not use a separate daemon or D-Bus. The optional scx_loader
is a different manager, not a dependency.
The persistent selection is in /etc/default/scx, for example:
SCX_SCHEDULER=/usr/bin/scx_lavdSCX_FLAGS=""scxcli manages these two keys and preserves other lines. Prefer switching
through scxtui or scxcli; hand-written flags may not be accepted by the
password-free resume command. The package preserves this configuration during
upgrades.
Useful read-only diagnostics:
scxcli getsystemctl status scx.servicejournalctl -u scx.service -b 0In scxcli get, state reflects the kernel, running describes the
service process, and configured describes what the next start would run.
They can differ after a manual edit, failed start or scheduler launched outside
the service. scxcli get --json exposes the status for scripts.
Custom options and profiles
Section titled “Custom options and profiles”start ID uses the defaults or an administrator-approved catalog profile.
Use run to supply your own scheduler options; it requires administrator
authentication. For example:
pkexec scxcli run scx_lavd --performancerun also saves the configuration and enables the service at boot; it is not
a temporary test. Restore a listed entry with start ID when you finish testing.
Run scx_lavd --help to check the options supported by your installed version.
To make custom options selectable through scxtui, an administrator can add
a named profile to the catalog:
scxcli catalog show > catalog.json# Edit the exported catalog, then install it:sudo scxcli catalog save < catalog.jsonThe shipped catalog is /usr/share/scx/catalog.json. An override at
/etc/scx/catalog.json replaces the whole shipped file, rather than merging
with it, and does not automatically pick up later upstream recommendations.
Keep it owned by root and not writable by other users. Saving validates the
catalog but does not restart a scheduler; start the changed profile again.
Preview a file before installing it:
scxcli list all --catalog ./catalog.jsonscxtui --catalog ./catalog.jsonPreviewing does not authorize new profiles: starting still uses the installed catalog. To remove the override and return to the shipped catalog:
sudo scxcli catalog resetTemporary service overrides
Section titled “Temporary service overrides”For service-level testing without editing /etc/default/scx, set an override,
then restart the service:
sudo systemctl set-environment SCX_SCHEDULER_OVERRIDE=scx_lavdsudo systemctl set-environment SCX_FLAGS_OVERRIDE="--performance"sudo systemctl restart scx.serviceClear both overrides and restart to restore the saved configuration:
sudo systemctl unset-environment SCX_SCHEDULER_OVERRIDE SCX_FLAGS_OVERRIDEsudo systemctl restart scx.servicescxcli get and scxtui report active overrides. A subsequent scxcli start ID
clears them as part of selecting that entry.
Troubleshooting
Section titled “Troubleshooting”| Problem | What to check |
|---|---|
No sched_ext available message, or the service is skipped |
The running kernel needs sched_ext support. Boot a suitable Devario kernel; installing tools alone does not add kernel support. |
| A scheduler fails to start | Read scxcli get and journalctl -u scx.service -b 0. The service stops retrying after two startup failures in 30 seconds. A new start ID resets the failed state before retrying. |
| Switching asks for a password | Check that scxcli is installed at /usr/bin/scxcli and that /usr/share/polkit-1/actions/org.sched_ext.scxcli.policy is installed. A local policy or a non-console session can also require authentication. |
Resume refuses custom SCX_FLAGS |
Use pkexec scxcli start ID to select a listed entry, or repeat the administrator-authorized run command. Password-free resume accepts only options matching an approved profile. |
| A scheduler is missing from the list | Try scxcli list all. Some schedulers are deliberately hidden because they need their own configuration; use an administrator profile or run with the required options. |
| Every command refuses the custom catalog | The override may be invalid, unreadable, a symlink, or incorrectly owned. Correct it, or use sudo scxcli catalog reset to remove the override. |
| Configured and running schedulers differ | Check for active overrides, another scheduler manager, a failed start, or a scheduler launched manually. Do not start a second manager to fix the mismatch. |
For help, include the package version, running kernel, scxcli get output and
relevant service log. Review logs for personal information before sharing them.
Developer references
Section titled “Developer references”This page adapts the sched_ext guide for Devario by sir_lucjan. It describes the
upstream scx.service / scxcli / scxtui workflow checked at commit
c0347f11c.
Older packages or other distributions may still use scx-loader instead.
- scxcli reference: commands, privileges and custom profiles.
- scxtui reference: requirements, keyboard controls and interface behavior.
- Catalog contract: schema, trust rules, status detection and client integration.
- Scheduler descriptions: individual schedulers and their intended workloads.
- Upstream installation: source builds and other distributions. A tools-only build does not install scheduler binaries.
- Seafoam Labs scx fork: Devario integration and scheduler development.
- Devario package recipes: package contents and build configuration.
