Compare commits
6
Commits
c1f3851086
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b8299fede
|
||
|
|
7296489c11
|
||
|
|
7932bb2482
|
||
|
|
0cc710f997
|
||
|
|
fec46ef46f
|
||
|
|
287e4d815b
|
@@ -40,11 +40,11 @@ Dieses Repository ist ein modulares, automatisiertes Setup- und Konfigurations-F
|
||||
├── stages/ # Sequenziell und modular ausführbare Phasen (00 bis 11)
|
||||
│ ├── 00-preflight.sh # Systemvoraussetzungen, Root/User-Erkennung, Internetverbindung
|
||||
│ ├── 01-apt-unstable.sh # Deb822-Quellen, Keyrings, Pinning, apt-listbugs, dist-upgrade
|
||||
│ ├── 02-kernel-hardware.sh # XanMod-Kernel, CPU P-State, Microcode, auto-cpufreq
|
||||
│ ├── 02-kernel-hardware.sh # XanMod-Kernel, CPU P-State, Microcode, auto-cpufreq, Shader-Cache-Pfad
|
||||
│ ├── 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
|
||||
│ ├── 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
|
||||
@@ -56,8 +56,10 @@ Dieses Repository ist ein modulares, automatisiertes Setup- und Konfigurations-F
|
||||
│ │ └── preferences.d/ # Pinning-Konfigurationen
|
||||
│ ├── etc/
|
||||
│ │ ├── environment.d/ # Globale Umgebungsvariablen (Raytracing, Upscaling)
|
||||
│ │ ├── gamemode.ini # GameMode Performance-Daemon Defaults (Governor, Renice, GPU)
|
||||
│ │ ├── polkit-1/rules.d/ # 90-corectrl.rules (passwortlose CoreCtrl-Freigabe für sudo-Gruppe)
|
||||
│ │ └── profile.d/ # Globale Profil-Skripte (z. B. XDG User Dirs Update)
|
||||
│ ├── skel/ # Vorlagen für /etc/skel (.zshrc, Dokumentvorlagen)
|
||||
│ ├── skel/ # Vorlagen für /etc/skel (.zshrc, .config/MangoHud, .config/vkBasalt, Dokumentvorlagen)
|
||||
│ └── usr/share/applications/ # Desktop-Starter-Dateien
|
||||
├── README.md # Projektdokumentation für Endanwender
|
||||
└── LICENSE # MIT-Lizenz
|
||||
|
||||
@@ -109,9 +109,11 @@ Installiere nur bestimmte Phasen (z. B. nur Paketlisten und Schriften):
|
||||
│ ├── sources.list.d/ # debian-unstable.sources, xanmod.sources
|
||||
│ └── preferences.d/ # Pinning-Konfigurationen (unstable, xanmod)
|
||||
├── etc/
|
||||
│ ├── environment.d/ # 99-raytracing.conf, 99-upscaling.conf
|
||||
│ ├── environment.d/ # 99-raytracing.conf, 99-upscaling.conf (99-shader-cache.conf wird optional zur Laufzeit generiert)
|
||||
│ ├── gamemode.ini # GameMode Performance-Daemon Defaults
|
||||
│ ├── polkit-1/rules.d/ # 90-corectrl.rules (passwortlose CoreCtrl-Freigabe für sudo-Gruppe)
|
||||
│ └── profile.d/ # Bereinigte System-Profile-Skripte
|
||||
├── skel/ # .zshrc, .config/hypr, Templates für Dokumente & Skripte
|
||||
├── skel/ # .zshrc, .config/hypr, .config/MangoHud, .config/vkBasalt, Templates für Dokumente & Skripte
|
||||
└── usr/share/applications/ # Desktop-Dateien (z. B. Spotify)
|
||||
```
|
||||
|
||||
@@ -144,6 +146,23 @@ Installiere nur bestimmte Phasen (z. B. nur Paketlisten und Schriften):
|
||||
|
||||
## 🎮 Gaming & Performance-Optimierungen
|
||||
|
||||
### GameMode, MangoHud & CoreCtrl
|
||||
- **GameMode**: `stages/06-services.sh` rollt eine getunte `/etc/gamemode.ini` aus (`desiredgov=performance`, Renice, I/O-Priorität, AMD-GPU-Performance-Level `high`) und fügt den Zielbenutzer automatisch den Gruppen `gamemode` (Renice/Core-Parking) und `render` (Vulkan/GPU-Compute) hinzu.
|
||||
- **MangoHud**: `data/skel/.config/MangoHud/MangoHud.conf` liefert ein vorkonfiguriertes Overlay (FPS, Frametime, CPU/GPU-Temperatur & -Takt, VRAM/RAM, GameMode-Indikator), das über `stages/07-skel-and-user.sh` automatisch für neue und bestehende Benutzer bereitgestellt wird. Umschalten mit `Shift+F12` (Position mit `Shift+F11`).
|
||||
- **CoreCtrl**: Für Fankurven, Power-States und Undervolting von AMD-CPU/GPU. Eine PolicyKit-Regel (`90-corectrl.rules`) erlaubt Mitgliedern der `sudo`-Gruppe den Start ohne wiederholte Passwortabfrage.
|
||||
|
||||
### 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.
|
||||
|
||||
### vkBasalt (Vulkan-Postprocessing)
|
||||
- ReShade-ähnliche Vulkan-Postprocessing-Shader (Contrast Adaptive Sharpening als Standard) mit vorkonfigurierter `~/.config/vkBasalt/vkBasalt.conf`. Aktivierung pro Spiel über die Steam-Launch-Option `ENABLE_VKBASALT=1 %command%`; Status wird von MangoHud mit angezeigt.
|
||||
|
||||
### Persistenter Shader-Cache (optional)
|
||||
- Standardmäßig bleiben Mesa (RADV/OpenGL) und DXVK (Wine/Proton) bei ihren eigenen Cache-Pfaden (`~/.cache/mesa_shader_cache`, `~/.cache/dxvk`). Wird `SHADER_CACHE_DIR` in `config/setup.conf` gesetzt (z. B. auf eine separate/schnelle Festplatte), verlegt `stages/02-kernel-hardware.sh` beide Caches dorthin, um Nachcompilierungs-Ruckler nach Neustarts zu vermeiden.
|
||||
|
||||
### 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`
|
||||
@@ -157,6 +176,9 @@ gamemoderun gamescope -W 2560 -H 1440 --force-grab-cursor --hdr-enabled --adapti
|
||||
|
||||
# Raytracing für DX12 Titel (RADV / Mesa)
|
||||
RADV_PERFTEST=gpl,rt,ngg_streamout VKD3D_CONFIG=dxr,dxr11 DXVK_ASYNC=1 AMD_VULKAN_ICD=RADV gamemoderun gamescope -W 2560 -H 1440 --force-grab-cursor --hdr-enabled --adaptive-sync -f -o 240 -r 240 -- mangohud %command%
|
||||
|
||||
# Mit vkBasalt-Postprocessing (Schärfung via Contrast Adaptive Sharpening)
|
||||
ENABLE_VKBASALT=1 gamemoderun gamescope -W 2560 -H 1440 --force-grab-cursor --hdr-enabled --adaptive-sync -f -o 240 -r 240 -- mangohud %command%
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -69,6 +69,7 @@ ripgrep
|
||||
rpi-imager
|
||||
shellcheck
|
||||
sl
|
||||
systemd-oomd
|
||||
systemd-timesyncd
|
||||
tar
|
||||
tealdeer
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# config/packages/03-gaming.list - Gaming tools, Vulkan drivers, Wine & Emulation
|
||||
# ==============================================================================
|
||||
|
||||
corectrl
|
||||
gameconqueror
|
||||
gamemode
|
||||
gamescope
|
||||
@@ -17,6 +18,8 @@ protontricks
|
||||
radeontop
|
||||
steam-installer
|
||||
steam-devices
|
||||
vkbasalt
|
||||
vkbasalt:i386
|
||||
vulkan-tools
|
||||
wine
|
||||
winetricks
|
||||
|
||||
@@ -23,6 +23,14 @@ GRUB_TIMEOUT_STYLE="menu"
|
||||
# Shell & Userland
|
||||
DEFAULT_SHELL="zsh"
|
||||
|
||||
# Gaming: Persistent Shader Cache (Mesa & DXVK)
|
||||
# Optional relocation of the shader/pipeline cache onto separate/bulk storage.
|
||||
# Leave empty to keep Mesa's and DXVK's own default cache locations
|
||||
# (~/.cache/mesa_shader_cache, ~/.cache/dxvk) - recommended unless you have a
|
||||
# specific reason (small root disk, dedicated fast scratch drive, ...).
|
||||
# Example: SHADER_CACHE_DIR="/mnt/Data/Software/mesa_shader_cache"
|
||||
SHADER_CACHE_DIR=""
|
||||
|
||||
# Ollama AI Configuration
|
||||
# Suggested custom models path, pre-filled only if the user declines
|
||||
# Ollama's own default storage location (/usr/share/ollama/.ollama/models).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Types: deb
|
||||
URIs: http://deb.xanmod.org
|
||||
Suites: releases
|
||||
Suites: sid
|
||||
Components: main
|
||||
Signed-By: /etc/apt/keyrings/xanmod-archive-keyring.gpg
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# ==============================================================================
|
||||
# data/etc/gamemode.ini - GameMode performance daemon defaults
|
||||
# ==============================================================================
|
||||
# Deployed to /etc/gamemode.ini by stages/06-services.sh
|
||||
# Full reference: /usr/share/gamemode/gamemode.ini
|
||||
|
||||
[general]
|
||||
; Use the "performance" CPU governor while a game is running instead of
|
||||
; "powersave"/"ondemand", restoring the previous governor once it exits.
|
||||
desiredgov=performance
|
||||
|
||||
; Renice game processes for smoother frame pacing (0-20, applied as a negated
|
||||
; nice value). Requires the target user to be a member of the "gamemode"
|
||||
; group, which the setup framework adds automatically.
|
||||
renice=5
|
||||
|
||||
; Lower I/O priority class while gaming (0 = highest Best-Effort priority).
|
||||
ioprio=0
|
||||
|
||||
; Keep the screen from blanking/locking while a game has focus.
|
||||
inhibit_screensaver=1
|
||||
|
||||
[gpu]
|
||||
; Apply AMD/NVIDIA GPU performance-level optimisations while gaming.
|
||||
apply_gpu_optimisations=accept-responsibility
|
||||
gpu_device=0
|
||||
|
||||
; AMD: force the "high" DPM performance level during GameMode sessions
|
||||
; (requires an up-to-date amdgpu kernel module).
|
||||
amd_performance_level=high
|
||||
|
||||
; NVIDIA-specific PowerMizer tuning (nv_powermizer_mode, nv_core_clock_mhz_offset,
|
||||
; nv_mem_clock_mhz_offset) requires the "coolbits" Xorg option and is not
|
||||
; configured by default, since this setup targets AMD/Intel GPUs.
|
||||
@@ -0,0 +1,10 @@
|
||||
// Allow members of the "sudo" administrative group to start/stop CoreCtrl's
|
||||
// privileged helper without an interactive PolicyKit password prompt.
|
||||
// Deployed by stages/06-services.sh.
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.corectrl.helper.init" ||
|
||||
action.id == "org.corectrl.helperkiller.init") &&
|
||||
subject.isInGroup("sudo")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
### MangoHud default overlay configuration
|
||||
### Deployed to ~/.config/MangoHud/MangoHud.conf via stages/07-skel-and-user.sh
|
||||
### Full reference: https://github.com/flightlessmango/MangoHud/blob/master/data/MangoHud.conf
|
||||
|
||||
# Toggle the overlay on/off with Shift+F12, move it with Shift+F11
|
||||
toggle_hud=Shift_L+F12
|
||||
toggle_hud_position=Shift_L+F11
|
||||
|
||||
# Performance metrics
|
||||
fps
|
||||
frametime
|
||||
frame_timing
|
||||
cpu_stats
|
||||
cpu_temp
|
||||
cpu_power
|
||||
gpu_stats
|
||||
gpu_temp
|
||||
gpu_power
|
||||
gpu_core_clock
|
||||
gpu_mem_clock
|
||||
vram
|
||||
ram
|
||||
io_read
|
||||
io_write
|
||||
|
||||
# GameMode / vkBasalt indicators
|
||||
gamemode
|
||||
vkbasalt
|
||||
|
||||
# Presentation
|
||||
position=top-left
|
||||
background_alpha=0.4
|
||||
font_size=20
|
||||
round_corners=6
|
||||
table_columns=3
|
||||
@@ -0,0 +1,18 @@
|
||||
### vkBasalt default post-processing configuration
|
||||
### Deployed to ~/.config/vkBasalt/vkBasalt.conf via stages/07-skel-and-user.sh
|
||||
### Full reference: https://github.com/DadSchoorse/vkBasalt
|
||||
###
|
||||
### Only active for games launched with ENABLE_VKBASALT=1, e.g. as a Steam
|
||||
### launch option: ENABLE_VKBASALT=1 %command%
|
||||
|
||||
# Effect chain to apply, in order
|
||||
effects = cas
|
||||
|
||||
# Contrast Adaptive Sharpening strength (0.0 - 1.0)
|
||||
casSharpness = 0.4
|
||||
|
||||
# Apply the effect chain immediately without needing to press toggleKey first
|
||||
enableOnLaunch = True
|
||||
|
||||
# Key to toggle all effects on/off at runtime
|
||||
toggleKey = Home
|
||||
@@ -120,6 +120,24 @@ if compgen -G "$SCRIPT_DIR/data/etc/environment.d/*.conf" > /dev/null; then
|
||||
done
|
||||
fi
|
||||
|
||||
# 6. Persistent Shader Cache Location (Mesa & DXVK) - optional relocation
|
||||
if [[ -n "${SHADER_CACHE_DIR:-}" ]]; then
|
||||
log_substep "Configuring custom Mesa/DXVK shader cache location..."
|
||||
TARGET_USER="${TARGET_USER:-$(prompt_target_user)}"
|
||||
mkdir -p "$SHADER_CACHE_DIR"
|
||||
chown -R "$TARGET_USER:$TARGET_USER" "$SHADER_CACHE_DIR"
|
||||
cat <<EOF > /etc/environment.d/99-shader-cache.conf
|
||||
# Persistent Mesa (RADV/OpenGL) & DXVK (Wine/Proton) shader/pipeline cache,
|
||||
# relocated off the system disk to avoid re-compilation stutter after reboots.
|
||||
MESA_SHADER_CACHE_DIR=$SHADER_CACHE_DIR
|
||||
DXVK_STATE_CACHE_PATH=$SHADER_CACHE_DIR
|
||||
EOF
|
||||
chmod 0644 /etc/environment.d/99-shader-cache.conf
|
||||
log_success "Shader cache directory set to $SHADER_CACHE_DIR"
|
||||
else
|
||||
log_info "SHADER_CACHE_DIR not set - keeping Mesa's and DXVK's own default shader cache locations."
|
||||
fi
|
||||
|
||||
create_timeshift_snapshot "Stage 02: Post-kernel and hardware tuning" "O"
|
||||
|
||||
log_success "Stage 02: Kernel and Hardware Tuning completed successfully!"
|
||||
|
||||
+61
-1
@@ -162,6 +162,66 @@ usermod -aG sudo,docker,netdev "$TARGET_USER"
|
||||
if getent group ollama >/dev/null 2>&1; then
|
||||
usermod -aG ollama "$TARGET_USER" 2>/dev/null || true
|
||||
fi
|
||||
log_success "Target user $TARGET_USER added to sudo, docker, netdev and ollama groups."
|
||||
# "render" (GPU compute/Vulkan access) is created by Debian's udev sysusers
|
||||
# config and is always present; "gamemode" only exists once the gamemode
|
||||
# package is installed (stage 04), so it is added conditionally.
|
||||
if getent group render >/dev/null 2>&1; then
|
||||
usermod -aG render "$TARGET_USER" 2>/dev/null || true
|
||||
fi
|
||||
if getent group gamemode >/dev/null 2>&1; then
|
||||
usermod -aG gamemode "$TARGET_USER" 2>/dev/null || true
|
||||
fi
|
||||
log_success "Target user $TARGET_USER added to sudo, docker, netdev, ollama, render and gamemode groups."
|
||||
|
||||
# 9. GameMode Performance Daemon & CoreCtrl Configuration
|
||||
log_substep "Deploying GameMode performance configuration..."
|
||||
if [[ -f "$SCRIPT_DIR/data/etc/gamemode.ini" ]]; then
|
||||
backup_file_or_dir "/etc/gamemode.ini"
|
||||
cp "$SCRIPT_DIR/data/etc/gamemode.ini" /etc/gamemode.ini
|
||||
chmod 0644 /etc/gamemode.ini
|
||||
log_success "GameMode configuration deployed to /etc/gamemode.ini."
|
||||
fi
|
||||
|
||||
log_substep "Configuring passwordless CoreCtrl access for administrative users..."
|
||||
if [[ -f "$SCRIPT_DIR/data/etc/polkit-1/rules.d/90-corectrl.rules" ]]; then
|
||||
mkdir -p /etc/polkit-1/rules.d
|
||||
cp "$SCRIPT_DIR/data/etc/polkit-1/rules.d/90-corectrl.rules" /etc/polkit-1/rules.d/90-corectrl.rules
|
||||
chmod 0644 /etc/polkit-1/rules.d/90-corectrl.rules
|
||||
log_success "CoreCtrl PolicyKit rule installed for the 'sudo' group."
|
||||
fi
|
||||
|
||||
# 10. systemd-oomd Out-of-Memory Protection
|
||||
log_substep "Enabling systemd-oomd out-of-memory protection..."
|
||||
if command_exists systemctl; then
|
||||
systemctl enable --now systemd-oomd.service 2>/dev/null || log_warn "Could not enable systemd-oomd.service."
|
||||
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!"
|
||||
|
||||
Reference in New Issue
Block a user