Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
alt + sysrq + k freezes system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 134

PostPosted: Wed Oct 16, 2019 3:20 am    Post subject: alt + sysrq + k freezes system Reply with quote

When Xorg is running, alt + sysrq + k does NOT return me to the login prompt, but rather freezes the system. How do I fix this.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2245
Location: Frankfurt, Germany

PostPosted: Wed Oct 16, 2019 1:59 pm    Post subject: Reply with quote

Does Alt-Ctrl-Backspace work?

I know that you can enable or disable Alt-Ctrl-Backspace in the Xorg configuration files. As far as I know, alt + sysrq + k CANNOT be configured in the Xorg configuration files.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15603

PostPosted: Thu Oct 17, 2019 1:48 am    Post subject: Reply with quote

SAK is supposed to kill everything on the current terminal, which presumably includes X. Did you expect it to return you to another vt? If yes, why? If you manually switch back to a login vt, is there an agetty process waiting?
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 134

PostPosted: Thu Oct 17, 2019 8:53 am    Post subject: Reply with quote

mike155 wrote:
Does Alt-Ctrl-Backspace work?

I know that you can enable or disable Alt-Ctrl-Backspace in the Xorg configuration files. As far as I know, alt + sysrq + k CANNOT be configured in the Xorg configuration files.


Several tries seemed to work. I'll have to see if that's sufficient.

Hu wrote:
SAK is supposed to kill everything on the current terminal, which presumably includes X. Did you expect it to return you to another vt? If yes, why? If you manually switch back to a login vt, is there an agetty process waiting?


Come again? When I press the key combo, it freezes everything on my screen, including everything I was doing during my X session, forcing me to reboot to escape. Are you saying this is intended behavior?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2245
Location: Frankfurt, Germany

PostPosted: Thu Oct 17, 2019 11:13 am    Post subject: Reply with quote

Neither Alt-Ctrl-Backspace not Alt-SysRq-k are intended to be used regularly. Use them in emergency cases only. Alt-SysRq-k is worse than Alt-Ctrl-Backspace, because it kills every processes on the current virtual console. It's rather unfriendly to kill running processes that way and it may damage your system.
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1800
Location: KUUSANKOSKI, Finland

PostPosted: Thu Oct 17, 2019 12:20 pm    Post subject: Reply with quote

Maybe not what OP's looking for but:
If in emergency, I'll first try to Ctrl+Alt+F<n>.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15603

PostPosted: Fri Oct 18, 2019 12:58 am    Post subject: Reply with quote

Gooberpatrol66 wrote:
Hu wrote:
SAK is supposed to kill everything on the current terminal, which presumably includes X. Did you expect it to return you to another vt? If yes, why? If you manually switch back to a login vt, is there an agetty process waiting?
Come again? When I press the key combo, it freezes everything on my screen, including everything I was doing during my X session, forcing me to reboot to escape. Are you saying this is intended behavior?
I am saying that killing every process associated with the current terminal is expected behavior, yes. That is the documented behavior. I don't know if it is supposed to return you to a text console on its own. Could you explain why you want to use this key combination? What were you expecting to achieve by using it?
Back to top
View user's profile Send private message
Gooberpatrol66
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2014
Posts: 134

PostPosted: Mon Oct 21, 2019 10:50 pm    Post subject: Reply with quote

Hu wrote:
Gooberpatrol66 wrote:
Hu wrote:
SAK is supposed to kill everything on the current terminal, which presumably includes X. Did you expect it to return you to another vt? If yes, why? If you manually switch back to a login vt, is there an agetty process waiting?
Come again? When I press the key combo, it freezes everything on my screen, including everything I was doing during my X session, forcing me to reboot to escape. Are you saying this is intended behavior?
I am saying that killing every process associated with the current terminal is expected behavior, yes. That is the documented behavior. I don't know if it is supposed to return you to a text console on its own. Could you explain why you want to use this key combination? What were you expecting to achieve by using it?


1. If I press the key combo when Xorg is not running, it does not freeze my system, but rather logs me out and returns to the login prompt, so clearly SOME process is surviving.

2. My computer has been freezing, and I was hoping that it was just Xorg doing it, and I could avoid hard-rebooting. Since this key combo freezes the system anyways, it's worthless.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15603

PostPosted: Tue Oct 22, 2019 12:45 am    Post subject: Reply with quote

init is not part of your current terminal, and reacts to the termination of your shell by spawning a new getty. That is why you get a new login prompt if you use SAK while in text mode. X is part of your current terminal, so SAK kills it, and then there is nothing to switch you back to a working terminal. You might be able to follow up with unraw and then a vt-switch.

Are you sure it freezes the system when you use SAK on an unfrozen Xorg? Have you checked that the system's network stack is unresponsive afterward?
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1800
Location: KUUSANKOSKI, Finland

PostPosted: Tue Oct 22, 2019 12:30 pm    Post subject: Reply with quote

Hu wrote:
X is part of your current terminal, so SAK kills it, and then there is nothing to switch you back to a working terminal. You might be able to follow up with unraw and then a vt-switch.
Ah yes. Now I get it too. When there's no running getty on the vt where X is running then killing X does not switch to another vt, unlike when normally exiting X. So if faced with blank screen one could do alt+F<n> (like you said) or alternatively instruct init (or whatever you might have that controls your gettys) to start a getty on the vt where X is also started (traditionally vt7).
Did I get this right?

Or one more alternative choice if user starts the X session via startx:
Code:
startx; chvt 1

_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15603

PostPosted: Wed Oct 23, 2019 1:37 am    Post subject: Reply with quote

Zucca wrote:
Ah yes. Now I get it too. When there's no running getty on the vt where X is running then killing X does not switch to another vt, unlike when normally exiting X. So if faced with blank screen one could do alt+F<n> (like you said) or alternatively instruct init (or whatever you might have that controls your gettys) to start a getty on the vt where X is also started (traditionally vt7).
Did I get this right?
Yes. I'm not aware of a way to instruct init to spawn a getty on demand, though. /etc/inittab tells it what to spawn, and it will spawn those according to its rules and configuration.
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1800
Location: KUUSANKOSKI, Finland

PostPosted: Wed Oct 23, 2019 8:25 am    Post subject: Reply with quote

Hu wrote:
...instruct init to spawn a getty on demand...
What I meant is to configure init to start getty on vt7 at boot. Although, not sure, it could mess up starting X when vt7 is already reserved for getty...
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15603

PostPosted: Thu Oct 24, 2019 1:42 am    Post subject: Reply with quote

I don't think that will work. Xorg typically runs on tty7 because that is the lowest unallocated tty. tty1-tty6 are all busy running a getty. If you configure a getty on tty7, I think that will just push Xorg to start on tty8 instead.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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