Surfaced from issue #2 by @redkjuegos, who hit the friction first-hand on Orange Pi 5.
rk-llama.cpp on RK3588 hardware silently degrades to unusable performance after a fresh boot unless a sequence of devfreq governors and process tunings are applied first. @redkjuegos's known-good recipe:
```bash
sudo bash -c '
for cpu in /sys/bus/cpu/devices/cpu[0-7]/cpufreq/scaling_governor; do echo performance > $cpu; done
echo performance > /sys/class/devfreq/fb000000.gpu/governor
echo performance > /sys/devices/platform/dmc/devfreq/dmc/governor
echo performance > /sys/class/devfreq/fdab0000.npu/governor
'
ulimit -n 65536
cd ~/rk-llama.cpp/build/bin && \
HYBRID_PATTERN=INT8_STANDARD taskset -c 4-7 ./llama-server \
-m ~/models/gemma-4-E2B-it-Q8_0.gguf \
--n-gpu-layers 999 -c 8192 --batch-size 512 --threads 4 \
--host 0.0.0.0 --port 8080 --keep 2048 \
--reasoning-budget 0 --reasoning off --jinja \
-ctk q8_0 -ctv q8_0 --temp 0.7 --repeat-penalty 1.1
```
Without these settings rk-llama.cpp won't work properly after every restart.
Scope
RK3588 hardware ONLY. The devfreq paths (`/sys/class/devfreq/fb000000.gpu`, `fdab0000.npu`, `/sys/devices/platform/dmc/devfreq/dmc`), the `taskset -c 4-7` core layout (assumes RK3588's 4×A55 + 4×A76 with the A76s as cores 4-7), and `HYBRID_PATTERN=INT8_STANDARD` are all SoC-specific. They would be wrong (or simply absent) on a Raspberry Pi 5 (BCM2712), an x86 mini-PC, an Apple Silicon Mac, or any other supported target.
The toggle must therefore be gated on RK3588 detection in the UI — invisible / not applicable on other hardware.
Behaviour
- Settings → Performance mode toggle, visible only when hardware detection reports a Rockchip RK3588 SoC
- On by default when RK3588 is detected — the assumption is "this is dedicated AI hardware"
- Off → on writes the governor + ulimit settings, restarts the rk-llama.cpp service if installed
- On → off restores the system defaults (probably `schedutil`/`ondemand`/`simple_ondemand`) so the user can preserve power on an idle board
- The `HYBRID_PATTERN` env var and `taskset -c 4-7` invocation also flow through the rk-llama.cpp service file as default args at the same time, so installing rk-llama.cpp via the Store gets the tuned config
Persistence
- A small `taos-rk3588-perf.service` systemd unit applies the settings on every boot when the toggle is on. Installer enables/disables based on the toggle state.
Out of scope
- Other SoCs (filed if/when someone surfaces a similar recipe for them)
- Per-app performance overrides (just one global toggle for now)
Surfaced from issue #2 by @redkjuegos, who hit the friction first-hand on Orange Pi 5.
rk-llama.cpp on RK3588 hardware silently degrades to unusable performance after a fresh boot unless a sequence of devfreq governors and process tunings are applied first. @redkjuegos's known-good recipe:
```bash
sudo bash -c '
for cpu in /sys/bus/cpu/devices/cpu[0-7]/cpufreq/scaling_governor; do echo performance > $cpu; done
echo performance > /sys/class/devfreq/fb000000.gpu/governor
echo performance > /sys/devices/platform/dmc/devfreq/dmc/governor
echo performance > /sys/class/devfreq/fdab0000.npu/governor
'
ulimit -n 65536
cd ~/rk-llama.cpp/build/bin && \
HYBRID_PATTERN=INT8_STANDARD taskset -c 4-7 ./llama-server \
-m ~/models/gemma-4-E2B-it-Q8_0.gguf \
--n-gpu-layers 999 -c 8192 --batch-size 512 --threads 4 \
--host 0.0.0.0 --port 8080 --keep 2048 \
--reasoning-budget 0 --reasoning off --jinja \
-ctk q8_0 -ctv q8_0 --temp 0.7 --repeat-penalty 1.1
```
Without these settings rk-llama.cpp won't work properly after every restart.
Scope
RK3588 hardware ONLY. The devfreq paths (`/sys/class/devfreq/fb000000.gpu`, `fdab0000.npu`, `/sys/devices/platform/dmc/devfreq/dmc`), the `taskset -c 4-7` core layout (assumes RK3588's 4×A55 + 4×A76 with the A76s as cores 4-7), and `HYBRID_PATTERN=INT8_STANDARD` are all SoC-specific. They would be wrong (or simply absent) on a Raspberry Pi 5 (BCM2712), an x86 mini-PC, an Apple Silicon Mac, or any other supported target.
The toggle must therefore be gated on RK3588 detection in the UI — invisible / not applicable on other hardware.
Behaviour
Persistence
Out of scope