The GNU screen is unresponsive, seems blocked

LinuxFreezeKillGnu Screen

Linux Problem Overview


GNU Screen seems to freeze. Unable to enter user input.

I was using GNU screen and when I pressed the screen it became unresponsive. I can execute all the GNU screen commands, but can't enter user input. I don't want to kill this screen as I have important work and I don't want to lose it.

Linux Solutions


Solution 1 - Linux

In the commands below, replace Ctrl with whatever your escape key is for screen commands.

Try Ctrl+a q, which is the sequence to unblock scrolling.

Ctrl+a s is the sequence that blocks scrolling, which makes screen seem like it freezes.

Solution 2 - Linux

When using PuTTY, you can get an apparently freezed screen if you press Ctrl+s. This sends an Xoff signal blocking the terminal's output.

The solution is to press Ctrl+q to send the Xon signal.

Solution 3 - Linux

The above works great if that is your issue.

This could also happen if you're ssh'd into another machine and haven't been to the window in awhile, then when you go back it's frozen. To fix this, you can try the following:

  1. Create a new window

    Ctrl-a c

  2. ssh into the box where you ssh'd into the box in the window that's frozen.

  3. Find the process the ssh is running under:

    ps aux | grep

or

ps aux | grep <your_user_id>

4) Kill the process

kill <process_id>

Solution 4 - Linux

When you do screen -ls the first number of the screen name is the process id. So if the output is

There is a screen on:
    21605.pts-0.Random-server	(11/12/2017 11:44:15 PM)	(Detached)
1 Socket in /var/run/screen/S-kg.

Then this will kill it:

kill 21605

Notice the number for the kill command is the same as in the screen -ls output.

Solution 5 - Linux

If you are using backtick commands in status line - that is, if your .screenrc has something like this:

backtick 1 0 60 /some/script.sh

then you want to be sure that the script is fast: apparently backtick execution blocks all IO to screen.

If you make changes to the config, you'll need to restart the screen session (as the config applies only to new sessions).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsirusView Question on Stackoverflow
Solution 1 - Linux逆さまView Answer on Stackoverflow
Solution 2 - LinuxDaniel ReisView Answer on Stackoverflow
Solution 3 - LinuxHazokView Answer on Stackoverflow
Solution 4 - LinuxPylinuxView Answer on Stackoverflow
Solution 5 - LinuxPiskvor left the buildingView Answer on Stackoverflow