diff options
Diffstat (limited to 'tools/intel_gpu_abrt')
-rwxr-xr-x | tools/intel_gpu_abrt | 69 |
1 files changed, 63 insertions, 6 deletions
diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt index 141a5246..4fbff768 100755 --- a/tools/intel_gpu_abrt +++ b/tools/intel_gpu_abrt @@ -1,5 +1,21 @@ #!/bin/sh +if [[ $UID -ne 0 ]]; then + echo "$0 must be run as root" + exit 1 +fi + +get(){ + if [ ! -e $tardir/${@:$#} ] ; then + mkdir -p $tardir/${@:$#} + fi + if [ -e $1 ] ; then + cp -a ${@:1:$#-1} $tardir/${@:$#} 2>/dev/null + fi +} + +igtdir=`dirname $0` + if [ -d /debug/dri ] ; then debugfs_path=/debug_dri fi @@ -25,21 +41,62 @@ tmpdir=`mktemp -d` tardir=$tmpdir/intel_gpu_abrt mkdir $tardir -mkdir $tardir/debugfs -cp $i915_debugfs/* $tardir/debugfs +get $i915_debugfs/* debugfs -mkdir $tardir/mod_opts -cp /sys/module/i915/parameters/* $tardir/mod_opts +get /sys/module/i915/parameters/* mod_opts mkdir $tardir/X -cp /var/log/Xorg.*.log $tardir/X -cp /etc/X11/xorg.conf $tardir/X +xrandr --verbose > $tardir/X/xrandr +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 +$igtdir/intel_reg_dumper > $tardir/intel_reg_dumper.txt +$igtdir/intel_bios_dumper $tardir/intel_bios_dump +$igtdir/intel_stepping > $tardir/intel_stepping + +echo 1 > /sys/devices/pci0000:00/0000:00:02.0/rom +cat /sys/devices/pci0000:00/0000:00:02.0/rom > $tardir/vbios.dump +echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom + (cd $tmpdir; tar -c intel_gpu_abrt ) > intel_gpu_abrt.tar rm $tmpdir -Rf +if [ -f intel_gpu_abrt.tar ] ; then + cat <<EOF +intel_gpu_abrt.tar has been created. + +Please attach it to https://bugs.freedesktop.org +with a good bug description as suggested in this template: + +System environment: +-- chipset: +-- system architecture: `uname -m` +-- xf86-video-intel: +-- xserver: `grep "X.Org X Server" /var/log/Xorg.0.log | awk '{print $NF}'` +-- mesa: +-- libdrm: `pkg-config --modversion libdrm` +-- kernel: `uname -r` +-- Linux distribution: +-- Machine or mobo model: +-- Display connector: + +Reproducing steps: + +Additional info: + +EOF exit 0 +else +cat <<EOF +Error on tarball generation. +For bug report, please follow manual instructions available at: +https://01.org/linuxgraphics/documentation/how-report-bugs-0 +EOF +exit 1 +fi |