help wanted with tty (bug?)

From: Anthony Pankov <anthony.pankov_at_yahoo.com>
Date: Wed, 27 Aug 2025 12:53:47 UTC
Hello,  

I'm  facing misbehavior of pasting text from terminal to FreeBSD VM (as a guest) connected via serial port(!).
Inside a shell (sh) or vi pasted text get truncated. Inside kakoune editor pasted text get truncated and terminal become not responding to keypresses. Sometime tty become unrespondable to key combination  after pasting (Ctrl+A get as A, ( ignoring ESC sequence?)).

You may say that it is some misconfiguration here but investigation lasts for many-many working hours and many combinations was checked.
Terminal emulators tried: putty, windows terminal, windows terminal preview, alacritty, wiseterm.
VM tried: QEMU, HyperV, VirtualBox.

Also tried all possible modes of tty inside each case (except 'stty -icanon' == 'stty cbreak', those commands do not really change flags).

The weirdest thing is when I've got paste worked well after sometime (seconds) it stop working in the same session.
Also there was a rarely case when it not worked than worked for a once than not worked again.

On VirtualBox emulated serial port is covered by raw tcp server. In case of QEMU emulated port was connected directly to stdio of QEMU process but result was the same.

Last try was to adjust kern.hz to 500 but no luck.

Inside VM serial port presented as:

uart0: <Non-standard ns8250 class UART with FIFOs> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (115200,n,8,1)
Timecounter "TSC-low" frequency 1896583269 Hz quality 0
Dual Console: Video Primary, Serial Secondary

It seems to me that it is something wrong with tty.

May be someone has any ideas?


-- 
Best regards,
 Anthony Pankov                         mailto:anthony.pankov@yahoo.com