Feature: Optionale Verlegung des Mesa/DXVK-Shader-Caches
Neue Variable SHADER_CACHE_DIR in config/setup.conf erlaubt es, den Mesa- (RADV/OpenGL) und DXVK-Shader-Cache (Wine/Proton) auf einen separaten Speicherort zu verlegen, um Nachcompilierungs-Ruckler nach Neustarts zu vermeiden. Standardmäßig leer, damit kein hartkodierter Pfad (z. B. /mnt/Data) vorausgesetzt wird - ohne Angabe bleiben Mesa und DXVK bei ihren eigenen, überall vorhandenen Cache-Pfaden. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017WMUd2fGsPCtTCVQkSS5TA
This commit is contained in:
@@ -40,7 +40,7 @@ Dieses Repository ist ein modulares, automatisiertes Setup- und Konfigurations-F
|
|||||||
├── stages/ # Sequenziell und modular ausführbare Phasen (00 bis 11)
|
├── stages/ # Sequenziell und modular ausführbare Phasen (00 bis 11)
|
||||||
│ ├── 00-preflight.sh # Systemvoraussetzungen, Root/User-Erkennung, Internetverbindung
|
│ ├── 00-preflight.sh # Systemvoraussetzungen, Root/User-Erkennung, Internetverbindung
|
||||||
│ ├── 01-apt-unstable.sh # Deb822-Quellen, Keyrings, Pinning, apt-listbugs, dist-upgrade
|
│ ├── 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
|
│ ├── 03-bootloader.sh # GRUB Kernel-Parameter, Vimix-Theme, Plymouth Solar
|
||||||
│ ├── 04-packages.sh # Installation der thematischen Paketlisten
|
│ ├── 04-packages.sh # Installation der thematischen Paketlisten
|
||||||
│ ├── 05-fonts.sh # Download & Installation von Coding- & Nerd-Fonts
|
│ ├── 05-fonts.sh # Download & Installation von Coding- & Nerd-Fonts
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ Installiere nur bestimmte Phasen (z. B. nur Paketlisten und Schriften):
|
|||||||
│ ├── sources.list.d/ # debian-unstable.sources, xanmod.sources
|
│ ├── sources.list.d/ # debian-unstable.sources, xanmod.sources
|
||||||
│ └── preferences.d/ # Pinning-Konfigurationen (unstable, xanmod)
|
│ └── preferences.d/ # Pinning-Konfigurationen (unstable, xanmod)
|
||||||
├── etc/
|
├── 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
|
│ ├── gamemode.ini # GameMode Performance-Daemon Defaults
|
||||||
│ ├── polkit-1/rules.d/ # 90-corectrl.rules (passwortlose CoreCtrl-Freigabe für sudo-Gruppe)
|
│ ├── polkit-1/rules.d/ # 90-corectrl.rules (passwortlose CoreCtrl-Freigabe für sudo-Gruppe)
|
||||||
│ └── profile.d/ # Bereinigte System-Profile-Skripte
|
│ └── profile.d/ # Bereinigte System-Profile-Skripte
|
||||||
@@ -160,6 +160,9 @@ Installiere nur bestimmte Phasen (z. B. nur Paketlisten und Schriften):
|
|||||||
### vkBasalt (Vulkan-Postprocessing)
|
### 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.
|
- 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
|
### CPU P-State & Kernel-Parameter
|
||||||
In `stages/03-bootloader.sh` wird der CPU-Hersteller automatisch ermittelt und in `/etc/default/grub` eingetragen:
|
In `stages/03-bootloader.sh` wird der CPU-Hersteller automatisch ermittelt und in `/etc/default/grub` eingetragen:
|
||||||
- **AMD CPUs**: `amd_pstate=active`
|
- **AMD CPUs**: `amd_pstate=active`
|
||||||
|
|||||||
@@ -23,6 +23,14 @@ GRUB_TIMEOUT_STYLE="menu"
|
|||||||
# Shell & Userland
|
# Shell & Userland
|
||||||
DEFAULT_SHELL="zsh"
|
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
|
# Ollama AI Configuration
|
||||||
# Suggested custom models path, pre-filled only if the user declines
|
# Suggested custom models path, pre-filled only if the user declines
|
||||||
# Ollama's own default storage location (/usr/share/ollama/.ollama/models).
|
# Ollama's own default storage location (/usr/share/ollama/.ollama/models).
|
||||||
|
|||||||
@@ -120,6 +120,24 @@ if compgen -G "$SCRIPT_DIR/data/etc/environment.d/*.conf" > /dev/null; then
|
|||||||
done
|
done
|
||||||
fi
|
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"
|
create_timeshift_snapshot "Stage 02: Post-kernel and hardware tuning" "O"
|
||||||
|
|
||||||
log_success "Stage 02: Kernel and Hardware Tuning completed successfully!"
|
log_success "Stage 02: Kernel and Hardware Tuning completed successfully!"
|
||||||
|
|||||||
Reference in New Issue
Block a user