xpra icon
Bug tracker and wiki

Opened 5 months ago

Closed 3 weeks ago

#2792 closed defect (worksforme)

xpra shadow server "not working"

Reported by: stdedos Owned by: stdedos
Priority: minor Milestone: 4.1
Component: server Version: 3.0.x
Keywords: Cc:

Description

Related to #2791?

While the client connects (and while #2791 is somewhat affecting), the client is opening the monitor windows, but it is effectively in a non-operational state.

Also related to #2617.

Logs, after filtered with | grep -viP "(New unix-domain connection received|on '[^']+xpra/user-ix-main-pc-0'|clipboard)", are very small and do not immediately reveal anything.

I did not have a chance to capture xpra-info before the server decided it was time to die.

Attachments (3)

redact-display-_0-$TIMESTAMP.log (10.4 KB) - added by stdedos 5 months ago.
Xpra_cmd_2020-10-07_10-40-36.png (25.4 KB) - added by stdedos 3 weeks ago.
Screenshot-chrome_2020-10-07_11-54-19.png (987.3 KB) - added by stdedos 3 weeks ago.

Download all attachments as: .zip

Change History (16)

Changed 5 months ago by stdedos

comment:1 Changed 5 months ago by Antoine Martin

Owner: changed from Antoine Martin to stdedos

I assume this is a regression?
A client regression?
Does it work with a Linux client? 4.0 client?
Can you post the client log?

comment:2 in reply to:  1 Changed 5 months ago by stdedos

Replying to Antoine Martin:

I assume this is a regression?

Yes

A client regression?

Idk, that is my guess

Does it work with a Linux client? 4.0 client?

This makes no sense to my workflow, and I don't have a system to test with that configuration. I also have been having #2617 - this could be the most recent/severe version of it (I also have used different client versions, so I decided to post a new bug, just to be sure).

Can you post the client log?

Equivalent to

"Xpra-Python3-x86_64_4.1-r26503\xpra_cmd" attach ssh://user@ip/200 --ssh="plink -ssh -agent" --modal-windows=no --title="@title@ on @@/@server-display@" --opengl=no --bandwidth-limit=6Mbps

2020-06-01 09:44:34,754 Xpra GTK3 client version 4.1-r26503 64-bit
2020-06-01 09:44:34,756  running on Microsoft Windows 10
2020-06-01 09:44:34,825 Warning: failed to import opencv:
2020-06-01 09:44:34,825  No module named 'cv2'
2020-06-01 09:44:34,826  webcam forwarding is disabled
2020-06-01 09:44:35,422 GStreamer version 1.16.2 for Python 3.8.3 64-bit
2020-06-01 09:44:35,789 keyboard layout code 0x409
2020-06-01 09:44:35,789 identified as 'United States - English' : us
2020-06-01 09:44:35,956  keyboard settings: layout=us
2020-06-01 09:44:35,959  desktop size is 4160x1440 with 1 screen:
2020-06-01 09:44:35,960   Default (1100x381 mm - DPI: 96x96) workarea: 4160x1400
2020-06-01 09:44:35,960     Generic PnP Monitor 1600x900 at 0x534 (309x174 mm - DPI: 131x131) workarea: 1600x860
2020-06-01 09:44:35,960     C32JG5x 2560x1440 at 1600x0 (697x392 mm - DPI: 93x93) workarea: 2560x1400
2020-06-01 09:44:57,331 enabled remote logging
2020-06-01 09:44:57,333 Xpra GTK3 X11 server version 3.0.9-r26132 64-bit
2020-06-01 09:44:57,335  running on Linux Ubuntu 16.04 xenial

With these flags:
shadow ssh://user@ip/0 --ssh="plink -ssh -agent" --opengl=no --desktop-scaling=0.75 --min-speed=70 --webcam=no --speaker=off --microphone=off --pulseaudio=no --exit-with-client=no

comment:3 Changed 4 months ago by Antoine Martin

It's not clear to me if the bug is server-side or client side.
Did this go away when you downgraded to 4.0.x?

comment:4 Changed 4 months ago by stdedos

Now that I think of it, actually yeah. I managed to use 2/3 shadow monitors with ease (given the latency ofc)

comment:5 Changed 3 weeks ago by Antoine Martin

I am strongly suspecting bandwidth issues.
6Mbps is low.
You have 3 monitors (at least 1080p each), that's roughly 20MB worth of pixels to send.
Uncompressed, that would be over 160Mbps of bandwidth per screen update.
Compression helps, but doesn't do miracles.

Now that I think of it, actually yeah. I managed to use 2/3 shadow monitors with ease (given the latency ofc)

So this is a 4.1 regression?
Do you have any idea which revision broke?

comment:6 in reply to:  5 Changed 3 weeks ago by stdedos

Replying to Antoine Martin:

I am strongly suspecting bandwidth issues. 6Mbps is low.

I know, but it used to work. Also, I have had much more bw, but something-something and you asked me to use this flag and it probably kind-of helped - so it's there now.

You have 3 monitors (at least 1080p each), that's roughly 20MB worth of pixels to send.
Uncompressed, that would be over 160Mbps of bandwidth per screen update.

Is this "per screen update" === per frame? per second? is it per min(max(1/25,update-dt),1) sec?
While on theory that is the original size, I don't think that this is remotely to the actual size.
Otherwise, if xpra was really throttling <6mbps, that means less than 1 FPS for all of the monitors combined (!), and I don't see that

Compression helps, but doesn't do miracles.

I think we have discussed numerous optimizations that exist on the background that would help.
And I'll keep asking you: Is there a way to expose all of that?

Something like:
| Window Name | Quality | Speed | FPS | MPixels/MB | BW (calculated or actual)

Now that I think of it, actually yeah. I managed to use 2/3 shadow monitors with ease (given the latency ofc)

So this is a 4.1 regression?
Do you have any idea which revision broke?

At this time, I honestly don't remember - and I have been adjusted to keep avoiding shadow server unless necessary.
I would say, at worst, it would be between r25898 and whatever was the latest released beta 2 months from that day - but that is already too old, you've made a lot of changes even since r25898.

However, if it's any consolation, I have the same "issue"/meta-stable condition that I can use 2/3 monitors (2x1080p) with low FPS, and significant delay.
I'll try to remember to post tomorrow what is the XPRA_ env set.

comment:7 Changed 3 weeks ago by Antoine Martin

Uncompressed, that would be over 160Mbps of bandwidth per screen update.

Is this "per screen update" === per frame? per second? is it per min(max(1/25,update-dt),1) sec?

That's how much bandwidth it would take to send one full screen update.
Every pixel of every window takes 3 bytes. Multiply that by the number of pixels.
And you have to send all of that at least once, first when you show the windows for the first time.

While on theory that is the original size, I don't think that this is remotely to the actual size.

Like I said, this is the actual uncompressed size.
Depending on the content, it may compress well or not.
For lossless, you can expect a reduction by a factor of 10. Which is still way more bandwidth than you have.

And I'll keep asking you: Is there a way to expose all of that?

Not all. But xpra info has a lot.

| Window Name | Quality | Speed | FPS | MPixels/MB | BW (calculated or actual)

We don't have per-window bandwidth ATM, and FPS is mostly meaningless unless the window is showing a video.
This data is pretty close to what is shown on the "statistics" tab of the session info window.
Adding per-window details might be worth doing, but I fear that users may then get more confused than before..

comment:8 Changed 3 weeks ago by stdedos

I'll try to remember to post tomorrow what is the XPRA_ env set.

Client runs:

XPRA_CUSTOM_TITLE_BAR=0
XPRA_EXECUTABLE=Xpra-Python3-x86_64_4.1-r27616
XPRA_SCROLL_ENCODING=0

And server was started with:

env.XPRA_LOG_DIR=/run/user/1000/xpra
env.XPRA_PROXY_START_UUID=43ed51de567549d3a76f339458ee2614
env.XPRA_PULSE_SERVER=/run/user/1000/xpra/pulse-3/pulse/native
env.XPRA_PULSE_SINK_DEVICE_NAME=Xpra-Microphone
env.XPRA_PULSE_SOURCE_DEVICE_NAME=Xpra-Speaker
env.XPRA_SERVER_SOCKET=/run/user/1000/xpra/usr-linux-3
env.XPRA_SHADOW_REFRESH_DELAY=200

I don't know how to interpret between these two:
http://xpra.org/trac/raw-attachment/ticket/2617/Xpra-2617_cmd_2020-04-23_10-31-01.png
(example ofc)

1.
The latency is obviously different, but I don't think it represents how the interaction feels to the user (there are moments where one click felt like forever, or it felt like video had hiccups; however "average" is just that - average).
Then, there are so many latencies - which obviously mean something to you, but less to me.
This is why I asked for FPS. Not the local window drawing FPS, but really how many screen updates in a second as a running average (e.g. of 10 seconds). I want a singular metric that responds to "if I move my mouse and click stuff, how close is what I am doing to what has landed on the server?" (then, if you feel like breaking it down, do it - like you do on the graphs page).

2.
The quality/speed metrics are reversed; however they still don't make sense to me. Quality was "around the same" vivid colors etc (from the dumb user's perspective, again), but now I was able to interact okay-ish with all 3 monitors, and have it pretty responsive too.

As I said, again, I would be all for dropping to 8bit/16bit colors (I don't know how to describe quality) to get a close to 20FPS-equivalent refresh rate all day, but XPRA has had refused to "automatically" do that

However, for a change, I do have now a 100/10 mbps line. Maybe this

However, if it's any consolation, I have the same "issue"/meta-stable condition that I can use 2/3 monitors (2x1080p) with low FPS, and significant delay.

was remaining memories from before this month.

Changed 3 weeks ago by stdedos

comment:9 Changed 3 weeks ago by Antoine Martin

I don't know how to interpret between these two:

Any time your client or server latency goes above 1 second, you're lucky if the connection doesn't drop at that point.

Then, there are so many latencies - which obviously mean something to you, but less to me.

If you use your pointer to hover over the latency text, a description of what it means shows up as a tooltip.

This is why I asked for FPS
but really how many screen updates in a second as a running average

Unless you're watching a video or using shadow mode, this number means absolutely nothing and it is the most misleading figure there is, so I am very reluctant to show it anywhere.

The quality/speed metrics are reversed

Reversed? Please explain.
Speed is how long we spend encoding a frame, in your case, low speed would be preferable since this will use less bandwidth and may actually arrive sooner.

I would be all for dropping to 8bit/16bit colors .. to get a close to 20FPS-equivalent refresh rate all day .. but XPRA has had refused to "automatically" do that

That does not help you achieve that.
Drop the quality level and the picture codecs will do a far better job at deciding how to reduce the bitrate than dropping bits before handing over the pixels.
In any case, most encoders don't take 8bit or 16bit input - only png/L and png/P handle 8bit input.
Xpra 4.1 has an 8bit grayscale mode though: #1713 (with hacks to feed this into more encoders - including video encoders)

If you really want to force xpra to use less than 24-bit colors, you can use --pixel-depth=8 (or 16), but only with start and start-desktop modes.

However, for a change, I do have now a 100/10 mbps line

Likely to make a massive difference.

comment:10 in reply to:  9 Changed 3 weeks ago by stdedos

Replying to Antoine Martin:

I don't know how to interpret between these two:

Any time your client or server latency goes above 1 second, you're lucky if the connection doesn't drop at that point.

Then, there are so many latencies - which obviously mean something to you, but less to me.

If you use your pointer to hover over the latency text, a description of what it means shows up as a tooltip.

This is why I asked for FPS
but really how many screen updates in a second as a running average

Unless you're watching a video or using shadow mode, this number means absolutely nothing and it is the most misleading figure there is, so I am very reluctant to show it anywhere.

(First of all, the title of this ticket is "shadow"), and I am still missing "the one" metric that tells me what does XPRA think my User Experience feels like (I can think of "interactivity", "quality"). It doesn't have to be "one" metric, but I expect one clear definition and one clear response (equivalent to what does "ping rtt" mean for the network).

The quality/speed metrics are reversed

Reversed? Please explain.

Look at the Statistics pictures I added above.
First : Quality 56 / Speed 73 (average)
Second: Quality 75 / Speed 59 (average)

Speed is how long we spend encoding a frame, in your case, low speed would be preferable since this will use less bandwidth and may actually arrive sooner.

I thought it was related to the image/video latency I see on my side.

I would be all for dropping to 8bit/16bit colors .. to get a close to 20FPS-equivalent refresh rate all day .. but XPRA has had refused to "automatically" do that

That does not help you achieve that.
Drop the quality level and the picture codecs will do a far better job at deciding how to reduce the bitrate than dropping bits before handing over the pixels.
In any case, most encoders don't take 8bit or 16bit input - only png/L and png/P handle 8bit input.
Xpra 4.1 has an 8bit grayscale mode though: #1713 (with hacks to feed this into more encoders - including video encoders)

If you really want to force xpra to use less than 24-bit colors, you can use --pixel-depth=8 (or 16), but only with start and start-desktop modes.

I really want shadow mode to work 😛. Up until the point where the image appears as a Pixelate 2x2 filter, with "colors that are almost fully de-saturated" (or whatever else equivalent the codecs decide).
A different example of before/after could be this:


As I am not proficient in image/video encoding (nor English for that matter), I am not sure how to accurately describe "low quality, but you can still see shapes and kind-of read text".

However, for a change, I do have now a 100/10 mbps line

Likely to make a massive difference.

It looks like it, but still a bit reluctant to switch over. (However, Ubuntu 20.04.1 was released for upgrade-install - so update of the server is on the pipeline).

Changed 3 weeks ago by stdedos

comment:11 Changed 3 weeks ago by Antoine Martin

Look at the Statistics pictures I added above.
First : Quality 56 / Speed 73 (average)
Second: Quality 75 / Speed 59 (average)

Right, you can only have high quality and high speed at the same time if you have ample bandwidth to handle the extra bits.
Xpra chose to sacrifice the quality more in one case.

(speed)
I thought it was related to the image/video latency I see on my side.

Sort of.
If you have bandwidth to spare, compressing less is quicker.
But if you don't, then the packet will take longer to arrive.

I am not sure how to accurately describe "low quality, but you can still see shapes and kind-of read text".

Reducing the saturation is similar to what YUV colorspace does with chroma subsampling, and this is used by video codecs and jpeg.
xpra does this automatically when you lower the quality, but without losing too much of the colours, just reducing how many bits are used to encode them.

comment:12 in reply to:  11 Changed 3 weeks ago by stdedos

Replying to Antoine Martin:

(speed)
I thought it was related to the image/video latency I see on my side.

Sort of.
If you have bandwidth to spare, compressing less is quicker.
But if you don't, then the packet will take longer to arrive.

That is why I get so fixed on the "FPS metric". I clearly understand what is the difference between 15 and 25 FPS in an first-person shooter game (I could compare working with a computer to an FPS game, since you do something, expect to see a result, and you re-align what you are doing based on that feedback - especially e.g. for mouse-driven interactions).

Of course, I think at this time you understand what I am trying to convey - so let's drop this thread.

Additionally, let's drop this ticket too. Having seen a very interactive session, and having ample BW available, I guess this is unlikely to happen in normal conditions (I still have network issues, but I have identified them to be an ISP/ISP's modem to blame)

comment:13 Changed 3 weeks ago by Antoine Martin

Resolution: worksforme
Status: newclosed

Let's follow up in #2894

Note: See TracTickets for help on using tickets.