Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am fairly new to Ubuntu and I was wonder what a good way is to debug when something crashes?

For example: I installed 11.04 and the default media player banshee makes my laptop crash after a few minutes of playing music. Since the system completely freezes and there is not error message it's hard to find out what is wrong.

Second problem I have is that sometimes the system crashes to login. I am suspecting it to be a Chromium or Flash but I am not 100% sure.

So anybody got some tips on how to debug stuff like this?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Do not login using the login GUI after such a crash. Switch to a text-based login by pressing Ctrl + Alt + F1. Login with your username and password. Errors during a X session are appended to ~/.xsession-errors, but this file is overwritten every login. Make a backup of this file by executing:

mv ~/.xsession-errors{,.1}

This will rename the .xsession-errors file to .xsession_errors.1. Replace the .1 if you want a different suffix. You can now logout from this shell by executing exit.

Check the system logfiles in /var/log. The most interesting files are:

/var/log/kern.log
/var/log/Xorg.0.log (for the current session)
/var/log/Xorg.0.log.old (for previous session)
/var/log/?dm.log (gdm for gnome, kdm for KDE)
share|improve this answer
    
why not mention /var/crash/? This is where /var/log/apport.log sent me. –  David Jun 12 '12 at 17:08
    
/var/crash does not really contain human-readable error messages, but a file named like _usr_bin_Xorg.0.crash that can be submitted using Apport. –  Lekensteyn Jun 12 '12 at 17:14
    
That is what I meant apport.log told me a specific *.crash file to check; ls -ltrh /var/crash/ confirmed that it was generated during the previous crash; but I was thinking that next time I might start with ls -ltrh /var/crash/. –  David Jun 12 '12 at 21:27
add comment

All you have to do is to look at the log directory (/var/log/). You can find any crash or regular logs in there.

Some applications can create crash logs in their own directories. For example, ~/.banshee in your home directory.

share|improve this answer
    
Crash is a vague term. What exactly do you do if the system freezes completely and nothing out of the ordinary is in the logs? –  mikewhatever Aug 23 '11 at 3:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.