-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Konsole screen doesn't update properly #4187
Comments
Here's an example of bad output. I was hammering on the keyboard, and that was the result. Note how the screenshot shows three cursors, which is non-sensical. The second line of the command, where the first cursor is shown on the right at the end of the line, should be filled with text in a similar pattern all the way to the right hand side, I did not type a bunch of spaces. The third line of the command is correct, I stopped typing there. But the last time, the one with an empty command prompt, shouldn't be there. I still haven't pressed enter for the command that starts with "asdfjklf". That's output from a previous command that shouldn't be there because I had pressed Ctrl-C since. |
Is this a standard installation with all the codecs available? |
It's the deb packages from https://xpra.org:
Does not affect xterm, nor gnome-terminal Have not tried lxterminal.
Tried both (and saw from the stdout output on the client that they had the effect of enabling/disabling opengl), and it made no difference.
I've attached the resulting server.log.
Could well be. I see some warnings about transparency on stdout on the client side:
and the server.log also shows similar warnings. I have background transparency set to 0% on Konsole, I really do not want transparency, but maybe Konsole always does something with it unnecessarily, as you say. The server.log also shows errors like:
... |
That's the problem. |
I'll try compositing. I was just trying something else though -- thinking this had to do with the h264 errors, I changed Picture/Encoding at runtime from the tray icon on the client, from "automatic", to PNG (24/32bpp), and the issue seems to have disappeared. Then I changed to "video stream", and still no problem. Then I changed back to "automatic", and the problems reappeared. More, I was doing a
and it looks like it's one error per key that I press (i.e., probably one error per screen update). If I wait sufficiently for the problem to "fix itself", the errors stop appearing with the key presses. How can compositing on the client side affect encoding on the server side? |
The source image is |
OK, enabling compositing fixes it. I also tried:
and I don't see the problem. Presumably because the server keeps sending the alpha channel to the client? If I start both client and server with compositing off, and then enable compositing, and then restart the client (keeping the same server session), I then see these on the server.log while I'm banging at the keyboard in Konsole:
However, the Konsole terminal window still updates properly.
So IIUC, when compositing is off, the stream is set up as BGRX? And then when the source turns out as BGRA, then we get an encoding error, and frames are dropped. Did I get that right? It sounds to me like a bug then. I'm obviously not familiar with Xpra internals, but can't the encoding pipeline be setup to drop the alpha channel instead of failing the conversion? Or, if this can happen, can't the stream/client be set up as BGRA in the first place even if the A channel is going to be dropped on the client? Even if that results in more bytes over the wire, it seems better to me than dropping frames with encoding errors. Correctness should trump speed, IMHO. BTW, how can we see what encoding was selected by "auto"? I see in the server.log:
but it doesn't say which one of those available was selected, nor the detail of BGRX vs BGRA. |
Another problem was that As for
No, the server will use another non-video encoding as fallback when that happens, without any noticeable delay - just an ugly log message.
As per my previous answer:
It can't. Each screen update may end up using a different encoding. |
I guess I could try a tree with the BGRA vs BGRX fix, and without the konsole=text fix to confirm. (Though I'm not currently setup to build Xpra.) What would be the expected behavior? Still visual glitches, or something else?
But then I shouldn't have noticed any visual artifacts, no? Or is the falling back actually not triggering properly? (aka another bug.) With "-d compress", I see server log lines like:
whenever the screen updates correctly, but when the h264 conversion error triggers, I see the
errors, but no
Ah! I didn't make the connection between "compress" and the encoding, I naivelly assumed that was about a separate compression pass. Sorry.
Oh, that's quite interesting! Thanks a lot for the fixes. Now I'm curious on the difference between "text" and "non-text" apps and why that is important. :-) Sorry, can't help myself, I find Xpra quite interesting, and I've been trying to use it for a couple years, but there was always something in the way. Looks like I'll be able to use it from now on. Massive thanks for writing this. |
Or you can disable the feature:
XPRA_GUESS_CONTENT=0 xpra start ... You could also override the default on-disk definitions using your own overrides:
XPRA_CONTENT_TYPE_DEFS="class-instance:konsole=video,class-instance:foo=picture" xpra start .. (untested - but should work)
Correct, fixed: dbc4cbf
A single
Once the 5.0.8 |
Works-for-me(tm). |
Describe the bug
Konsole windows don't update properly. As you're typing, they update OK for some time, and then once in a while, there will be a glitch, which leaves the output in the terminal corrupted, or stale.
To Reproduce
Steps to reproduce the behavior:
started by the client, with:
$ xpra start ssh://server/9999 --start=konsole
$ xpra start ssh://server/9999 --start=konsole
Just type in the konsole window, run commands, anything that produces terminal output.
System Information (please complete the following information):
Additional context
E.g., just keeping a kep like "f" pressed, so the text auto repeats, sometimes the line will wrap, and the text will start appearing in the line below, but the "f"s for the first line aren't painted all the way to the right end side of the terminal. Xpra "forgets" to update the display for some milliseconds or so.
Sometimes, pressing "C-l" to clear the screen doesn't really clear it. The cursor moves to where you'd think it should move, but the rest of the terminal windows is still showing pre-clearing output.
Xterm doesn't appear to have this problem. Neither does emacs (gtk+).
I played with Dolphin a bit (KDE's file manager), and it appears to not have the problem either. But maybe I just didn't play long enough.
Given this happens in a program that most people using KDE use, I would think this would be a known issue. But I looked over the github issues and couldn't find anything. I am using the packages from xpra.org, not the Ubuntu ones.
The text was updated successfully, but these errors were encountered: