Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I had a really bad lockup of my X server and had to do a Sys Rq + r to release my keyboard from X and get into a console. I was able to kill the process that was locking up my system, and continue my work in my still running X server.

Now whenever I e.g. push Alt + F4 to kill a window, my system switches to the 4th console instead of killing the active window. So it seems that my keyboard still is in released mode.

How do I undo my previous Sys Rq + r command, such that I can continue my work in my running X server?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

I found the solution myself just after asking this question.

To switch back the console in which X is running (usually tty7), from ASCII mode to RAW mode execute the following command:

sudo kbd_mode -s -C /dev/tty7

And now everything works as expected again. :)

More information available in the question: What does raw/unraw keyboard mode mean?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.