Why Does The Windows CMD Terminal Randomly Freeze?

Windows terminal shell freezing seemingly at random times and pausing both its output and script execution is a problem I first came across in my Stable Diffusion related endeavors. The fix was stupidly simple, and so, I’m just about to share it with you!

Why Does The Windows CMD Randomly Freeze?

Windows CMD shell entering the select mode.
As you can see, once you click anywhere inside the CMD terminal, the window immediately enters the Select Mode.

The most common reason for the Windows command prompt suddenly pausing the thing its doing, is it entering the text select (or mark) mode. You can switch the terminal to select mode by simply clicking anywhere inside it, and once it’s active, both the terminal output and the script execution will be suspended.

This unfortunately, is very easy to do by accident, for example after selecting and copying some text over from the CMD window and forgetting to disable the select mode afterwards.

When the terminal is in select mode, you will see the “Select” indicator on the top bar which will be displayed until the select mode is disabled. You can deactivate it by pressing the enter key with the CMD window active. Once you do that, “Select” will disappear from the bar, and the console script execution will continue.

I found myself entering the select mode by accident many times over when training LoRA models using the Kohya GUI. It got really frustrating when I realized that my training process was paused since half an hour just because of a missclick inside the terminal window. That’s why I quickly came up with the following quick fix.

The Fix – Disable The Quick Select Mode

Disabling the Quick Edit mode in Windows CMD.
Disabling the Quick Edit mode in the terminal window properties can help you prevent pausing the ongoing console script execution by accident.

If you want to make absolutely sure that you won’t ever activate the select mode by accident again, you can easily disable the Quick Edit Mode within your system terminal settings.

First, enter the properties menu by right clicking on the top bar of a CMD window and selecting the Properties option. Then, in the Edit Options box, uncheck the Quick Edit Mode option. Click OK to confirm the changes you’ve made. All done.

After deactivating the Quick Edit Mode, you can still access the select/mark mode by using the Ctrl+M key combination. Once in the select mode, you can then highlight, select and copy any piece of text you want from the terminal window as usual. You exit it in the very same way as before – by pressing the enter key when the terminal window is active.

Of course, you can always turn it back on should you need faster access to the select mode again. That’s it! Hope I was able to help you out!

Check out also: How To Add ffmpeg to PATH on Windows 10 and 11 – Installation Guide

Check out also:

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles