Siduction Forum

Siduction Forum => Software - Support => Topic started by: michaa7 on 2013/10/13, 00:18:49

Title: how to kill X
Post by: michaa7 on 2013/10/13, 00:18:49
My WS has 1GB RAM only (and a week Sempron CPU). So when the machine is running long time and I open a consumptive application like GE, it may happen easily that the machine runs out of RAM.
I am absolutly not a patient person (there are exeptions, but in front of my computer patience isn't applicable ...), I wait some seconds, maybe a minute, then I have to kill something, preferrable X, but it seems there is no shortcut to do so anymore, which leeds me to press the resett button ... which I hate.

so the simple question: is there a way to only kill X, not the whole system?
Title: RE: how to kill X
Post by: dibl on 2013/10/13, 01:34:15
If you press Ctrl-Alt-F1, do you get a tty console?  If yes, then login as root, give the root password, then

init 3

or if you are booting systemd

systemctl stop kdm

for KDE, or slim, or lightdm, or gdm ...
Title: Re: RE: how to kill X
Post by: michaa7 on 2013/10/13, 02:40:43
Quote from: "dibl"If you press Ctrl-Alt-F1, do you get a tty console?  

I'm not talking about this situation (although even in this situation it is not easy to kill X.
When a out of RAM system is still responsive enough to get a tty console, it often happens to me that I can enter root-login, ***but*** when entering the root-PW, the system will time out due to not being responsive in time. I had this situation damn often!).
I'am talking about "really nothing is working anymore" (except the hd-controll-diode due to the system trying to free RAM or swap whatever).

Once there was this "ctrl-Alt-delete" combination which doesn't seem to work these days.
Title: RE: Re: RE: how to kill X
Post by: dibl on 2013/10/13, 03:45:28
If root is not already logged in, then there is no root command that you can issue without giving the password, which may be the "last straw" for a system already on its a$$.  The DM is initiated by root, so only root is going to be able to kill it.

If the user could kill the biggest user processes, you might get the system to come back, but even the processing to kill a process is probably too much on top of the existing load.
Title: RE: Re: RE: how to kill X
Post by: sunrat on 2013/10/13, 03:55:12
Try Alt+SysReq+K . It should drop you straight back to a login screen.
Title: how to kill X
Post by: ayla on 2013/10/13, 10:26:42
Hi michaa7,

you may reactivate the CTRL+ALT+BACKSPACE combination.

If you are using KDE (Version 4:4.11.2-0r0):

Systemsettings -> input devices -> keyboard settings -> extended -> key combination for forced killing X-server

(Don't think this is a proper translation of my german environment, but may be it can give you a hint)

This is a headline wich you can open up, then set the mark there.

For other DE's AFAIK this should work to activate "kill X-server" with the above key combination, if needed -but only for the working session:

setxkbmap -option terminate:ctrl_alt_bksp


One could add this to a "xinitrc" somewhere in the past to make it permanent, but sorry, I don't know anymore where to find it, or, maybe in between, one has to change some other file.

greets
ayla





Hallo michaa7,

Du kannst Dir die CTRL+ALT+BACKSPACE Funktion auch wieder aktivieren.

Falls Du KDE (Version 4:4.11.2-0r0) nutzt:

Systemsettings -> Eingabegeräte -> Einstellung der Tastatur -> Erweitert -> Tastenkombination zum erzwungenen Beenden des X-servers.

Dies ist eine Überschrifft, die kannst Du "aufklappen", dann dort den Haken setzen.

Für andere DE's sollte AFAIK dies funktionieren um die Tastenkombination zu aktivieren -aber nur für die gerade aktive Sitzung:
setxkbmap -option terminate:ctrl_alt_bksp

Das konnnte man auch irgendwo in eine xinitrc aufnehmen und so dauerhaft machen, hab aber keine Ahnung mehr wo die zu finden ist, oder ob man da inzwischen eine andere Datei ändern muß.

Gruß
ayla
Title: how to kill X
Post by: vilde on 2013/10/13, 11:10:03
Quote
I am absolutly not a patient person (there are exeptions, but in front of my computer patience isn't applicable ...), I wait some seconds, maybe a minute, then I have to kill something, preferrable X
Michaa7, I think it's very important that you really can manage to do this, I mean to kill x because what happens if you can't? Do you kill something else or maybe somebody else, like the dog, your wife or anybody else near you? I'm glad that I'm (probably) far away from you ;)
Title: Re: RE: Re: RE: how to kill X
Post by: michaa7 on 2013/10/13, 11:17:52
Quote from: "sunrat"Try Alt+SysReq+K . It should drop you straight back to a login screen.
Thisone works (at least on a system with normal responsiveness). Thanks!.

I attached a sticker to my keyboard in case I forget.

@ ayla:
Fluxbox here. Thanks anyway.

@ vilde
... there once was a keyboard which failed to get out of my way ... it's still working, except for one key/letter which didn't recover, my bad.
Title: RE: Re: RE: Re: RE: how to kill X
Post by: piper on 2013/10/13, 15:54:10
Why not try killing the app first, instead of X. (I agree it don't always work, but, should be tried first).

Example you were using GE

killall googleearth

(most times something this intense (depends on how old a machine,cpu, graphics, etc) would have to be done twice to close)

htop should work also

To make ctrl + alt + bksp work, you have to do dpkg-reconfigure keyboard-configuration

dpkg-reconfigure keyboard-configuration (http://home.roadrunner.com/~piper_1/images/control.png)
Title: how to kill X
Post by: mylo on 2013/10/13, 18:58:19
Quote from: "ayla"...this is a proper translation of my german environment, ...

ayla, cool it is a rather proper one. Do not care.
Title: Re: RE: Re: RE: Re: RE: how to kill X
Post by: michaa7 on 2013/10/13, 19:47:27
Quote from: "piper"Why not try killing the app first, instead of X. (I agree it don't always work, but, should be tried first).
...

I completely agree. But if the responiveness of the system is still good enough to open a tty, I know how to handle it (and yes, killall is what I am using).

It rises my anger if these posibilities aren't available due to the system being completely unresponsive to whatever I try to do. And pressing the resett button isn't the best choice.

Thanks to all.

EDIT://

Are you sure this still works?:
Quote# dpkg-reconfigure keyboard-configuration
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults

As I remember it, since some time ago it was no longer supported due to some xorg thingy.

As "Alt-SysReq-K" works I don't investigate further.
Title: RE: Re: RE: Re: RE: Re: RE: how to kill X
Post by: piper on 2013/10/13, 22:59:21
It works fine here, just installed it (took the snapshot) rebooted 4 times, worked all 4 times

System:    Host: x1 Kernel: 3.11-4.towo-siduction-amd64 x86_64 (64 bit)
          Desktop: KDE 4.11.2 Distro: siduction 13.0.5 PaintItBlack - kde - (201308031300)
Machine:   Mobo: Gigabyte model: GA-970A-UD3 version: x.x Bios: Award version: F7 date: 10/22/2012
CPU:       Hexa core AMD FX-6300 Six-Core (-MCP-) cache: 12288 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm)
          Clock Speeds: 1: 1400.00 MHz 2: 1400.00 MHz 3: 1400.00 MHz 4: 1400.00 MHz 5: 3500.00 MHz 6: 1400.00 MHz
Graphics:  Card: NVIDIA GF106 [GeForce GTS 450] X.Org: 1.14.3 driver: nvidia Resolution: 1920x1200@60.0hz
          GLX Renderer: GeForce GTS 450/PCIe/SSE2 GLX Version: 4.3.0 NVIDIA 325.15
HDD Total Size: 2820.6GB
Memory: 1437.8/7973.4M
apt-get update && apt-get dist-upgrade
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.