How to Get the GPU Error State
For all GPU-hang bugs, the most useful information is on error state.
After a hang is detected all related and helpful information gets recorded in a error state that can be grabbed as instructed below.
It must be done after the hang, but before rebooting the machine.
Recent Kernel Version
On recent kernel you can grab this information from your sysfs:
$ cat /sys/class/drm/card0/error | gzip > error.gz
Please note, that depending on your environment, it can be a different card number. But, it is probably 0.
On old kernel but not older than 2.6.34 you need to get it from debugfs:
Anything from that file, other than "no error state collected", is very interesting and very helpful for bug reports.
 If you don't have a /sys/kernel/debug/dri directory, then make sure that debugfs is mounted like this:
sudo mount -t debugfs debugfs /sys/kernel/debug
 If you have n gpus, the directory could be also be:
Compress Instead of Crop
All information on this file is useful, so please never crop the file when attaching it to a bug report, Compress it instead.
Did you find the information on this page useful?