Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: When Linux(gasp!) hangs.

  1. #1
    Senior Member
    Join Date
    Jul 2002
    Posts
    225

    When Linux(gasp!) hangs.

    Linux is well known for being a rock-stable OS. X, the client-server based frontend usually used to provide GUI functionallity, however, is known for occasionally going south. In the interest of better understanding of how to deal with this frustrating occurance, I present this brief tutorial.

    Often times the unlucky X user will find himself faced with an X window that wont go away. It may refuse to refresh or even close. There are generally 2 ways of attempting to deal with this. If one is able to use a shell, one can run a command, such as:
    $ps -ax | grep process name
    $kill -9 offending pid

    An easier way to deal with this is a very handy program called xkill. this can be run from the shell, run from a menu, or in a pinch summoned with Ctrl-Alt-Esc. Just put the pointer over the offending window and click.

    Sometimes, problems with X can be much more serious. These are the times when the whole GUI locks up, or becomes so unresponsive that usual methods of logging off, or even rebooting, are unavailable. This doesn't always mean a forced unclean reboot. The protocol for dealing with this is often disabled in some linux distributions(and does require kernel support). To enable it, use your favorite editor(as root, of course) and open /etc/sysctl.conf and insert a line reading:

    kernel.sysrq = 1
    After doing that, you should be prepared for amost all X-based porkage
    Now next time X goes to sit under a tree, try this sequence of keystrokes:

    alt-sysrq-r (should unlock your keyboard. In some cases you may be able to stop here.)
    at-sysrq-k (kills all current processes on your virtual terminal.)
    alt-sysrq-s (syncs your hard drive.)
    alt-sysrq-u (unmounts your filesystems.)
    alt-sysrq-b (should give you a reboot!)

    If all goes well, you should be able to reboot and recover with your filesystems clean.

    None of this is new knowledge to many, but I felt it was good to put it here for all y'all linux newbies...

    Cheers
    \"Now it\'s time to erase the story of our bogus fate. Our history as it\'s portrayed is just a recipe for hate!\"
    -Bad Religion

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Posts
    144
    Thanks for the nice little bit of info. I will definitely try this out at home on my box when (god forbid) it ever crashes
    M$ support is like shooting yourself in the left foot and then putting a band-aid on the right one.

  3. #3
    Thanx for the tip.
    A great oak is the end result of a nut who stood his ground.

  4. #4
    Senior Member problemchild's Avatar
    Join Date
    Jul 2002
    Posts
    551
    Good post. I'm sure most people have run up against a misbehaved X app from time to time.

    I would just add that <Ctrl><Alt><Backspace> will kill the X server and drop you back to the command line (or restart the server and take you to the xdm login if you're in runlevel 5). Not very elegant, but it works.

    I didn't know the one about /etc/sysctl.conf. Nice job.
    Do what you want with the girl, but leave me alone!

  5. #5
    Senior Member
    Join Date
    Jul 2002
    Posts
    225
    Indeed Problem... I'd say I use ctrl-alt-backspace a lot more often then the sysrq stuff.
    \"Now it\'s time to erase the story of our bogus fate. Our history as it\'s portrayed is just a recipe for hate!\"
    -Bad Religion

  6. #6
    I find that apps run under KDE crash quite a bit, if not X entirely. I definitely appreciate this information!

  7. #7
    Junior Member
    Join Date
    Sep 2002
    Posts
    5
    I have had this happen to me before (not often though), and now i atleast know how to fix it. Thank you for that little tidbit.

  8. #8
    Senior Member
    Join Date
    May 2002
    Posts
    450
    My linux machine was suffering intermittent "freezes" sometimes up to two a day and sometimes after 9-10 days of operation.

    I tried all of the solutions above but to no avail. Could not telnet (ssh) into the machine or use it directly - it was locked fast - a complete power shutdown was the only solution.

    In the end it was hardware failure - the old Quantum 6.4gb HDD was dying - this has been replaced with a 20gb Seagate and the machine has been running for 40 days now without a glitch since, including much quieter operation.

    Just something to keep in mind also, while the OS was rock solid, my hardware wasn't !!

    Good post Dr Foobar

    PP


  9. #9
    Senior Member
    Join Date
    Aug 2002
    Posts
    115
    Phat_Penguin, I was having that same trouble. A complete freeze. It turned out to be the old hard drive also, or so I thought. I am glad to know that I am not the only one.
    Civilization. The death of dreams.

  10. #10
    Senior Member
    Join Date
    Aug 2002
    Posts
    508
    thanks for that .... that's wicked..
    Not an image or image does not exist!
    Not an image or image does not exist!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •