Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. {sudo password here} {device number here} {.wav file here} {temperature degree here} {screenshot directory}
  2. To watch temperature:
  3. while true;do a=$(echo {sudo password here}|sudo -S cat /sys/kernel/debug/dri/{device number here}/amdgpu_pm_info|grep Temperature|tr -d ' GPUTmpratueC:');echo $a;cat /sys/class/drm/card{device number here}/device/power_dpm_force_performance_level;if [ $a -gt {temperature degree here} ];then aplay --device=pulse {.wav file here};else echo cool;fi;sleep 5;done
  4. To change dpm:
  5. sh -c "echo {sudo password here}|sudo -S su -c 'if [ $(cat /sys/class/drm/card{device number here}/device/power_dpm_force_performance_level) != "high" ];then echo high>/sys/class/drm/card{device number here}/device/power_dpm_force_performance_level;else echo low>/sys/class/drm/card{device number here}/device/power_dpm_force_performance_level;fi'"
  6. To set governer to "performance":
  7. echo {sudo password here}|sudo -S su -c 'echo performance|tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor'
  8. To take screenshot with scrot (requires date and scrot):
  9. sh -c 'scrot /dev/shm/scrotshot.png;mv /dev/shm/scrotshot.png {screenshot directory}/$(date +%Y-%m-%d_%H:%M:%S:%N).png'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement