Feature: sched-ext Gaming-Scheduler (scx_lavd) aktiviert

Installiert scx-scheds aus dem bereits konfigurierten XanMod-Repository
und aktiviert den für Gaming/interaktive Desktop-Workloads gebauten
Latency-criticality Aware Virtual Deadline Scheduler im Autopilot-Modus.
Benötigt einen Kernel mit CONFIG_SCHED_CLASS_EXT (bei XanMod bereits
aktiv); nach frischer Kernel-Installation ggf. Neustart nötig.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WMUd2fGsPCtTCVQkSS5TA
This commit is contained in:
2026-09-06 22:51:29 +02:00
co-authored by Claude Sonnet 5
parent fec46ef46f
commit 0cc710f997
3 changed files with 31 additions and 1 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ Dieses Repository ist ein modulares, automatisiertes Setup- und Konfigurations-F
│ ├── 03-bootloader.sh # GRUB Kernel-Parameter, Vimix-Theme, Plymouth Solar
│ ├── 04-packages.sh # Installation der thematischen Paketlisten
│ ├── 05-fonts.sh # Download & Installation von Coding- & Nerd-Fonts
│ ├── 06-services.sh # Aktivierung von AppArmor, Docker, Libvirt, zram, Ollama, GameMode/CoreCtrl, systemd-oomd
│ ├── 06-services.sh # Aktivierung von AppArmor, Docker, Libvirt, zram, Ollama, GameMode/CoreCtrl, systemd-oomd, scx-Scheduler
│ ├── 07-skel-and-user.sh # /etc/skel Vorlagen, ZSH-Shell-Setzen, Dotfiles-Sync
│ ├── 08-flatpaks.sh # Flathub Setup, Flatpak-Paketlisten-Installation
│ ├── 09-apps.sh # Spotify, Waydroid, OpenDeck, Desktop-Starter, MIME-Types
+3
View File
@@ -154,6 +154,9 @@ Installiere nur bestimmte Phasen (z. B. nur Paketlisten und Schriften):
### systemd-oomd (Out-of-Memory-Schutz)
- Wird aktiviert, um Einfrieren des Systems bei gleichzeitiger Speicher-/Swap-Auslastung (Spiel + Discord + Browser) zu verhindern ergänzt das bestehende zram-Swap.
### Sched-ext Gaming-Scheduler
- **sched-ext (`scx-scheds`)**: `stages/06-services.sh` installiert das Paket aus dem bereits konfigurierten XanMod-Repository und aktiviert den Scheduler `scx_lavd` (Latency-criticality Aware Virtual Deadline speziell für Gaming/interaktive Desktop-Workloads) im `--autopilot`-Modus über `/etc/default/scx` und `scx.service`. Benötigt einen Kernel mit `CONFIG_SCHED_CLASS_EXT` (bei XanMod bereits aktiv); nach einer frischen Kernel-Installation ist ggf. ein Neustart nötig.
### CPU P-State & Kernel-Parameter
In `stages/03-bootloader.sh` wird der CPU-Hersteller automatisch ermittelt und in `/etc/default/grub` eingetragen:
- **AMD CPUs**: `amd_pstate=active`
+27
View File
@@ -197,4 +197,31 @@ if command_exists systemctl; then
log_success "systemd-oomd enabled (protects against freezes under heavy memory/swap pressure)."
fi
# 11. Sched-ext (scx) Gaming Scheduler
log_substep "Configuring sched-ext (scx) gaming scheduler..."
apt_ensure_keyrings_dir
apt_add_keyring_from_url "https://dl.xanmod.org/archive.key" "xanmod-archive-keyring.gpg" || true
if [[ -f "$SCRIPT_DIR/data/apt/sources.list.d/xanmod.sources" ]]; then
apt_install_sources_file "$SCRIPT_DIR/data/apt/sources.list.d/xanmod.sources" "xanmod.sources"
fi
apt_update
if DEBIAN_FRONTEND=noninteractive apt-get install -y scx-scheds 2>/dev/null; then
if [[ -f /etc/default/scx ]]; then
# scx_lavd (Latency-criticality Aware Virtual Deadline) is purpose-built
# for gaming/interactive desktop workloads; --autopilot lets it balance
# performance vs. powersave automatically based on system load.
sed -i 's|^SCX_SCHEDULER=.*|SCX_SCHEDULER=scx_lavd|' /etc/default/scx
grep -q '^SCX_SCHEDULER=' /etc/default/scx || echo "SCX_SCHEDULER=scx_lavd" >> /etc/default/scx
sed -i "s|^#\?SCX_FLAGS=.*|SCX_FLAGS='--autopilot'|" /etc/default/scx
grep -q '^SCX_FLAGS=' /etc/default/scx || echo "SCX_FLAGS='--autopilot'" >> /etc/default/scx
fi
if command_exists systemctl; then
systemctl daemon-reload 2>/dev/null || true
systemctl enable --now scx.service 2>/dev/null || log_warn "scx.service could not be started - a reboot into a sched_ext-capable kernel (e.g. XanMod) may be required."
fi
log_success "sched-ext gaming scheduler (scx_lavd) configured and enabled."
else
log_warn "Could not install scx-scheds. Skipping sched-ext scheduler configuration."
fi
log_success "Stage 06: System services configuration completed successfully!"