Something happened with the frame rate of terminal emulators lately. It looks like there’s a trend to run at a high framerate now? I’m not sure exactly. This can be seen in VTE-based terminals like my xiate or XTerm on Wayland. foot and st, on the other hand, are fine.
My shell prompt and cursor look like this:
$ â–ˆ
When I keep Enter pressed, I expect to see several lines like so:
$
$
$
$
$
$
$ â–ˆ
With the affected terminal emulators, the lines actually show up in the following sequence. First, we have the original line:
$ â–ˆ
Pressing Enter yields this as the next frame:
$
â–ˆ
And then eventually this:
$
$ â–ˆ
In other words, you can see the cursor jumping around very quickly, all the time.
Another example: Vim actually shows which key you just pressed in the bottom right corner. Keeping j
pressed to scroll through a file means I get to see a j
flashing rapidly now.
(I have no idea yet, why exactly XTerm in X11 is fine but flickering in Wayland.)
#2726vfq
(#2726vfq) st tries not to redraw immediately after new data arrives:
https://git.suckless.org/st/file/x.c.html#l1984
The exact timings are configurable.
This is the PR that changed the timing in VTE recently (2023):
https://gitlab.gnome.org/GNOME/vte/-/issues/2678
There is a long discussion. It’s not a trivial problem, especially not in the context of GTK and multiple competing terminal widgets. st dodges all these issues (for various reasons).
#rvsbppq