Skip to content
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

xpra shadows 1080x1920 screen / html5 client shows partial screen #206

Open
fweng322 opened this issue May 16, 2022 · 15 comments
Open

xpra shadows 1080x1920 screen / html5 client shows partial screen #206

fweng322 opened this issue May 16, 2022 · 15 comments
Labels
bug Something isn't working geometry

Comments

@fweng322
Copy link

Describe the bug
With a special use case we're using vertical screen with resolution 1080x1920. Running xpra shadow --use-display=yes :0 --bind-tcp=0.0.0.0:33445 starts the xpra server. However when connecting to the server I could only see partial screen and no mouse/keyboard control at all.

To Reproduce
Steps to reproduce the behavior:

  1. xpra shadow --use-display=yes :0 --bind-tcp=0.0.0.0:33445
  2. Open chrome (101.0) to connect http://this.ip:33445/

System Information (please complete the following information):

  • Server OS: ubuntu 20.04
  • Client OS: Windows/Debian buster
  • Xpra Server Version 4.3.3
  • Xpra Client Version xpra-html5 5.0-r1276-1

Additional context
A screenshot is here: https://nextcloud.slat.org/index.php/s/P447B3SSBcFi5Ay
you can see only middle part of the desktop is shown.

I can launch a program from the xpra menu Start->(desktop menu) but the mouse and keyboard has no effects.

@fweng322 fweng322 added the bug Something isn't working label May 16, 2022
@totaam
Copy link
Collaborator

totaam commented May 16, 2022

Not sure how this is meant to work.
If your browser window is too small to display the whole desktop, you will have to change the browser window scaling to see it.
Adding scrollbars to the html5 client would also be possible.

This begs the question: why use shadow mode in the first place?

@fweng322
Copy link
Author

Not sure how this is meant to work. If your browser window is too small to display the whole desktop, you will have to change the browser window scaling to see it. Adding scrollbars to the html5 client would also be possible.

Does HTML5 client (Browser) automatically add scroll bar when the height is larger than browser?

This begs the question: why use shadow mode in the first place?

When we tried xpra start-desktop --use-display=yes :0 --bind-tcp=0.0.0.0:33445 , our screen became all black right after starting xpra server and could not get it back unless we re-plug HDMI cable. Using shadow mode would not have this problem. But honestly I have no idea what shadow mode means here ... maybe I have missed too much in the documentation

@totaam
Copy link
Collaborator

totaam commented May 16, 2022

Does HTML5 client (Browser) automatically add scroll bar when the height is larger than browser?

IIRC, no, but this shouldn't be too hard to add.

When we tried xpra start-desktop --use-display=yes :0 --bind-tcp=0.0.0.0:33445 , our screen became all black

Well, yes. If :0 is your existing desktop session. It might do that.
But why :0? And why start-desktop?

@fweng322
Copy link
Author

Does HTML5 client (Browser) automatically add scroll bar when the height is larger than browser?

IIRC, no, but this shouldn't be too hard to add.

When we tried xpra start-desktop --use-display=yes :0 --bind-tcp=0.0.0.0:33445 , our screen became all black

Well, yes. If :0 is your existing desktop session. It might do that. But why :0? And why start-desktop?

I want to control the existing :0 desktop from remote (like teamviewer or anydesk would do). Those (start-desktop / shadow) way were what I've tried and "seemed to work".

Could you please suggest the correct way to use xpra to remote control the existing desktop?

@fweng322
Copy link
Author

Does HTML5 client (Browser) automatically add scroll bar when the height is larger than browser?

IIRC, no, but this shouldn't be too hard to add.

And IIRC at first we tried this, all the desktop were scaled down with ratio into the browser. But I have no idea when and why it became what the screenshot shows.

@totaam
Copy link
Collaborator

totaam commented May 16, 2022

Could you please suggest the correct way to use xpra to remote control the existing desktop?

xpra shadow is what you want if the session already exists, and only for that case as it is much slower than xpra start-desktop or xpra start.

@fweng322
Copy link
Author

Could you please suggest the correct way to use xpra to remote control the existing desktop?

xpra shadow is what you want if the session already exists, and only for that case as it is much slower than xpra start-desktop or xpra start.

Thank you.

Is there any way to

  1. scale the display size down to specific size, e.g. from 1080x1920 to 540x960?
  2. debug why my mouse click does not work? I could see mouse cursor moving (inner and outer together) but could not click anything. Keyboard seems not worked either. Is there any info I could trace or help me find where the problem is?

@ehfd
Copy link

ehfd commented May 17, 2022

@totaam This is the same issue that I have told you about a few days ago.
Shadowing is required when people want to start an Xorg server with the NVIDIA driver and use full desktop streaming with Xpra.
The best way is not to add a scroll bar, but enable fitting the window for local scaling automatically for full desktops. Else, not only does it not work on vertical monitors, but the problem arises for HiDPI client environments.

Similar issue: #75
Fork that if merged, might solve the issue: https://github.com/selkies-project/xpra-html5
Possible example of a solution: selkies-project/selkies-gstreamer@2f7b3fc#diff-0d304525ef8be0fc0d86e5cc687c61589e8805f12bc5c7fd2181d893d111d23b

P.S. Moving this issue to xpra-html5 is desired.

@totaam
Copy link
Collaborator

totaam commented May 17, 2022

@ehfd did you try @basilgello 's "client width" in xpra-html5 v5?

#75 (comment)

@ehfd
Copy link

ehfd commented May 17, 2022

@totaam I did. But it would be more preferable to automate that with CSS.
Even if I did that, the problem highlighted by this issue is still there.

@fweng322 fweng322 changed the title xpra shadows 1080x1920 screen / html5 client shows partial screen and no kb/mouse control xpra shadows 1080x1920 screen / html5 client shows partial screen May 17, 2022
@fweng322
Copy link
Author

I changed the topic of this issue to reflect display size problem. For keyboard / mouse problem I found that it seemed not related to the display size so I'll start another issue.

@totaam
Copy link
Collaborator

totaam commented May 17, 2022

TBH, I'm not sure what either option would do. I'm really not a Javascript guy.

What I do know is that the html5 client needs to tell the server about the actual render size, so that if there's any downscaling needed then it will be applied server-side, before compression - not client side which is a complete waste of CPU and bandwidth.

The new ticket for clicks not working is: Xpra-org/xpra#3542

@totaam totaam transferred this issue from Xpra-org/xpra Oct 13, 2022
@totaam
Copy link
Collaborator

totaam commented Oct 13, 2022

Shadowing is required when people want to start an Xorg server with the NVIDIA driver and use full desktop streaming with Xpra.

@ehfd No, that is incorrect. It isn't strictly required.
A much better way is to take over the display, or to let xpra start the accelerated display server:
https://github.com/Xpra-org/xpra/blob/master/docs/Usage/OpenGL.md#taking-over-an-existing-display
(shadow should really be avoided if at all possible)

@ehfd
Copy link

ehfd commented Oct 13, 2022

@totaam Hmm, okay, I got to test that.

@stdedos
Copy link
Collaborator

stdedos commented Jul 6, 2024

Also Xpra-org/xpra#2458 would be useful in that case (or #75, but there may be bw savings to be gained)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working geometry
Projects
None yet
Development

No branches or pull requests

4 participants