From cadbd05c4a70f08f51579d8b3ff281be907dd928 Mon Sep 17 00:00:00 2001 From: ver4a Date: Sun, 25 Jan 2026 16:24:29 +0100 Subject: [PATCH] feat: add scx_lavd scheduler It seems to be the most energy efficient on my lunar lake laptop, having the lowest low-utilization power draw (scx_lavd intel_pstate active > intel pstate active > EAS intel pstate passive), but there are some odd performance results, where only E-cores are used for single-threaded workloads like "zstd -b1" and "pv /dev/urandom > /dev/null". From my initial testing it seems to be way more convervative with using P-cores for these specific workloads, and only uses them if most of E-cores get overloaded, unlike EAS that engages P-cores when one E-core is utilized above 80%. --- containers/Dockerfile.kde | 13 +++++++++++++ containers/etc/default/scx | 1 + 2 files changed, 14 insertions(+) create mode 100644 containers/etc/default/scx diff --git a/containers/Dockerfile.kde b/containers/Dockerfile.kde index e9b3bb8..bd52d93 100644 --- a/containers/Dockerfile.kde +++ b/containers/Dockerfile.kde @@ -9,10 +9,23 @@ COPY ./mpv_options /build/mpv-build/mpv_options RUN cd /build/mpv-build && ./rebuild -j$(nproc) +FROM quay.io/fedora-ostree-desktops/kinoite:43 AS scx-build + +RUN dnf5 -y install --setopt install_weak_deps=false cargo git-core elfutils-libelf-devel clang rust-libseccomp-devel + +RUN mkdir /build && cd /build && git clone https://github.com/sched-ext/scx + +RUN cargo build --release -p scx_lavd + + FROM quay.io/fedora-ostree-desktops/kinoite:43 COPY --from=mpv-build /build/mpv-build/mpv/build/mpv /bin/mpv +COPY --from=scx-build /build/scx/target/release/scx_lavd /usr/bin/scx_lavd + +COPY --from=scx-build /build/scx/services/scx.service /usr/lib/systemd/system/scx.service + # dnf configuration has to be in effect during build COPY etc/dnf /etc/dnf diff --git a/containers/etc/default/scx b/containers/etc/default/scx new file mode 100644 index 0000000..ac66ea6 --- /dev/null +++ b/containers/etc/default/scx @@ -0,0 +1 @@ +SCX_SCHEDULER=scx_lavd