Feature: GameMode-Tuning, MangoHud-Default & CoreCtrl für Gaming-Setup
Deployt eine getunte /etc/gamemode.ini (Performance-Governor, Renice, I/O-Priorität, AMD-GPU-Performance-Level) und ergänzt den Zielbenutzer um die Gruppen render/gamemode. MangoHud erhält ein vorkonfiguriertes Overlay über den bestehenden Skel-Sync. CoreCtrl wird installiert und per PolicyKit-Regel ohne wiederholte Passwortabfrage für sudo-Mitglieder freigegeben. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017WMUd2fGsPCtTCVQkSS5TA
This commit is contained in:
@@ -44,7 +44,7 @@ Dieses Repository ist ein modulares, automatisiertes Setup- und Konfigurations-F
|
|||||||
│ ├── 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
|
||||||
│ ├── 06-services.sh # Aktivierung von AppArmor, Docker, Libvirt, zram, Ollama
|
│ ├── 06-services.sh # Aktivierung von AppArmor, Docker, Libvirt, zram, Ollama, GameMode/CoreCtrl
|
||||||
│ ├── 07-skel-and-user.sh # /etc/skel Vorlagen, ZSH-Shell-Setzen, Dotfiles-Sync
|
│ ├── 07-skel-and-user.sh # /etc/skel Vorlagen, ZSH-Shell-Setzen, Dotfiles-Sync
|
||||||
│ ├── 08-flatpaks.sh # Flathub Setup, Flatpak-Paketlisten-Installation
|
│ ├── 08-flatpaks.sh # Flathub Setup, Flatpak-Paketlisten-Installation
|
||||||
│ ├── 09-apps.sh # Spotify, Waydroid, OpenDeck, Desktop-Starter, MIME-Types
|
│ ├── 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
|
│ │ └── preferences.d/ # Pinning-Konfigurationen
|
||||||
│ ├── etc/
|
│ ├── etc/
|
||||||
│ │ ├── environment.d/ # Globale Umgebungsvariablen (Raytracing, Upscaling)
|
│ │ ├── 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)
|
│ │ └── 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, Dokumentvorlagen)
|
||||||
│ └── usr/share/applications/ # Desktop-Starter-Dateien
|
│ └── usr/share/applications/ # Desktop-Starter-Dateien
|
||||||
├── README.md # Projektdokumentation für Endanwender
|
├── README.md # Projektdokumentation für Endanwender
|
||||||
└── LICENSE # MIT-Lizenz
|
└── LICENSE # MIT-Lizenz
|
||||||
|
|||||||
@@ -110,8 +110,10 @@ Installiere nur bestimmte Phasen (z. B. nur Paketlisten und Schriften):
|
|||||||
│ └── 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
|
||||||
|
│ ├── 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
|
│ └── profile.d/ # Bereinigte System-Profile-Skripte
|
||||||
├── skel/ # .zshrc, .config/hypr, Templates für Dokumente & Skripte
|
├── skel/ # .zshrc, .config/hypr, .config/MangoHud, Templates für Dokumente & Skripte
|
||||||
└── usr/share/applications/ # Desktop-Dateien (z. B. Spotify)
|
└── usr/share/applications/ # Desktop-Dateien (z. B. Spotify)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -144,6 +146,11 @@ Installiere nur bestimmte Phasen (z. B. nur Paketlisten und Schriften):
|
|||||||
|
|
||||||
## 🎮 Gaming & Performance-Optimierungen
|
## 🎮 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.
|
||||||
|
|
||||||
### 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`
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
# config/packages/03-gaming.list - Gaming tools, Vulkan drivers, Wine & Emulation
|
# config/packages/03-gaming.list - Gaming tools, Vulkan drivers, Wine & Emulation
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
|
corectrl
|
||||||
gameconqueror
|
gameconqueror
|
||||||
gamemode
|
gamemode
|
||||||
gamescope
|
gamescope
|
||||||
|
|||||||
@@ -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,34 @@
|
|||||||
|
### 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 indicator
|
||||||
|
gamemode
|
||||||
|
|
||||||
|
# Presentation
|
||||||
|
position=top-left
|
||||||
|
background_alpha=0.4
|
||||||
|
font_size=20
|
||||||
|
round_corners=6
|
||||||
|
table_columns=3
|
||||||
+27
-1
@@ -162,6 +162,32 @@ usermod -aG sudo,docker,netdev "$TARGET_USER"
|
|||||||
if getent group ollama >/dev/null 2>&1; then
|
if getent group ollama >/dev/null 2>&1; then
|
||||||
usermod -aG ollama "$TARGET_USER" 2>/dev/null || true
|
usermod -aG ollama "$TARGET_USER" 2>/dev/null || true
|
||||||
fi
|
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
|
||||||
|
|
||||||
log_success "Stage 06: System services configuration completed successfully!"
|
log_success "Stage 06: System services configuration completed successfully!"
|
||||||
|
|||||||
Reference in New Issue
Block a user