Add patch that contain Mali fixes.
[deb_xorg-server.git] / debian / xserver-xorg-core.bug.script
1 #!/bin/sh
2
3 PATH="/sbin:$PATH"
4 CONFIG_DIR=/etc/X11
5 SERVER_BINARY=/usr/bin/Xorg
6 SERVER_SYMLINK="$CONFIG_DIR/X"
7 XORGCONFIG="$CONFIG_DIR/xorg.conf"
8 XORGCONFIG_DIR="$CONFIG_DIR/xorg.conf.d"
9 CONFIG_AUX_DIR=/var/lib/x11
10 X11R6_LIBS=/usr/X11R6/lib
11 LOCAL_LIBS=/usr/local/lib
12
13 # Pretty echo, underline the specified string:
14 pecho() {
15 echo "$@"
16 echo "$@"|sed 's/./-/g'
17 }
18
19 exec >&3
20
21 if [ -e "$SERVER_SYMLINK" ]; then
22 pecho "X server symlink status:"
23 ls -dl "$SERVER_SYMLINK"
24 ls -dl "$(readlink "$SERVER_SYMLINK")"
25 else
26 echo "$SERVER_SYMLINK does not exist."
27 fi
28
29 if ! [ -L "$SERVER_SYMLINK" ]; then
30 echo "$SERVER_SYMLINK is not a symlink."
31 fi
32
33 if ! [ -x "$SERVER_SYMLINK" ]; then
34 echo "$SERVER_SYMLINK is not executable."
35 fi
36
37 echo
38
39 if ldd "$SERVER_BINARY" | grep -qs "$LOCAL_LIBS"; then
40 pecho "The server is using local libraries!"
41 ldd "$SERVER_BINARY" | grep "$LOCAL_LIBS"
42 echo
43 fi
44
45 if ldd "$SERVER_BINARY" | grep -qs "$X11R6_LIBS"; then
46 pecho "The server is using obsolete libraries!"
47 ldd "$SERVER_BINARY" | grep "$X11R6_LIBS"
48 echo
49 fi
50
51 if dpkg-divert --list | grep -qs -i libgl; then
52 pecho "Diversions concerning libGL are in place"
53 dpkg-divert --list | grep -i libgl
54 echo
55 fi
56
57 if which lspci > /dev/null 2>&1; then
58 pecho "VGA-compatible devices on PCI bus:"
59 LC_ALL=C lspci -nn | grep 'VGA compatible controller'
60 else
61 echo "The lspci command was not found; not including PCI data."
62 fi
63
64 echo
65
66 if [ -e "$XORGCONFIG" ]; then
67 pecho "Xorg X server configuration file status:"
68 ls -dl "$XORGCONFIG"
69 echo
70 pecho "Contents of $XORGCONFIG:"
71 iconv -c -t ascii "$XORGCONFIG"
72 else
73 echo "$XORGCONFIG does not exist."
74 fi
75
76 echo
77
78 if [ -d "$XORGCONFIG_DIR" ]; then
79 pecho "Contents of $XORGCONFIG_DIR:"
80 ls -l "$XORGCONFIG_DIR"
81 else
82 echo "$XORGCONFIG_DIR does not exist."
83 fi
84
85 echo
86
87 KMS_CONFS_DIR=/etc/modprobe.d
88 KMS_CONFS=$(ls $KMS_CONFS_DIR/*-kms.conf 2>/dev/null)
89
90 if [ -n "$KMS_CONFS" ]; then
91 pecho "KMS configuration files:"
92 for CONF in $KMS_CONFS; do
93 echo "$CONF:"
94 # Indent, and get rid of empty lines:
95 sed 's/^/ /' < "$CONF"|egrep -v '^\s*$'
96 done
97 else
98 echo "$KMS_CONFS_DIR contains no KMS configuration files."
99 fi
100
101 echo
102
103 KERNEL_VERSION=/proc/version
104
105 if [ -e "$KERNEL_VERSION" ]; then
106 pecho "Kernel version ($KERNEL_VERSION):"
107 cat /proc/version
108 else
109 echo "No kernel version found (missing $KERNEL_VERSION)."
110 fi
111
112 echo
113
114 XORG_LOGS=$(ls -dt /var/log/Xorg.*.log 2>/dev/null)
115
116 if [ -n "$XORG_LOGS" ]; then
117 pecho "Xorg X server log files on system:"
118 ls -dlrt /var/log/Xorg.*.log 2>/dev/null
119 echo
120 for LOG in $XORG_LOGS; do
121 if [ -f "$LOG" ]; then
122 pecho "Contents of most recent Xorg X server log file ($LOG):"
123 cat "$LOG"
124 # the log files are large; only show the most recent
125 break
126 fi
127 done
128 else
129 echo "No Xorg X server log files found."
130 fi
131
132 echo
133
134 if [ -x /sbin/udevadm ]; then
135 pecho "udev information:"
136 /sbin/udevadm info --export-db | awk -F '\n' -v RS='\n\n' '/E: ID_INPUT/ { print; print "" }'
137 echo
138 fi
139
140 if [ -x /bin/dmesg ]; then
141 pecho "DRM Information from dmesg:"
142 dmesg | egrep -i 'drm|agp'
143 echo
144 fi
145
146 # vim:set ai et sts=4 sw=4 tw=0: