What's the correct way to kill X via remote SSH? - X

This is a discussion on What's the correct way to kill X via remote SSH? - X ; Hello. A few times, I had to kill X.org session because it froze or whatever but my Linux/Debian isn't frozen. I connect to the box with ssh and kill (with -9 parameter) everything related to X like xorg, startx, KDE, ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 25

Thread: What's the correct way to kill X via remote SSH?

  1. What's the correct way to kill X via remote SSH?

    Hello.

    A few times, I had to kill X.org session because it froze or whatever
    but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    (with -9 parameter) everything related to X like xorg, startx, KDE, etc.

    However, on the physical computer with the LCD monitor that ran startx,
    it did not return to console. It is blank black with no cursor, texts,
    pixels, etc. I don't know if it is still stuck in X. I can't even do a
    ctrl-alt-backspace to kill X if it is really still running. I also tried
    ctrl-alt-F# (# is from 1 to 4) and alt-F# (# is from 7 to 9). Even
    keyboard lights don't respond. I checked everything with ps aux and lsof
    as root. Nothing odd to see X.

    The only way to fix this is to shutdown -r now to reboot back to it. Am
    I doing this wrong or something to correctly kill X remotely via SSH?

    Thank you in advance.
    --
    "I've been on some fairways that are as good as the greens we putted on
    back then. We had crab grass. I remember one green where I putted
    through ants." --Sam Snead
    /\___/\
    / /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Please remove ANT if replying by e-mail.
    ( )

  2. Re: What's the correct way to kill X via remote SSH?

    ["Followup-To:" header set to comp.os.linux.x.]
    Ant staggered into the Black Sun and said:
    > A few times, I had to kill [my X] session because it froze or
    > whatever[,] but [the rest of the stuff running on] my Debian [box]
    > isn't frozen. I connect to the box with ssh and kill (with -9
    > parameter) everything related to X like xorg, startx, KDE, etc.
    >
    > However, on the computer with the LCD monitor that ran startx, it did
    > not return to [the] console. It is blank black with no cursor, [text],
    > pixels, etc.


    Probably a buggy X module. I've seen similar symptoms with both fglrx
    and nvidia on a few different cards. You're using the evil binary-only
    nVidia module, right? Go up or down a version if that's the case.
    Whatever X module you're using, post its name, its version#, and the
    make+model of your video card.

    > Even keyboard lights don't respond. I checked everything with ps aux
    > and lsof as root. Nothing odd to see X.


    Your last sentence is ambiguous. What do you mean? If necessary, grab
    someone who reads+writes your native language and also reads+writes
    English well, and have them proofread/translate.

    > Am I doing this wrong or [do I have to do] something to correctly kill
    > X remotely via SSH?


    If the X module is working properly, any time the X server dies, it
    should respawn with no problems. This should happen whether X was
    killed with TERM or KILL or Ctrl-Alt-Bkspace or your WM/DE's "log out"
    function. If the X module *isn't* working properly, your WM/DE's logout
    function will also display this behavior. So you might want to try that
    once just for kicks. HTH anyway,

    --
    If you're looking for trouble, I can offer you a wide selection.
    My blog and resume: http://crow202.dyndns.org:8080/wordpress/
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see

  3. Re: What's the correct way to kill X via remote SSH?

    > > A few times, I had to kill [my X] session because it froze or
    > > whatever[,] but [the rest of the stuff running on] my Debian [box]
    > > isn't frozen. I connect to the box with ssh and kill (with -9
    > > parameter) everything related to X like xorg, startx, KDE, etc.
    > >
    > > However, on the computer with the LCD monitor that ran startx, it did
    > > not return to [the] console. It is blank black with no cursor, [text],
    > > pixels, etc.


    > Probably a buggy X module. I've seen similar symptoms with both fglrx
    > and nvidia on a few different cards. You're using the evil binary-only
    > nVidia module, right? Go up or down a version if that's the case.
    > Whatever X module you're using, post its name, its version#, and the
    > make+model of your video card.


    Yes, I am using NVIDIA's binary drivers (compiled from its downloaded
    file from the Web site like
    http://us.download.nvidia.com/XFree8...69.12-pkg1.run
    ). I have seen this problem for years and on three different NVIDIA
    cards if I remember it correctly. It's just rare that I have to kill X
    because something happened and it is not responding. I think of all of
    those type of crashes, I had to reboot via ssh.


    > > Even keyboard lights don't respond. I checked everything with ps aux
    > > and lsof as root. Nothing odd to see X.


    > Your last sentence is ambiguous. What do you mean? If necessary, grab
    > someone who reads+writes your native language and also reads+writes
    > English well, and have them proofread/translate.


    Sorry, English isn't my strong point.

    When the incident happens, my keyboard lights do not turn on and off
    like it should in X and console modes. While the incident is happening,
    I checked ps aux and lsof as root in ssh to see if I have any X
    processes. I didn't see any.


    > > Am I doing this wrong or [do I have to do] something to correctly kill
    > > X remotely via SSH?


    > If the X module is working properly, any time the X server dies, it
    > should respawn with no problems. This should happen whether X was
    > killed with TERM or KILL or Ctrl-Alt-Bkspace or your WM/DE's "log out"
    > function. If the X module *isn't* working properly, your WM/DE's logout
    > function will also display this behavior. So you might want to try that
    > once just for kicks. HTH anyway,


    I can ctrl-alt-backspace, exit normally, etc. just fine. Those will
    shutdown X properly. It's not when I have to kill X via SSH because it
    doesn't respond.
    --
    "I've been on some fairways that are as good as the greens we putted on
    back then. We had crab grass. I remember one green where I putted
    through ants." --Sam Snead
    /\___/\
    / /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Please remove ANT if replying by e-mail.
    ( )

  4. Re: What's the correct way to kill X via remote SSH?

    ANTant@zimage.com (Ant) writes:

    >Hello.


    >A few times, I had to kill X.org session because it froze or whatever
    >but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    >(with -9 parameter) everything related to X like xorg, startx, KDE, etc.


    >However, on the physical computer with the LCD monitor that ran startx,
    >it did not return to console. It is blank black with no cursor, texts,
    >pixels, etc. I don't know if it is still stuck in X. I can't even do a
    >ctrl-alt-backspace to kill X if it is really still running. I also tried
    >ctrl-alt-F# (# is from 1 to 4) and alt-F# (# is from 7 to 9). Even
    >keyboard lights don't respond. I checked everything with ps aux and lsof
    >as root. Nothing odd to see X.


    X grabs the keyboard. Killing X with -9 is liable to leave the keyboard
    bereft with nowhere to send characters.
    I would be a bit more circumspect. Do not kill with -9. I would start with
    startx, or rather I would start with logging the user out (killing the
    original bash)


    >The only way to fix this is to shutdown -r now to reboot back to it. Am
    >I doing this wrong or something to correctly kill X remotely via SSH?


    >Thank you in advance.
    >--
    >"I've been on some fairways that are as good as the greens we putted on
    >back then. We had crab grass. I remember one green where I putted
    >through ants." --Sam Snead
    > /\___/\
    > / /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    >| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    > \ _ / Please remove ANT if replying by e-mail.
    > ( )


  5. Re: What's the correct way to kill X via remote SSH?

    On Wed, 12 Mar 2008 17:50:07 -0500, Ant wrote:

    > Hello.
    >
    > A few times, I had to kill X.org session because it froze or whatever
    > but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    > (with -9 parameter) everything related to X like xorg, startx, KDE, etc.
    >
    > However, on the physical computer with the LCD monitor that ran startx,
    > it did not return to console. It is blank black with no cursor, texts,
    > pixels, etc. I don't know if it is still stuck in X. I can't even do a
    > ctrl-alt-backspace to kill X if it is really still running. I also tried
    > ctrl-alt-F# (# is from 1 to 4) and alt-F# (# is from 7 to 9). Even
    > keyboard lights don't respond. I checked everything with ps aux and lsof
    > as root. Nothing odd to see X.
    >
    > The only way to fix this is to shutdown -r now to reboot back to it. Am
    > I doing this wrong or something to correctly kill X remotely via SSH?
    >
    > Thank you in advance.


    I don't know your system, but can you tell kdm or gdm to
    restart with something like this?...

    /etc/init.d/gdm restart

    This works on my system sometimes.

    stonerfish

    stonerfish

  6. Re: What's the correct way to kill X via remote SSH?

    On Wed, 12 Mar 2008 22:50:07 UTC in comp.os.linux.hardware, ANTant@zimage.com
    (Ant) wrote:

    >
    > The only way to fix this is to shutdown -r now to reboot back to it. Am
    > I doing this wrong or something to correctly kill X remotely via SSH?


    You could try reading /usr/src/linux/Documentation/sysrq.txt, specifically the
    part about raw mode.

    'r' - Turns off keyboard raw mode and sets it to XLATE.

    Well, un'R'aw is very handy when your X server or a svgalib program crashes.


    --
    Trevor Hemsley, Brighton, UK
    Trevor dot Hemsley at ntlworld dot com

  7. Re: What's the correct way to kill X via remote SSH?

    On Wed, 12 Mar 2008 17:50:07 -0500, Ant wrote:
    >Hello.


    >A few times, I had to kill X.org session because it froze or whatever
    >but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    >(with -9 parameter) everything related to X like xorg, startx, KDE, etc.


    It depends on how you started X. The usual methods are 'init 3' (or telinit 3)
    or /etc/init.d/xdm (gdm kdm whatever) stop



  8. Re: What's the correct way to kill X via remote SSH?

    ["Followup-To:" header set to comp.os.linux.misc.]
    AZ Nomad :
    > On Wed, 12 Mar 2008 17:50:07 -0500, Ant wrote:
    > >Hello.

    >
    > >A few times, I had to kill X.org session because it froze or whatever
    > >but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    > >(with -9 parameter) everything related to X like xorg, startx, KDE, etc.

    >
    > It depends on how you started X. The usual methods are 'init 3' (or telinit 3)


    Better, see /etc/inittab. On Debian:

    # Runlevel 0 is halt.
    # Runlevel 1 is single-user.
    # Runlevels 2-5 are multi-user.
    # Runlevel 6 is reboot.

    > or /etc/init.d/xdm (gdm kdm whatever) stop


    Best solution if X is dm based.


    --
    Any technology distinguishable from magic is insufficiently advanced.
    (*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
    - - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.

  9. Re: What's the correct way to kill X via remote SSH?

    On 3/12/2008 4:49 PM PT, Unruh typed:

    >> A few times, I had to kill X.org session because it froze or whatever
    >> but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    >> (with -9 parameter) everything related to X like xorg, startx, KDE, etc.

    >
    >> However, on the physical computer with the LCD monitor that ran startx,
    >> it did not return to console. It is blank black with no cursor, texts,
    >> pixels, etc. I don't know if it is still stuck in X. I can't even do a
    >> ctrl-alt-backspace to kill X if it is really still running. I also tried
    >> ctrl-alt-F# (# is from 1 to 4) and alt-F# (# is from 7 to 9). Even
    >> keyboard lights don't respond. I checked everything with ps aux and lsof
    >> as root. Nothing odd to see X.

    >
    > X grabs the keyboard. Killing X with -9 is liable to leave the keyboard
    > bereft with nowhere to send characters.
    > I would be a bit more circumspect. Do not kill with -9. I would start with
    > startx, or rather I would start with logging the user out (killing the
    > original bash)


    Hmm, I did kill -9 startx first. And then other processes including bash.
    --
    "Better (to be) an ant's head than a lion's tail." --Armenian and Maltese
    /\___/\
    / /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
    ( ) or ANTant@zimage.com
    Ant is currently not listening to any songs on his home computer.

  10. Re: What's the correct way to kill X via remote SSH?

    On 3/12/2008 5:30 PM PT, jellybean stonerfish typed:

    >> A few times, I had to kill X.org session because it froze or whatever
    >> but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    >> (with -9 parameter) everything related to X like xorg, startx, KDE, etc.
    >>
    >> However, on the physical computer with the LCD monitor that ran startx,
    >> it did not return to console. It is blank black with no cursor, texts,
    >> pixels, etc. I don't know if it is still stuck in X. I can't even do a
    >> ctrl-alt-backspace to kill X if it is really still running. I also tried
    >> ctrl-alt-F# (# is from 1 to 4) and alt-F# (# is from 7 to 9). Even
    >> keyboard lights don't respond. I checked everything with ps aux and lsof
    >> as root. Nothing odd to see X.
    >>
    >> The only way to fix this is to shutdown -r now to reboot back to it. Am
    >> I doing this wrong or something to correctly kill X remotely via SSH?
    >>
    >> Thank you in advance.

    >
    > I don't know your system, but can you tell kdm or gdm to
    > restart with something like this?...
    >
    > /etc/init.d/gdm restart
    >
    > This works on my system sometimes.


    I don't use gdm and gdm. I tell my Debian/Linux to boot to text mode. I
    log in, go to bash, and then use "startx". I am old school.
    --
    "Where the sugar is, there will the ant be also." --Philippines
    /\___/\
    / /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
    ( ) or ANTant@zimage.com
    Ant is currently not listening to any songs on his home computer.

  11. Re: What's the correct way to kill X via remote SSH?

    On 3/12/2008 5:34 PM PT, Trevor Hemsley typed:

    >> The only way to fix this is to shutdown -r now to reboot back to it. Am
    >> I doing this wrong or something to correctly kill X remotely via SSH?

    >
    > You could try reading /usr/src/linux/Documentation/sysrq.txt, specifically the
    > part about raw mode.
    >
    > 'r' - Turns off keyboard raw mode and sets it to XLATE.
    >
    > Well, un'R'aw is very handy when your X server or a svgalib program crashes.


    Don't have it:

    $ cat /usr/src/linux/Documentation/sysrq.txt
    cat: /usr/src/linux/Documentation/sysrq.txt: No such file or directory

    I did a "locate" command and it didn't find it.
    --
    "Ants live safely till they have gotten wings." --unknown
    /\___/\
    / /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
    ( ) or ANTant@zimage.com
    Ant is currently not listening to any songs on his home computer.

  12. Re: What's the correct way to kill X via remote SSH?

    On 3/12/2008 6:58 PM PT, AZ Nomad typed:

    > On Wed, 12 Mar 2008 17:50:07 -0500, Ant wrote:
    >> Hello.

    >
    >> A few times, I had to kill X.org session because it froze or whatever
    >> but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    >> (with -9 parameter) everything related to X like xorg, startx, KDE, etc.

    >
    > It depends on how you started X. The usual methods are 'init 3' (or telinit 3)
    > or /etc/init.d/xdm (gdm kdm whatever) stop


    I don't use gdm and gdm. I tell my Debian/Linux to boot to text mode. I
    log in, go to bash, and then use "startx". I am old school.
    --
    "I once heard the survivors of a colony of ants that had been partially
    obliterated by a cow's foot seriously debating the intention of the gods
    towards their civilization" --Archy the ****roach from Don Marquis'
    "Archy and Mehitabel" book ("Certain Maxims of Archy" poem)
    /\___/\
    / /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
    ( ) or ANTant@zimage.com
    Ant is currently not listening to any songs on his home computer.

  13. Re: What's the correct way to kill X via remote SSH?

    In comp.os.linux.misc Ant wrote:
    > I did kill -9 startx first. And then other processes including bash.


    Try not to use -9 as a first hit. Just "kill" on its own[*] should
    work - and it gives the application a chance to tidy up after itself
    (in this case, releasing the screen and/or keyboard, for example).

    Typically, I find that a sequence of kill, kill -1, kill -9 is best. (Or
    the corresponding killall.) It's not often I have to resort to the
    -9 hammer.

    [*] Well, "kill" followed directly by the PID(s), of course

    Chris

  14. Re: What's the correct way to kill X via remote SSH?

    Ant writes:

    > On 3/12/2008 5:30 PM PT, jellybean stonerfish typed:
    >
    >>> A few times, I had to kill X.org session because it froze or
    >>> whatever but my Linux/Debian isn't frozen. I connect to the box
    >>> with ssh and kill (with -9 parameter) everything related to X like
    >>> xorg, startx, KDE, etc.
    >>>
    >>> However, on the physical computer with the LCD monitor that ran
    >>> startx, it did not return to console. It is blank black with no
    >>> cursor, texts, pixels, etc. I don't know if it is still stuck in
    >>> X. I can't even do a ctrl-alt-backspace to kill X if it is really
    >>> still running. I also tried ctrl-alt-F# (# is from 1 to 4) and
    >>> alt-F# (# is from 7 to 9). Even keyboard lights don't respond. I
    >>> checked everything with ps aux and lsof as root. Nothing odd to see
    >>> X.
    >>>
    >>> The only way to fix this is to shutdown -r now to reboot back to
    >>> it. Am I doing this wrong or something to correctly kill X remotely
    >>> via SSH?
    >>>
    >>> Thank you in advance.

    >> I don't know your system, but can you tell kdm or gdm to
    >> restart with something like this?...
    >> /etc/init.d/gdm restart
    >> This works on my system sometimes.

    >
    > I don't use gdm and gdm. I tell my Debian/Linux to boot to text
    > mode. I log in, go to bash, and then use "startx". I am old school.


    Then kill the process holding the session in your .xinitrc.
    That's the program that is invoked with exec or without an ampersand.
    For most users that's the window manager.

    That may or may not release a hosed X.

  15. Re: What's the correct way to kill X via remote SSH?

    On 3/13/2008 4:38 AM PT, Chris Davies typed:

    > In comp.os.linux.misc Ant wrote:
    >> I did kill -9 startx first. And then other processes including bash.

    >
    > Try not to use -9 as a first hit. Just "kill" on its own[*] should
    > work - and it gives the application a chance to tidy up after itself
    > (in this case, releasing the screen and/or keyboard, for example).


    Alright, I will try that next time.


    > Typically, I find that a sequence of kill, kill -1, kill -9 is best. (Or
    > the corresponding killall.) It's not often I have to resort to the
    > -9 hammer.


    OK.


    >[*] Well, "kill" followed directly by the PID(s), of course


    Yea.
    --
    "... Our world is not an ant farm!" --Duncan MacLeod (Highlander Season
    3 Finale Part II)
    /\___/\
    / /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
    ( ) or ANTant@zimage.com
    Ant is currently not listening to any songs on his home computer.

  16. Re: What's the correct way to kill X via remote SSH?

    On 3/13/2008 6:16 AM PT, Dan Espen typed:

    >>>> A few times, I had to kill X.org session because it froze or
    >>>> whatever but my Linux/Debian isn't frozen. I connect to the box
    >>>> with ssh and kill (with -9 parameter) everything related to X like
    >>>> xorg, startx, KDE, etc.
    >>>>
    >>>> However, on the physical computer with the LCD monitor that ran
    >>>> startx, it did not return to console. It is blank black with no
    >>>> cursor, texts, pixels, etc. I don't know if it is still stuck in
    >>>> X. I can't even do a ctrl-alt-backspace to kill X if it is really
    >>>> still running. I also tried ctrl-alt-F# (# is from 1 to 4) and
    >>>> alt-F# (# is from 7 to 9). Even keyboard lights don't respond. I
    >>>> checked everything with ps aux and lsof as root. Nothing odd to see
    >>>> X.
    >>>>
    >>>> The only way to fix this is to shutdown -r now to reboot back to
    >>>> it. Am I doing this wrong or something to correctly kill X remotely
    >>>> via SSH?
    >>>>
    >>>> Thank you in advance.
    >>> I don't know your system, but can you tell kdm or gdm to
    >>> restart with something like this?...
    >>> /etc/init.d/gdm restart
    >>> This works on my system sometimes.

    >> I don't use gdm and gdm. I tell my Debian/Linux to boot to text
    >> mode. I log in, go to bash, and then use "startx". I am old school.

    >
    > Then kill the process holding the session in your .xinitrc.
    > That's the program that is invoked with exec or without an ampersand.
    > For most users that's the window manager.
    >
    > That may or may not release a hosed X.


    So basically, startkde command? Then, yes I tried that too if it was in
    memory with kill -9 command. Someone said -9 was bad and said to use
    regular "kill" with -9.
    --
    "To conquer the world, we must be as meticulus and calculating as a
    colony of ants on the march." --Julius Caesar
    /\___/\
    / /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
    ( ) or ANTant@zimage.com
    Ant is currently not listening to any songs on his home computer.

  17. Re: What's the correct way to kill X via remote SSH?

    Ant wrote:
    > Hello.
    >
    > A few times, I had to kill X.org session because it froze or whatever
    > but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    > (with -9 parameter) everything related to X like xorg, startx, KDE, etc.


    -9 AKA SIGKILL can't be caught, and that means that the X server can't
    restore the keyboard, and display properly. As other people have
    pointed out using SIGKILL is excessive. First try SIGTERM, or SIGINT.

    If you want to get a useful backtrace or diagnose this further try this:

    kill -ABRT $insert_pid_of_X

    or:

    pkill -ABRT X

    That should create a rather large core dump. If it doesn't then you're
    using a distribution that avoids (useful) core dumps.

    You probably would find:
    $ ulimit -c
    0

    If so, then in the shell from which you startx try this:
    ulimit -c unlimited

    Then try the kill -ABRT X, and you should be left with a "core" file.

    You can then run: gdb X core

    At the gdb prompt type: bt full

    That should have more than enough state and variables if you're using
    the Debian debug packages, to allow some developer to fix the problem,
    assuming it's not the binary-only Nvidia driver (which may not have
    symbols).


    Another direction to go in is to try to see if the X server is
    performing any syscalls in an endless loop when it stops working. From
    your ssh you can run:

    strace -p $insert_pid_of_X


    > However, on the physical computer with the LCD monitor that ran startx,
    > it did not return to console. It is blank black with no cursor, texts,
    > pixels, etc. I don't know if it is still stuck in X. I can't even do a
    > ctrl-alt-backspace to kill X if it is really still running. I also tried
    > ctrl-alt-F# (# is from 1 to 4) and alt-F# (# is from 7 to 9). Even
    > keyboard lights don't respond. I checked everything with ps aux and lsof
    > as root. Nothing odd to see X.


    It's probably the video card mode. Most likely the keyboard works after
    that, but it might be in raw mode.

    > The only way to fix this is to shutdown -r now to reboot back to it. Am
    > I doing this wrong or something to correctly kill X remotely via SSH?
    >
    > Thank you in advance.



    Have fun,

    George

  18. Re: What's the correct way to kill X via remote SSH?

    On Wed, 12 Mar 2008 17:50:07 -0500, Ant wrote:
    >Hello.


    >A few times, I had to kill X.org session because it froze or whatever
    >but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    >(with -9 parameter) everything related to X like xorg, startx, KDE, etc.


    Next time, please don't post your question multiple times to multiple
    newsgroups. Make one post and include all the newsgroups (but not more than
    three or so) in the newsgroups header.

    Right now, you've started multiple independant threads and it is ****ing
    obnoxious.

  19. Re: What's the correct way to kill X via remote SSH?

    I demand that George Peter Staplin may or may not have written...

    > Ant wrote:
    >> A few times, I had to kill X.org session because it froze or whatever
    >> but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    >> (with -9 parameter) everything related to X like xorg, startx, KDE, etc.


    > -9 AKA SIGKILL can't be caught, and that means that the X server can't
    > restore the keyboard, and display properly.


    It's probably worth mentioning Alt-SysRq-R at this point.

    [snip]
    --
    | Darren Salt | linux or ds at | nr. Ashington, | Toon
    | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
    | + Buy less and make it last longer. INDUSTRY CAUSES GLOBAL WARMING.

    All hope abandon, ye who enter here.

  20. Re: What's the correct way to kill X via remote SSH?

    In comp.os.linux.x George Peter Staplin wrote:
    > Ant wrote:
    > > Hello.
    > >
    > > A few times, I had to kill X.org session because it froze or whatever
    > > but my Linux/Debian isn't frozen. I connect to the box with ssh and kill
    > > (with -9 parameter) everything related to X like xorg, startx, KDE, etc.


    > -9 AKA SIGKILL can't be caught, and that means that the X server can't
    > restore the keyboard, and display properly. As other people have
    > pointed out using SIGKILL is excessive. First try SIGTERM, or SIGINT.


    > If you want to get a useful backtrace or diagnose this further try this:


    > kill -ABRT $insert_pid_of_X


    > or:


    > pkill -ABRT X


    > That should create a rather large core dump. If it doesn't then you're
    > using a distribution that avoids (useful) core dumps.


    > You probably would find:
    > $ ulimit -c
    > 0


    Yep, zero on my Debian.


    > If so, then in the shell from which you startx try this:
    > ulimit -c unlimited


    Is there a way to set this unlimited by default for all users? I
    remember Red Hat dumping cores from crashes. I'd like to the same for
    Debian.


    > Then try the kill -ABRT X, and you should be left with a "core" file.


    > You can then run: gdb X core


    > At the gdb prompt type: bt full


    > That should have more than enough state and variables if you're using
    > the Debian debug packages, to allow some developer to fix the problem,
    > assuming it's not the binary-only Nvidia driver (which may not have
    > symbols).



    > Another direction to go in is to try to see if the X server is
    > performing any syscalls in an endless loop when it stops working. From
    > your ssh you can run:


    > strace -p $insert_pid_of_X



    > > However, on the physical computer with the LCD monitor that ran startx,
    > > it did not return to console. It is blank black with no cursor, texts,
    > > pixels, etc. I don't know if it is still stuck in X. I can't even do a
    > > ctrl-alt-backspace to kill X if it is really still running. I also tried
    > > ctrl-alt-F# (# is from 1 to 4) and alt-F# (# is from 7 to 9). Even
    > > keyboard lights don't respond. I checked everything with ps aux and lsof
    > > as root. Nothing odd to see X.


    > It's probably the video card mode. Most likely the keyboard works after
    > that, but it might be in raw mode.


    > > The only way to fix this is to shutdown -r now to reboot back to it. Am
    > > I doing this wrong or something to correctly kill X remotely via SSH?
    > >
    > > Thank you in advance.



    > Have fun,
    > George


    Thanks. I will keep this in file if I need to dig deeper.
    --
    "I've been on some fairways that are as good as the greens we putted on
    back then. We had crab grass. I remember one green where I putted
    through ants." --Sam Snead
    /\___/\
    / /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
    | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
    \ _ / Please remove ANT if replying by e-mail.
    ( )

+ Reply to Thread
Page 1 of 2 1 2 LastLast