I don’t claim I know what’s going on, just a few ideas.
For example, I use Bash, it has a .bashrc file with settings for the prompt (and more). Any such thing affecting your setup? I’m thinking maybe there is a setting this basic tty thing doesn’t agree with, either as it is set up, or in combination with your keyboard. For testing, maybe create a new user and use that with the most basic settings and try again?
Is it a wireless keyboard? Try one with cable and see if it changes anything.
Ah, you reminds me that both of my keyboard and mouse are connected to the USB port of my monitor, which also explains why plug/unplug would lead to monitor restart. There must be issues with the port or the monitor.
The monitor also sometimes get restarted by itself with no reason.
I will try to use the port on the computer to see if it could happen again.
Thanks a lot, guys!
Update: IT STILL HAPPENED, so it’s either my keyboard is too old (3 or 4 year old?) to function normally or the bug of system.