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

Dynamic resolution update (resizing without reconnection) #448

Open
metalefty opened this Issue Oct 20, 2016 · 36 comments

Comments

Projects
None yet
@metalefty
Copy link
Member

metalefty commented Oct 20, 2016

The feature "Dynamic resolution update" was introduced in RDP 8.1. It enables to resize screen resolution on-the-fly.

Dynamic resolution update

One of the changes we’ve made as part of RDP 8.1 is the addition of a new message that can be sent from the client to the server to dynamically update the resolution inside the remote session to match what is available on the client without the need to do a complete reconnect of the session. Previously, we only set the remote resolution during the initial connection. With this change, the resolution is set at connect time and can be updated when the client-side resolution changes while the app is in full screen mode, or when the app transitions from windowed mode to full screen. The resolution change is quick enough to be practically the same as a local change.

https://blogs.technet.microsoft.com/enterprisemobility/2013/12/16/resolution-and-scaling-level-updates-in-rdp-8-1/

Let's bring this to xrdp if possible. I'm still looking for MS documents about dynamic resolution update. If anyone know where it is, I'd appriciate leting me know.

@metalefty metalefty added the feature label Oct 20, 2016

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Oct 20, 2016

xrdp Xorg driver and X11rdp are ready to accept resizing. The RandR extension is there and working.

@metalefty

This comment has been minimized.

Copy link
Member

metalefty commented Oct 20, 2016

AFAIK, xrdp resizes session but it is only connect time, right? What I want to implement is different from it. As xorgxrdp and x11rdp are ready to accept resizing, what we need to do is to catch "a new resize message" from the client and tell xorgxrdp/x11rdp to resize.

I'm looking for "a new message" of resizing in MS documents.

@metalefty metalefty changed the title Dynamic resolution update Dynamic resolution update (resizing without reconnection) Oct 20, 2016

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Oct 20, 2016

Yes, I know what you mean. I can't find it in the protocol docs. It's either added to MS-RDPBCGR or it's a new virtual channel.

@metalefty

This comment has been minimized.

Copy link
Member

metalefty commented Oct 20, 2016

Quick lookup for "resolution" in [MS-RDP*], is "DISPLAYCONTROL_MONITOR_LAYOUT_PDU" of [MS-RDPEDISP] related to dynamic resolution update? I haven't read MS-RDPEDISP deeply but just FYI.

Dynamic resolution update is introduced in RDP 8.1. MS-RDPEDISP is added on Aug 8, 2013. Windows 8.1 was released in October 2013. The date of the MS blog article is December 2013. Probably they're relevant.

@speidy

This comment has been minimized.

Copy link
Contributor

speidy commented Oct 20, 2016

It's a new virtual channel, but I think it's dynamic channel.
בתאריך יום ה׳, 20 באוק׳ 2016 ב-7:03 מאת metalefty <notifications@github.com

:

Quick lookup for "resolution" in [MS-RDP*], is
"DISPLAYCONTROL_MONITOR_LAYOUT_PDU" of [MS-RDPEDISP] related to dynamic
resolution update? I haven't read MS-RDPEDISP deeply but just FYI.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#448 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADTH1AlgAzT7haW5fPyvgtvW13KQKKQoks5q1ugfgaJpZM4KbrXR
.

Idan Freiberg

PGP FP: 8108 7EC9 806E 4980 75F2 72B3 8AD3 2D04 337B 1F18

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Oct 20, 2016

Yup, this is it
MS-RDPEDISP

@metalefty

This comment has been minimized.

Copy link
Member

metalefty commented Aug 30, 2017

I noticed RemoteFX session cannot be resized with this virtual channel function. It sounds I can gain little benefit.

1.5 Prerequisites/Preconditions

If the RemoteFX codec ([MS-RDPRFX] sections 2.2.2 and 3.1.8) is being used to encode graphics data from a remote session, then the Remote Desktop Protocol: Display Control Virtual Channel Extension SHOULD NOT be used to request display configuration changes.

https://msdn.microsoft.com/en-us/library/dn364841.aspx

@mrichar1

This comment has been minimized.

Copy link

mrichar1 commented Jan 22, 2018

Hi - Can I check on the state of this issue? Is it still the case that there isn't a mechanism for resizing without reconnecting in xrdp?

@metalefty

This comment has been minimized.

Copy link
Member

metalefty commented Jan 23, 2018

Still on TODO list but nothing's being done. If you want the feature, react with 👍 icon on the first post. Then I can know how many people want the feature.

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Apr 17, 2018

I implemented MS-RDPEDISP and MSTSC seems to only send client data to the server when in full screen mode. I was expecting non full screen resizing to work but I don't see any data. I wonder how MSTSC to Windows 10 does this.

@metalefty

This comment has been minimized.

Copy link
Member

metalefty commented Apr 17, 2018

Nice, can you share your work?

I've found a document about display update not only in MS-RDPEDISP.
https://msdn.microsoft.com/en-us/library/dd303566.aspx

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Apr 17, 2018

Sure I can share it. I had to move the drdynvc handling to libxrdp from chansrv but we need that anyway for GFX and a bunch of other new work.

@speidy

This comment has been minimized.

Copy link
Contributor

speidy commented Apr 17, 2018

@hardening

This comment has been minimized.

Copy link

hardening commented Apr 17, 2018

@speidy well in fact fullscreen doesn't mean anything at the protocol level. Except if you consider that the DesktopWidth/DesktopHeight match the size of a single monitor means fullscreen...
When I've implemented dynamic resolution in FreeRDP I'm just announcing a monitor that has the size of the window...

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Apr 17, 2018

That is what I was hoping mstsc would do, report a dummy monitor that is the size of the window.

@speidy

This comment has been minimized.

Copy link
Contributor

speidy commented Apr 17, 2018

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Apr 19, 2018

@hardening What version of freerdp has your dynamic resolution change?

@hardening

This comment has been minimized.

Copy link

hardening commented Apr 19, 2018

@jsorg71 current master has it (/dynamic-resolution on the command line)

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Apr 19, 2018

That works as I'd expect. It does look like you are setting the PhysicalWidth and PhysicalHeight wrong. They should not be the same as width and height. They should be in mm. The DPI per monitor is calculated from this. In X11 xandr can supply this.

@cwilhit cwilhit referenced this issue Jun 1, 2018

Closed

Window resizing #43

@rahulm-gdb

This comment has been minimized.

Copy link

rahulm-gdb commented Jun 7, 2018

@jsorg71 can u tell me how to configure xrdp to accept display-update on resize method.? on master branch, I'm trying to build xrdp with dynamic-resolution option. But i can't see the option. I've loaded the git repo locally. Installed dependencies. Then did ./bootstrap. followed by ./configure . IN the ./configure -help i can't see any option for dynamic-resolution.

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Jun 27, 2018

I ran into problems. The FreeRDP implementation does not work well with a Windows 10 server because the mmWidth and mmHeight are same as width and height and not mm. The MS client does not do this at all if not in full screen. I think there is a HyperV connection to xrdp that does work but I didn't find out how that works. It looks like the dynamic virtual channel is used to report the new monitor layout to the server but the server(xrdp) needs to send a new 'demand active'. Xrdp has a 'server_reset' function for this but FreeRDP did not like it and I stopped there.

@speidy

This comment has been minimized.

Copy link
Contributor

speidy commented Jun 27, 2018

@jsorg71 I think i was stopping at the same point at the past.

I'm not sure if we can send a demand_active again, afaik mstsc will throw an error.
I think mstsc will resize the local screen area after the dynamic channel message accepted by the server and we just need to resize it remotely in xrdp_wm and X11

@jterry75

This comment has been minimized.

Copy link
Contributor

jterry75 commented Jun 27, 2018

The channel in mstscax that Hyper-V uses is done in two ways from a client perspective:

  1. When a full screen mode is entered a call to SyncSessionDisplaySettings is made which takes into account the use of all monitors (if enabled).
  2. When the client UX resize in windowed mode a call to UpdateSessionDisplaySettings is sent for only the size of the client display area in the DPI of the current display monitor the UX is on.
@speidy

This comment has been minimized.

Copy link
Contributor

speidy commented Jun 28, 2018

We should use libxrdp_reset on server to trigger capabilites re-exchange after MS-RDPEDSIP message exchange is done.

@comphilip

This comment has been minimized.

Copy link

comphilip commented Sep 10, 2018

Any further update?

@shanselman

This comment has been minimized.

Copy link

shanselman commented Oct 3, 2018

Say @jsorg71 can you share/upstream your code? It feels like you are very close? I work for Microsoft with @scooley and I know the world would LOVE to see this! Let us know how we can help.

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Oct 3, 2018

Yup, lets push this ahead. I have the needed changes to drdynvc done and tested. After that, this should be much easier. One thing that would be nice is if mstsc supported this feature. I think it does if you connect "full screen" but mstsc could support this in windowed mode too.
Anyway, I'll prepare a PR.

@speidy

This comment has been minimized.

Copy link
Contributor

speidy commented Oct 3, 2018

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Oct 5, 2018

I created #1222 to track the DVC progress.

@scooley

This comment has been minimized.

Copy link

scooley commented Oct 11, 2018

Awesome! I work with @jterry75 - we're excited to pick this up for better Linux VM viewing. Thanks!

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Oct 16, 2018

I created branch
https://github.com/jsorg71/xrdp/commits/dynamic_monitor
for working on this. So far it only the xrdp login screen that resizes.

@metalefty

This comment has been minimized.

Copy link
Member

metalefty commented Oct 16, 2018

Works well!

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Oct 16, 2018

Works well with freerdp with /dynamic-resolution and works with mstsc when you go full screen after resizing desktop. I have not got the hyper-v session working yet.

@jterry75

This comment has been minimized.

Copy link
Contributor

jterry75 commented Oct 17, 2018

@cwilhit - Did you give this a shot with Hyper-V yet?

@cwilhit

This comment has been minimized.

Copy link

cwilhit commented Oct 17, 2018

@jterry75 tested with Hyper-V but was not able to get past the xrdp login.

I did try connecting via mstsc and saw that I could resize the xrdp login window.

@jsorg71

This comment has been minimized.

Copy link
Contributor

jsorg71 commented Dec 13, 2018

To complete this, we have to serialize some things. I think this is how this needs to work.

1 - client sends dynamic resize message over the virtual channel.
2 - xrdp starts the demand active / confirm active process. This involves capabilities re negotiation. At this point, xrdp and client are resized.
3 - xrdp starts the reset / resize of the backend (Xorg )
4 - full screen invalidate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment