Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] direct kernel commands
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Lovot
n00b
n00b


Joined: 04 Aug 2015
Posts: 72

PostPosted: Sat Dec 12, 2015 10:30 pm    Post subject: [SOLVED] direct kernel commands Reply with quote

Is it possible to basically have a keyboard shortcut that tells the kernel to kill X in the event it freezes. Some things segfault and freeze my screen, and X has the keyboard under it's control, so I can't kill X, even when ctrl+alt+backspace still worked.

Last edited by Lovot on Mon Dec 14, 2015 12:58 am; edited 1 time in total
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Dec 12, 2015 10:55 pm    Post subject: Reply with quote

Look up the "Magic SysRq Key". It's not all-powerful, but it does grab the keyboard out from under X, let you sync your drives, remount them read-only, then reboot or power off. There's more it can do, but those are the important things. If there's any trace of life left in the kernel, it will work. Take a look in /etc/sysctl.conf, where it's disabled by default, for some reason.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43195
Location: 56N 3W

PostPosted: Sat Dec 12, 2015 10:58 pm    Post subject: Reply with quote

Lovot,

You want the magic SysReq key and associated keystrokes.

As its a security risk if you have physical access to the console, you will need to check that you have kernel support for it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Lovot
n00b
n00b


Joined: 04 Aug 2015
Posts: 72

PostPosted: Mon Dec 14, 2015 12:58 am    Post subject: Reply with quote

Thank you both, it turns out I had magic SysReq enabled the whole time, and it also didn't matter because the X freezes seem to take the whole system down with them, so the only solution I have is to avoid the exact conditions required for a freeze. Will mark as solved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum