| name | nvidia-laptop-gaming-tuning |
| title | NVIDIA Laptop Gaming Performance Tuning (Linux) |
| description | Maximize gaming performance on NVIDIA Optimus laptops under Linux: enable Dynamic Boost (nvidia-powerd) when the driver ships no service/DBus policy, set up Feral GameMode, and handle the intel_pstate/EPP governor quirk. |
| triggers | ["User wants better gaming/GPU performance on an NVIDIA laptop (Linux)","nvidia-powerd fails to start / \"not allowed to own service nvidia.powerd.server\"",{"GameMode \"Verifying CPU governor setting":"Failed\""},"Dynamic Boost not active on a laptop that supports it","CPU governor stuck on powersave on intel_pstate systems"] |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
NVIDIA Laptop Gaming Performance Tuning
Diagnostic First (always)
nvidia-smi --query-gpu=name,driver_version,clocks.max.graphics --format=csv
prime-select query
cat /proc/driver/nvidia/gpus/*/power | grep -i "Dynamic Boost"
systemctl is-active nvidia-powerd
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference
powerprofilesctl get
CRITICAL: intel_pstate uses EPP, NOT the classic governor
On modern Intel laptops scaling_driver is intel_pstate in active mode.
Here the scaling_governor string (powersave/performance) is NOT the real
lever — the actual knob is EPP (Energy Performance Preference).
Fix: nvidia-powerd (Dynamic Boost) won't start
Symptom in journalctl -u nvidia-powerd:
Error requesting D-Bus name (Connection ... is not allowed to own the
service "nvidia.powerd.server" due to security policies ...)
Some driver packages (e.g. 595) ship the /usr/bin/nvidia-powerd binary but
NOT the systemd service and NOT the DBus policy. Three things needed:
1. Service file — use the one the driver ships as docs (Type=simple!):
sudo cp /usr/share/doc/nvidia-kernel-common-*/nvidia-powerd.service \
/etc/systemd/system/nvidia-powerd.service
sudo systemctl daemon-reload
Do NOT hand-write a Type=dbus unit — it hangs in activating waiting for a
bus name. The official unit is Type=simple.
2. DBus system policy — /etc/dbus-1/system.d/nvidia-powerd.conf:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="root">
<allow own="nvidia.powerd.server"/>
<allow send_destination="nvidia.powerd.server"/>
<allow receive_sender="nvidia.powerd.server"/>
</policy>
<policy context="default">
<allow send_destination="nvidia.powerd.server"/>
<allow receive_sender="nvidia.powerd.server"/>
</policy>
</busconfig>
3. PERMISSIONS PITFALL — the DBus daemon runs as user messagebus/message+
and cannot read a -rw------- file. The policy MUST be world-readable:
sudo chmod 644 /etc/dbus-1/system.d/nvidia-powerd.conf
sudo pkill -HUP dbus-daemon
sudo systemctl enable --now nvidia-powerd
journalctl -u nvidia-powerd --since "30 seconds ago"
Note: a harmless ERROR! Error(1f) in setting the short timescale limit may
appear — that's an optional register some laptops don't expose; Dynamic Boost
still works.
Feral GameMode setup (auto perf on game launch)
sudo apt install -y gamemode
systemctl --user enable --now gamemoded
/etc/gamemode.ini (chmod 644!):
[general]
renice=10
ioprio=0
softrealtime=auto
[gpu]
apply_gpu_optimisations=accept-responsibility
gpu_device=0
nv_powermizer_mode=1
[custom]
start=/home/USER/bin/gamemode-start.sh
end=/home/USER/bin/gamemode-end.sh
Hooks (chmod +x), because the governor path is dead on intel_pstate:
powerprofilesctl set performance
powerprofilesctl set balanced
Test end-to-end:
gamemoderun bash -c 'cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference'
Steam: per-game launch option gamemoderun %command% (also for Proton games).
Pitfalls
- intel_pstate EPP quirk (see above) — biggest gotcha. Governor name lies.
- DBus policy file MUST be chmod 644, not 600. messagebus can't read 600.
- Use the driver's shipped Type=simple service, never a hand-rolled Type=dbus.
- GameMode governor verification fails on intel_pstate — expected, use hooks.
- powerprofilesctl needs no sudo for profile changes (local active session).