tuigreet
tuigreet copied to clipboard
Screen flickering
The screen sometimes flicker. It seems to do so randomly, not immediately before or after pressing any keys.
Greetd: 0.8.0-1 tuigreet: 0.7.3 Arch
My config.toml:
[terminal]
vt = 1
[default_session]
command = "tuigreet"
user = "greeter"
I don't know how else to get other relevant information for you.
The only flickering I've been experiencing recently is the underscore cursor, which blinks a few times after the screen goes blank upon entering my password and pressing enter.
https://user-images.githubusercontent.com/14130581/206814859-c4a893a7-8553-456c-83ad-043e6ae33b96.mp4
I'm also getting the underscore cursor blink. Happens constantly for me
Arch greetd: 0.8.0-1 tuigreet: 0.8.0-0
The cursor does not blink regularly for me either. https://drive.google.com/file/d/1yknWCrRX9qRjHRhLIVaEoD8jhLlp0CH0/view?usp=sharing
I only noticed this after I switched my Gentoo to a tickless kernel. https://en.wikipedia.org/wiki/Tickless_kernel And in the Gentoo forum there was a suggestion that this behavior might come from crossterm.
Yes I have noticed that as well, and it is either my fault, and the way I handle events and screen refreshes, or is an issue with crossterm. I will try looking into it, but I do not have a definitive idea on how I could fix this, yet.
If we consider this being an upstream issue, I see two workarounds on tuigreet's side:
- Ask
crosstermto use steady cursor instead of blinking. I tried but couldn't make it work, I need to see if this is supported on Linux ttys. - Try rendering at a more or less steady pace instead of "as soon as possible" as it is now. It will not prevent flickering, but might make it more bearable because at least the flicker should be somewhat more consistent.
None of those is a magic bullet to the issue, though.
I added a rate limiter to the screen refresh (not yet on master), so while it does not solve this issue, I hope it makes less of an eye sore.
Well, this did not go as expected, I had to revert some of this. But yeah, it seems that the cursor is being reset in its blinking cycle whenever I set its position. Unfortunately, ratatui requires a position to be set at each render (otherwise, it hides it), so it is a bit of a catch-22.