c78ce6eb8b0f4cf8df97f479cd0558764b392744
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
/X11R
6/lib
11 LOCAL_LIBS
=/usr
/local
/lib
13 # Pretty echo, underline the specified string:
16 echo "$@"|
sed 's/./-/g'
21 if [ -e "$SERVER_SYMLINK" ]; then
22 pecho
"X server symlink status:"
23 ls -dl "$SERVER_SYMLINK"
24 ls -dl "$(readlink "$SERVER_SYMLINK")"
26 echo "$SERVER_SYMLINK does not exist."
29 if ! [ -L "$SERVER_SYMLINK" ]; then
30 echo "$SERVER_SYMLINK is not a symlink."
33 if ! [ -x "$SERVER_SYMLINK" ]; then
34 echo "$SERVER_SYMLINK is not executable."
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"
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"
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
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'
61 echo "The lspci command was not found; not including PCI data."
66 if [ -e "$XORGCONFIG" ]; then
67 pecho
"Xorg X server configuration file status:"
70 pecho
"Contents of $XORGCONFIG:"
71 iconv -c -t ascii
"$XORGCONFIG"
73 echo "$XORGCONFIG does not exist."
78 if [ -d "$XORGCONFIG_DIR" ]; then
79 pecho
"Contents of $XORGCONFIG_DIR:"
80 ls -l "$XORGCONFIG_DIR"
82 echo "$XORGCONFIG_DIR does not exist."
87 KMS_CONFS_DIR
=/etc
/modprobe.d
88 KMS_CONFS
=$
(ls $KMS_CONFS_DIR/*-kms.conf
2>/dev
/null
)
90 if [ -n "$KMS_CONFS" ]; then
91 pecho
"KMS configuration files:"
92 for CONF
in $KMS_CONFS; do
94 # Indent, and get rid of empty lines:
95 sed 's/^/ /' < "$CONF"|
egrep -v '^\s*$'
98 echo "$KMS_CONFS_DIR contains no KMS configuration files."
103 KERNEL_VERSION
=/proc
/version
105 if [ -e "$KERNEL_VERSION" ]; then
106 pecho
"Kernel version ($KERNEL_VERSION):"
109 echo "No kernel version found (missing $KERNEL_VERSION)."
114 XORG_LOGS
=$
(ls -dt /var
/log
/Xorg.
*.log
2>/dev
/null
)
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
120 for LOG
in $XORG_LOGS; do
121 if [ -f "$LOG" ]; then
122 pecho
"Contents of most recent Xorg X server log file ($LOG):"
124 # the log files are large; only show the most recent
129 echo "No Xorg X server log files found."
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 "" }'
140 if [ -x /bin
/dmesg
]; then
141 pecho
"DRM Information from dmesg:"
142 dmesg |
egrep -i 'drm|agp'
146 # vim:set ai et sts=4 sw=4 tw=0: