Troubleshoot - TTY Lines Overflow

Published in the topic of Linux, Shell

TTY Lines Overflow

When entering TTY (Ctrl+Alt+[0-9]), the shell commands are finely executed, the output mostly okay as long as they're not reached the bottom edge. Unfortunately, when the bottom is reached, the cursor will vanish into offscreen. It doesn't scroll, except on about 57 line reached. This is strange, as I notice this problem not so long; as I've use the TTY the whole year. Maybe it just happened because some change on NixOS? Or presto package?

Data Gathering

Kernel Param vga=

It's promising, but didn't works, no effect in anyway. Maybe because it's a GRUB parameter or used prior to Kernel Mode Setting.

Kernel Param video=

It's working, only to change the ratio and resolution of the screen. The 2560x1600 size is default (which still has this problem). Changing the size will broke the aspect ratio of the screen, leaving frame fill. I was hoping this may change the overflow problem, but it didn't even on extreme size.

STTY Command

Lastly, I discover that TTY console also run zshrc file and that stty can be used to manipulate console char dimension (cols & rows/lines). Then, casting up stty rows 50 successfully set the console num of lines and avoid overflow.


Thus, put the command on .zshrc fixed the problem,

if [[ "$TERM" == "linux" ]]; then
    stty rows 50