[ubuntu-studio-devel] Scripts to help users troubleshooting

Ralf Mardorf ralf.mardorf at rocketmail.com
Sun Feb 7 17:10:57 UTC 2016


perhaps Ubuntu Studio should include a few scripts, that could be used
by inexperienced users, to provide troubleshooting information, if they
wish to send a request for help.

I already wrote a small script, that writes a small log file.

[weremouse at moonstudio ~]$ ls -hGg /usr/local/bin/troubleshoot_graphics_and_dm-0.1
-rwxrwxr-x 1 2.2K Feb  7 17:33 /usr/local/bin/troubleshoot_graphics_and_dm-0.1
[weremouse at moonstudio ~]$ ls -hGg /var/log/ubuntu_studio_graphics_dm.log 
-rw-r--r-- 1 4.5K Feb  7 17:49 /var/log/ubuntu_studio_graphics_dm.log

The script
there should be no line wrapping issue, copy and paste should work

[weremouse at moonstudio ~]$ cat /usr/local/bin/troubleshoot_graphics_and_dm-0.1 


[[ "$(id -u)" != "0" ]]\
  && printf $i"Run :\033[0m sudo $(basename $0)\n" && exit

printf "Script:      $(basename $0)\n"                   > $of
printf "Output file: $of\n"                             >> $of
printf "$(date)\n\n"                                    >> $of
echo "Description:"$(lsb_release -d | cut -d":" -f2)    >> $of
echo "Codename:   "$(lsb_release -c | cut -d":" -f2)    >> $of
echo "Arch:        "$(uname -m)                         >> $of
echo "Linux:       "$(uname -r)                         >> $of

printf "\nInstalled linux-headers* packages:\n"         >> $of
lh=$(dpkg -l linux-headers* | grep ii | cut -d" " -f3)
case $lh in
   echo "no packages found matching linux-headers*"     >> $of
   printf $i"Ignore any message                                   "$n
   printf $i"dpkg-query: no packages found matching linux-headers*"$n
   printf $i"Report other messages.                               "$n
   echo "$lh"                                           >> $of

printf "\n# lspci -nn | grep VGA ###\n"                 >> $of
lspci -nn | grep VGA                                    >> $of

printf "\n# grep -i driver /var/log/Xorg.0.log  ###\n"  >> $of
grep -i driver /var/log/Xorg.0.log                      >> $of

printf "\n# grep EE /var/log/Xorg.0.log ###\n"          >> $of
grep EE /var/log/Xorg.0.log                             >> $of

printf "\n# tail -n20 /var/log/lightdm/x-0.log ###\n"   >> $of
tail -n20 /var/log/lightdm/x-0.log                      >> $of

printf "\n# tail /var/log/lightdm/lightdm.log ###\n"    >> $of
tail /var/log/lightdm/lightdm.log                       >> $of

printf "\n# grep -nv '^$' /var/log/lightdm/x-1-greeter.log\
       | grep -v GLib-GObject-WARNING ### \n"           >> $of
grep -nv '^$' /var/log/lightdm/x-1-greeter.log\
       | grep -v GLib-GObject-WARNING                   >> $of

printf "\n"$i"Post the file                                        "$n
printf "$i$of               "$n
printf $i"to an Ubuntu Studio support channel.                 \n"$n

A log file does look like this

[weremouse at moonstudio ~]$ cat /var/log/ubuntu_studio_graphics_dm.log 
Script:      troubleshoot_graphics_and_dm-0.1
Output file: /var/log/ubuntu_studio_graphics_dm.log
Sun Feb  7 17:49:06 CET 2016

Description: Ubuntu 15.10
Codename:    wily
Arch:        x86_64
Linux:       4.2.0-27-lowlatency

Installed linux-headers* packages:

# lspci -nn | grep VGA ###
01:05.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] RS690 [Radeon X1200] [1002:791e]

# grep -i driver /var/log/Xorg.0.log  ###
[    16.419] 	X.Org Video Driver: 19.0
[    16.419] 	X.Org XInput driver : 21.0
[    16.660] (II) Loading /usr/lib/xorg/modules/drivers/radeon_drv.so
[    16.689] 	Module class: X.Org Video Driver
[    16.689] 	ABI class: X.Org Video Driver, version 19.0
[    16.689] (II) RADEON: Driver for ATI Radeon chipsets:
[    16.720] 	ABI class: X.Org Video Driver, version 19.0
[    17.492] (II) RADEON(0): EXA: Driver will allow EXA pixmaps in VRAM
[    17.536] (II) RADEON(0): [DRI2]   DRI driver: r300
[    17.536] (II) RADEON(0): [DRI2]   VDPAU driver: r300
[    17.537] (II) EXA(0): Driver allocated offscreen pixmaps
[    17.537] (II) EXA(0): Driver registered support for the following operations:
[    18.436] 	Module class: X.Org XInput Driver
[    18.436] 	ABI class: X.Org XInput driver, version 21.0
[    18.436] (II) Using input driver 'evdev' for 'Power Button'
[    18.442] (II) Using input driver 'evdev' for 'Power Button'
[    18.444] (II) Using input driver 'evdev' for 'USB Optical Mouse'
[    18.508] (II) No input driver specified, ignoring this device.
[    18.508] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'

# grep EE /var/log/Xorg.0.log ###
[    16.167] Current Operating System: Linux moonstudio 4.2.0-27-lowlatency #32-Ubuntu SMP PREEMPT Fri Jan 22 05:55:23 UTC 2016 x86_64
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.

# tail -n20 /var/log/lightdm/x-0.log ###

X.Org X Server 1.17.2
Release Date: 2015-06-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.13.0-68-generic x86_64 Ubuntu
Current Operating System: Linux moonstudio 4.2.0-27-lowlatency #32-Ubuntu SMP PREEMPT Fri Jan 22 05:55:23 UTC 2016 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-lowlatency root=UUID=f705d2d5-0c6a-4338-8435-1bb56d7b6b19 ro
Build Date: 12 November 2015  05:33:29PM
xorg-server 2:1.17.2-1ubuntu9.1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.32.6
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Feb  7 12:51:35 2016
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) [KMS] Kernel modesetting enabled.

# tail /var/log/lightdm/lightdm.log ###
[+17.67s] DEBUG: Seat seat0: Session stopped
[+17.67s] DEBUG: Seat seat0: Greeter stopped, running session
[+17.67s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+17.68s] DEBUG: Session pid=618: Running command /usr/sbin/lightdm-session /usr/bin/openbox-session
[+17.68s] DEBUG: Creating shared data directory /var/lib/lightdm-data/weremouse
[+17.68s] DEBUG: Session pid=618: Logging to .xsession-errors
[+17.87s] DEBUG: Activating VT 7
[+17.87s] DEBUG: Activating login1 session c2
[+17.87s] DEBUG: Seat seat0 changes active session to c2
[+17.87s] DEBUG: Session c2 is already active

# grep -nv '^$' /var/log/lightdm/x-1-greeter.log       | grep -v GLib-GObject-WARNING ### 
1:** Message: Starting lightdm-gtk-greeter 2.0.1 (Aug  7 2015, 01:24:18)
2:** Message: [Configuration] Reading file: /etc/lightdm/lightdm-gtk-greeter.conf.d/01_ubuntu.conf
3:** Message: [Configuration] Reading file: /etc/lightdm/lightdm-gtk-greeter.conf
5:** (lightdm-gtk-greeter:12462): WARNING **: [PIDs] Failed to execute command: upstart
13:** (lightdm-gtk-greeter:12462): WARNING **: [Background] Failed to load background: Failed to open file '/usr/share/backgrounds/warty-final-ubuntu.png': No such file or directory
15:** (lightdm-gtk-greeter:12462): WARNING **: [Background] Failed to read wallpaper: /usr/share/backgrounds/warty-final-ubuntu.png


More information about the ubuntu-studio-devel mailing list