When X and GNOME are working normally, I can just hit Ctrl-Alt-F2 to leave GNOME and use the terminal on the second virtual console. To switch back to GNOME, I can just hit Alt-F1.

Today, X or GNOME stopped working normally for me and I was unable to get to a virtual console. I was still able to move my mouse cursor around but I wasn't able to click anything. As far as I could tell, my keyboard was unresponsive, but maybe the right keyboard shortcut would have helped. I ended up pressing the power button on the computer to gracefully shut it down, but what could I have done to avoid this?

I'm using CentOS 6.0 and GNOME 2.28.


3 Answers 3


Connecting over the network (e.g. with SSH) is by far the method that has the best chance of working and the least chance of causing damage that might otherwise be avoidable (such as killing your X session).

If the mouse is working but not the keyboard, it means that X is not completely hosed. Try plugging the keyboard out and back in: this can help if the problem is in the keyboard driver. (It rarely is.) If you have a root terminal or can get one without the help of the keyboard, try typing chvt 2 there (where “typing” means copy-pasting the letters).

Another thing you can try is the magic SysRq key: press Alt+SysRq+R to switch the keyboard away from raw mode, and try Ctrl+Alt+F1 again: this time the key combination should be handled by the kernel and not by X.


Usually I try:

  1. to connect using ssh via another host (e.g. I installed putty on my mobile phone).
  2. to press CrtlAlt-Backspace to kill the X session.
  • ssh'ing in from another host is a great idea; I used to do this from a computer lab I used to work next to, though this isn't available to me any more. I'm pretty sure I tried Ctrl-Alt-Backspace to no avail, unfortunately. Oct 12, 2011 at 17:12

try Alt-SysRq-k to kill the X process, then Alt-SysRq-r to reset the keyboard, then Alt-F2 (not ctrl, since you're back in the kernel keyboard handler not X) to move to other virtual console.

These keys are assigned to their physical locations on a QWERTY keyboard. If you have Dvorak you will need to use different keys.

  • 1
    No need to start with Alt+SysRq+K: sometimes Alt+SysRq+R then Alt+F2 will be enough. Oct 12, 2011 at 23:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .