Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # 1.8GHz Settings:
  4. # 1800 Max, 1200 Mem, 1100 Volt
  5.  
  6. # 2GHz Settings:
  7. # 2000 Max, 1200 Mem, 1176 Volt
  8.  
  9. # 2.1GHz Settings:
  10. # 2100 Max, 1200 Mem, 1185 Volt
  11.  
  12. CORE_MIN="1000"
  13. CORE_MAX="1800"
  14. MEM_CLK="1200"
  15. VOLT="1098"
  16. P_LIMIT="300"
  17.  
  18. sudo chmod +x /sys/class/drm/card0/device/pp_od_clk_voltage
  19.  
  20. # protect against overvolting
  21. if [[ "${VOLT}" -ge "1200" ]]; then
  22. echo "Voltage is set to ${VOLT} which could cause damage. Terminating."
  23. exit
  24. fi
  25.  
  26. # change performance leve to manual
  27. sudo sh -c "echo 'high' > /sys/class/drm/card0/device/power_dpm_force_performance_level"
  28.  
  29. # change power limit
  30. sudo sh -c "echo '${P_LIMIT}000000' > /sys/class/drm/card0/device/hwmon/hwmon2/power1_cap"
  31.  
  32. # set pstate 2 voltage to 1010mv for 1801mhz
  33. sudo sh -c "echo 'vc 2 ${CORE_MAX} ${VOLT}' > /sys/class/drm/card0/device/pp_od_clk_voltage"
  34. sudo sh -c "echo 'c' > /sys/class/drm/card0/device/pp_od_clk_voltage"
  35.  
  36. # set min/max core clock
  37. sudo sh -c "echo 's 0 ${CORE_MIN}' > /sys/class/drm/card0/device/pp_od_clk_voltage"
  38. sudo sh -c "echo 's 1 ${CORE_MAX}' > /sys/class/drm/card0/device/pp_od_clk_voltage"
  39. sudo sh -c "echo 'c' > /sys/class/drm/card0/device/pp_od_clk_voltage"
  40.  
  41. # set mem clock to 1200
  42. sudo sh -c "echo 'm 1 ${MEM_CLK}' > /sys/class/drm/card0/device/pp_od_clk_voltage"
  43. sudo sh -c "echo 'c' > /sys/class/drm/card0/device/pp_od_clk_voltage"
  44.  
  45. echo "Core set to ${CORE_MIN}/${CORE_MAX}"
  46. echo "Memory set to ${MEM_CLK}"
  47. echo "Voltage set to ${VOLT}mV"
  48. echo "Power limit set to ${P_LIMIT}%"
  49.  
  50. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement