<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - amdgpu [RX Vega 64] system freeze while gaming"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109955#c119">Comment # 119</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - amdgpu [RX Vega 64] system freeze while gaming"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109955">bug 109955</a>
from <span class="vcard"><a class="email" href="mailto:haro41@gmx.de" title="haro41@gmx.de">haro41@gmx.de</a>
</span></b>
<pre>bellow is a simple script, i use to record dpm data in the background:
######################################################
#!/bin/bash
# adapt this sample inverval (seconds)
SLEEP_INTERVAL=0.05
# adapt the paths to your need
FILE_SCLK=/sys/class/drm/card0/device/hwmon/hwmon0/freq1_input
FILE_MCLK=/sys/class/drm/card0/device/hwmon/hwmon0/freq2_input
FILE_PWM=/sys/class/drm/card0/device/hwmon/hwmon0/pwm1
FILE_TEMP=/sys/class/drm/card0/device/hwmon/hwmon0/temp1_input
FILE_FAN=/sys/class/drm/card0/device/hwmon/hwmon0/fan1_input
FILE_GFXVDD=/sys/class/drm/card0/device/hwmon/hwmon0/in0_input
FILE_POW=/sys/class/drm/card0/device/hwmon/hwmon0/power1_average
FILE_BUS=/sys/class/drm/card0/device/gpu_busy_percent
# checking for privileges
if [ $UID -ne 0 ]
then
echo "Writing to sysfs requires privileges, relaunch as root"
exit 1
fi
function read_output {
SCLK=$(cat $FILE_SCLK)
MCLK=$(cat $FILE_MCLK)
TEMP=$(cat $FILE_TEMP)
FAN=$(cat $FILE_FAN)
GFXVDD=$(cat $FILE_GFXVDD)
POW=$(cat $FILE_POW)
BUS=$(cat $FILE_BUS)
# echo "sclk: $SCLK mclk: $MCLK gfx_vdd: $GFXVDD"
echo "sclk: $SCLK mclk: $MCLK temp: $TEMP fan: $FAN gfx_vdd: $GFXVDD pow:
$POW bus: $BUS"
}
function run_daemon {
while :; do
read_output
sleep $SLEEP_INTERVAL
done
}
# finally start the loop
run_daemon
######################################################</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>