#!/bin/sh get(){ if [ ! -e $tardir/${@:$#} ] ; then mkdir -p $tardir/${@:$#} fi if [ -e $1 ] ; then cp -a ${@:1:$#-1} $tardir/${@:$#} 2>/dev/null fi } if [ -d /debug/dri ] ; then debugfs_path=/debug_dri fi if [ -d /sys/kernel/debug/dri ] ; then debugfs_path=/sys/kernel/debug/dri fi i915_debugfs=x for dir in `ls $debugfs_path` ; do if [ -f $debugfs_path/$dir/i915_error_state ] ; then i915_debugfs=$debugfs_path/$dir break fi done if [ $i915_debugfs = "x" ] ; then echo i915 debugfs path not found. exit 1 fi tmpdir=`mktemp -d` tardir=$tmpdir/intel_gpu_abrt mkdir $tardir get $i915_debugfs/* debugfs get /sys/module/i915/parameters/* mod_opts mkdir $tardir/X get /var/log/Xorg.0.log X get /var/log/Xorg.0.log.old X get /etc/X11/xorg.conf X get /etc/X11/xorg.conf.d/ X dmesg > $tardir/dmesg lspci -nn > $tardir/lspci (cd $tmpdir; tar -c intel_gpu_abrt ) > intel_gpu_abrt.tar rm $tmpdir -Rf exit 0