How do I persistently change the GPU governor to performance

I am running a computer vision model with TensorRT, and have found that I need to

echo performance > /sys/devices/17000000.gv11b/devfreq/17000000.gv11b/governor

as root to get the max GPU performance and inference frequency.
I want this setting to persist after reboot, but have found zero documentation on how. The governor is always nvhost_podgov after boot.

Things I’ve tried:

  • run /usr/bin/jetson_clocks from a systemd service at boot. Works when done manually, but changes appear to get overwritten after
  • Modify /etc/nvpmodel/nvpmodel_t194_e3900_iGPU.conf
  • Modify /etc/nvpmodel.conf
  • Add a systemd service that does the modification.

What must I do do make this setting stick across reboots?

It works for the CPU frequency scalers, with these modifications:

apt install -y cpufrequtils
echo 'GOVERNOR="performance"' > /etc/default/cpufrequtils
systemctl disable ondemand
echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

An appropriately crafted systemd service seems to work:

[Unit]
Description=Set GPU governor
After=multi-user.target
Wants=multi-user.target

[Service]
WorkingDirectory=/
ExecStart=/usr/bin/jetson_clocks

[Install]
WantedBy=multi-user.target

Specifically, it seems the After=multi-user.target line is significant. Otherwise the device frequency nodes don’t exist yet.

1 Like

Hi,
Thanks for sharing the solution. There is a topic about setting VIC governor:
Camera's frame rate unstable - #24 by DaneLLL

Alternatively you may add GPU governor into the script for a try.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.