#!/bin/bash
SYSFS="/sys/class/drm/card0/device"
for level in auto low high profile_standard profile_min_sclk profile_min_mclk profile_peak manual; do
  result=$(echo "$level" | sudo tee "$SYSFS/power_dpm_force_performance_level" 2>&1)
  current=$(cat "$SYSFS/power_dpm_force_performance_level")
  echo "$level -> current=$current"
done
echo "---"
echo "Final: $(cat $SYSFS/power_dpm_force_performance_level)"
