Difference between revisions of "Development:Debugging Adreno Crash"

From FEX-Emu Wiki
Jump to navigation Jump to search
 
Line 10: Line 10:
 
Sometimes the issue might be related to performance. You can set the GPU clocks to the maximum for testing
 
Sometimes the issue might be related to performance. You can set the GPU clocks to the maximum for testing
 
   cat /sys/devices/platform/soc@0/3d00000.gpu/devfreq/3d00000.gpu/max_freq | sudo tee /sys/devices/platform/soc@0/3d00000.gpu/devfreq/3d00000.gpu/min_freq
 
   cat /sys/devices/platform/soc@0/3d00000.gpu/devfreq/3d00000.gpu/max_freq | sudo tee /sys/devices/platform/soc@0/3d00000.gpu/devfreq/3d00000.gpu/min_freq
 +
 +
Sometimes the GPU might autosuspend and make counters contain bad data. Especially useful for long running compute stages
 +
  echo 5000 | sudo tee /sys/devices/platform/soc@0/3d00000.gpu/power/autosuspend_delay_ms
  
 
Probably some easier way to reach that node.
 
Probably some easier way to reach that node.
 +
  
 
== Seeing GPU load ==
 
== Seeing GPU load ==
 
If you want to know how loaded the GPU is.
 
If you want to know how loaded the GPU is.
 
   sudo cat /sys/kernel/debug/dri/0/perf
 
   sudo cat /sys/kernel/debug/dri/0/perf

Latest revision as of 16:35, 9 March 2023

Information from upstream

This is Adreno's documentation here. Has some good information about storing devcoredumps for GPU backtraces.

Timeout related

The default hangcheck timeout is only 250ms, this can be increased for testing purposes if suspected that for some reason it's just a long compute job.

 echo "20000" | sudo tee /sys/kernel/debug/dri/0/hangcheck_period_ms

Performance related

Sometimes the issue might be related to performance. You can set the GPU clocks to the maximum for testing

 cat /sys/devices/platform/soc@0/3d00000.gpu/devfreq/3d00000.gpu/max_freq | sudo tee /sys/devices/platform/soc@0/3d00000.gpu/devfreq/3d00000.gpu/min_freq

Sometimes the GPU might autosuspend and make counters contain bad data. Especially useful for long running compute stages

 echo 5000 | sudo tee /sys/devices/platform/soc@0/3d00000.gpu/power/autosuspend_delay_ms

Probably some easier way to reach that node.


Seeing GPU load

If you want to know how loaded the GPU is.

 sudo cat /sys/kernel/debug/dri/0/perf