Adds zenity profile picker (gaming / LLM / reset) with safe RAM guardrails, pkexec-based apply, and install.sh for Nobara/Fedora. Co-authored-by: Cursor <[email protected]>
131 lines
3.2 KiB
Markdown
131 lines
3.2 KiB
Markdown
# z13Profiler
|
|
|
|
GUI profile switcher for **ROG Flow Z13 (GZ302)** unified memory on **Nobara / Fedora**.
|
|
|
|
Repository: [git.hisora.dev/Dawnsorrow/z13Profiler](https://git.hisora.dev/Dawnsorrow/z13Profiler)
|
|
|
|
Switches between:
|
|
|
|
| Profile | Fixed VRAM (carveout) | Dynamic GPU pool (TTM) |
|
|
|---------|----------------------|-------------------------|
|
|
| **Gaming** | 8 GB | Kernel default (removes custom TTM) |
|
|
| **LLM / AI** | 512 MB (minimum available) | 48 GB |
|
|
| **Reset** | 4 GB (ASUS default) | Kernel default |
|
|
|
|
All changes require a **reboot**. The GUI warns and confirms before applying.
|
|
|
|
## Quick install (Z13 / Nobara)
|
|
|
|
```bash
|
|
git clone https://git.hisora.dev/Dawnsorrow/z13Profiler.git
|
|
cd z13Profiler
|
|
./install.sh
|
|
z13-memory-profiles
|
|
```
|
|
|
|
One-liner (clone + install):
|
|
|
|
```bash
|
|
git clone https://git.hisora.dev/Dawnsorrow/z13Profiler.git /tmp/z13Profiler && /tmp/z13Profiler/install.sh
|
|
```
|
|
|
|
Dependencies (install first if missing):
|
|
|
|
```bash
|
|
sudo dnf install -y git zenity python3 polkit
|
|
```
|
|
|
|
## Update from git
|
|
|
|
If installed from this repo, pull and re-run the installer:
|
|
|
|
```bash
|
|
cd ~/z13Profiler # or wherever you cloned
|
|
git pull
|
|
./install.sh
|
|
```
|
|
|
|
Or update the installed copy directly:
|
|
|
|
```bash
|
|
cd ~/.local/share/z13-memory-profiles
|
|
git pull
|
|
./install.sh
|
|
```
|
|
|
|
## Requirements
|
|
|
|
- ROG Flow Z13 2025 (GZ302), 64 GB RAM (defaults in `config/profiles.conf`)
|
|
- Nobara / Fedora with `zenity`, `python3`, `polkit` (`pkexec`)
|
|
- Root via `pkexec` when applying profiles
|
|
|
|
Optional: `pipx install amd-debug-tools` for standalone `amd-ttm` CLI.
|
|
|
|
## Usage
|
|
|
|
**GUI (Application menu → “Z13 Memory Profiles”, or terminal):**
|
|
|
|
```bash
|
|
z13-memory-profiles
|
|
# alias after install:
|
|
z13profiler
|
|
```
|
|
|
|
**Check current settings:**
|
|
|
|
```bash
|
|
z13-memory-profiles --status
|
|
```
|
|
|
|
**Apply from terminal (reboot manually after):**
|
|
|
|
```bash
|
|
sudo z13-memory-profiles --apply gaming
|
|
sudo z13-memory-profiles --apply llm
|
|
sudo z13-memory-profiles --apply reset
|
|
```
|
|
|
|
## Safeguards
|
|
|
|
- Refuses profiles that would leave less than **8 GB** for the OS (configurable).
|
|
- Warns if TTM exceeds **90%** of installed RAM.
|
|
- Only writes `/etc/modprobe.d/ttm.conf` and UMA sysfs index (no random kernel hacks).
|
|
- Uses `pkexec` for privileged operations from the GUI.
|
|
|
|
## If fixed VRAM (carveout) does not change
|
|
|
|
Some setups do not expose `/sys/class/drm/card0/device/uma/` yet. The tool still adjusts TTM for LLM mode. For gaming VRAM:
|
|
|
|
1. Boot **Windows** once → **Armoury Crate → System Settings → Free up memory** → set **8 GB** → reboot.
|
|
2. Or update Nobara/kernel and re-check `z13-memory-profiles --status`.
|
|
|
|
## Customizing for your RAM size
|
|
|
|
Edit `~/.local/share/z13-memory-profiles/config/profiles.conf` after install:
|
|
|
|
```ini
|
|
[llm]
|
|
ttm_gb=48 # lower on 32 GB systems (e.g. 24)
|
|
min_os_reserve_gb=8
|
|
```
|
|
|
|
## Uninstall
|
|
|
|
```bash
|
|
rm -f ~/.local/bin/z13-memory-profiles ~/.local/bin/z13profiler
|
|
rm -rf ~/.local/share/z13-memory-profiles
|
|
rm -f ~/.local/share/applications/z13-memory-profiles.desktop
|
|
sudo rm -f /etc/modprobe.d/ttm.conf
|
|
sudo dracut --force --regenerate-all 2>/dev/null || true
|
|
```
|
|
|
|
Then reboot.
|
|
|
|
## Build tarball (optional)
|
|
|
|
```bash
|
|
./package.sh
|
|
```
|
|
|
|
Creates `z13Profiler-1.0.0.tar.gz` in the parent directory for USB transfer.
|