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

Win 11 mstsc.exe doesn't send RemoteFX capability #2400

Closed
metalefty opened this issue Oct 28, 2022 · 19 comments
Closed

Win 11 mstsc.exe doesn't send RemoteFX capability #2400

metalefty opened this issue Oct 28, 2022 · 19 comments
Labels
client performance Performance issue such as codec, bandwidth and something

Comments

@metalefty
Copy link
Member

Win 11

[2022-10-28T22:04:33.958+0900] [DEBUG] Client requested compression enabled.
[2022-10-28T22:04:33.960+0900] [DEBUG] Client supplied domain:
[2022-10-28T22:04:33.961+0900] [DEBUG] Client supplied username: meta
[2022-10-28T22:04:33.963+0900] [DEBUG] Client supplied password: <omitted from log>
[2022-10-28T22:04:33.964+0900] [DEBUG] Client supplied program:
[2022-10-28T22:04:33.966+0900] [DEBUG] Client supplied directory:
[2022-10-28T22:04:34.771+0900] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[2022-10-28T22:04:34.782+0900] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100
[2022-10-28T22:04:34.798+0900] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[2022-10-28T22:04:34.814+0900] [WARN ] xrdp_caps_process_codecs: unknown codec id 5
[2022-10-28T22:04:34.832+0900] [DEBUG] xrdp_00005c68_wm_login_state_event_00000001

image

Win 10

[2022-10-28T22:02:07.907+0900] [DEBUG] Client requested auto logon.
[2022-10-28T22:02:07.908+0900] [DEBUG] Client requested compression enabled.
[2022-10-28T22:02:07.910+0900] [DEBUG] Client supplied domain:
[2022-10-28T22:02:07.911+0900] [DEBUG] Client supplied username: meta
[2022-10-28T22:02:07.913+0900] [DEBUG] Client supplied password: <omitted from log>
[2022-10-28T22:02:07.915+0900] [DEBUG] Client supplied program:
[2022-10-28T22:02:07.916+0900] [DEBUG] Client supplied directory:
[2022-10-28T22:02:08.309+0900] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[2022-10-28T22:02:08.320+0900] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100
[2022-10-28T22:02:08.336+0900] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[2022-10-28T22:02:08.352+0900] [WARN ] xrdp_caps_process_codecs: unknown codec id 5
[2022-10-28T22:02:08.368+0900] [INFO ] xrdp_caps_process_codecs: RemoteFX, codec id 3, properties len 49
[2022-10-28T22:02:08.386+0900] [DEBUG] xrdp_00004df2_wm_login_state_event_00000001

image

@TuNeXiZz
Copy link

This seems to be quite an issue for me. When connecting to the remote desktop from my Win 11 laptop, dragging windows etc is super slow. Also the solution of setting the connection speed to Lan as suggested in #2136 doesn't help. However when I try the same with my Win 10 desktop, changing the setting to Lan results in a performance boost while having it set to WLAN gives similar results on both systems. It seems to me like the issue described by @metalefty could cause the symptoms I see.

@metalefty
Copy link
Member Author

@TuNeXiZz Yes, the issue seems to be caused due to this.

@jsorg71 Jay, can we add Image RemotFX? I'm not very familiar with RemoteFX but as far as I read MS documentation, Image RemoteFX has little differences from (Video) RemoteFX. It will take a while until we implement GFX. I think some mitigation is needed.

@Nexarian
Copy link
Contributor

@metalefty I can look into this. I'm guessing that most of what we already have makes this possible...

@metalefty metalefty added the performance Performance issue such as codec, bandwidth and something label Jul 14, 2023
@metalefty
Copy link
Member Author

After #2400, codec GUID is recorded on the log. The Win11 client sends only 2 codecs:

[2023-07-17T14:25:46.742+0900] [INFO ] xrdp_caps_process_codecs: NSCodec(CA8D1BB9-000F-154F-589F-AE2D1A87E2D6), codec id [1], properties len [3]
[2023-07-17T14:25:46.743+0900] [WARN ] xrdp_caps_process_codecs: unknown(2744CCD4-9D8A-4E74-803C-0ECBEEA19C54), codec id [5], properties len [49]

2744CCD4-9D8A-4E74-803C-0ECBEEA19C54 is for Image RemoteFX. So we need to implement Image RemoteFX capability to reinstate performance with Win11 client.

@samikha
Copy link

samikha commented Aug 9, 2023

+1

Indeed, a Win10 client sends 3 codecs and the performance is good:

[INFO ] xrdp_caps_process_codecs: NSCodec(CA8D1BB9-000F-154F-589F-AE2D1A87E2D6), codec id [1], properties len [3]
[WARN ] xrdp_caps_process_codecs: unknown(2744CCD4-9D8A-4E74-803C-0ECBEEA19C54), codec id [5], properties len [49]
[INFO ] xrdp_caps_process_codecs: RemoteFX(76772F12-BD72-4463-AFB3-B73C9C6F7886), codec id [3], properties len [49]

But with Win11, only 2 are sent:

[INFO ] xrdp_caps_process_codecs: NSCodec(CA8D1BB9-000F-154F-589F-AE2D1A87E2D6), codec id [1], properties len [3]
[WARN ] xrdp_caps_process_codecs: unknown(2744CCD4-9D8A-4E74-803C-0ECBEEA19C54), codec id [5], properties len [49]

And no RFX is used which affects the performance

@Nexarian
Copy link
Contributor

Try going to the settings described here: stascorp/rdpwrap#810

AVC444v2 wasn't working on my Windows 11 install until I went there as well. This is keyed for AVC444, but there are RemoteFX settings too.

@metalefty
Copy link
Member Author

Started initial implementation: #2789

@metalefty metalefty linked a pull request Sep 8, 2023 that will close this issue
@metalefty
Copy link
Member Author

As far as I read the specification [MS-RDPRFX] the difference between Image RemoteFX vs Video RemoteFX is:

  • The encoder must send theencode header message sequence before every encode data message sequence.
  • The encode header message sequence is then followed by an arbitrary number of encode data message sequences.

@jsorg71 What do you think?

So it is much easier to implement than GFX and easier to backport to v0.9.

@metalefty
Copy link
Member Author

While working on this, I found an issue that seems to be a FreeRDP bug.
FreeRDP/FreeRDP#9425

@metalefty
Copy link
Member Author

metalefty commented Sep 30, 2023

Just for record my development progress.

Windows 11 mstsc.exe
Shell version: 10.0.22621
Control version: 10.0.621

Connecting to xrdp with Image RemoteFX codec.

[2023-09-30T14:18:04.437+0000] [INFO ] xrdp_caps_process_codecs: NSCodec(CA8D1BB9-000F-154F-589F-AE2D1A87E2D6), codec id [1], properties len [3]
[2023-09-30T14:18:04.440+0000] [INFO ] xrdp_caps_process_codecs: Image RemoteFX(2744CCD4-9D8A-4E74-803C-0ECBEEA19C54), codec id [5], properties len [49]

Here is the dump of properties of Image RemoteFX. Values indicated ^^ shows operating image remotefx mode.

0000   31 00 00 00 01 00 00 00 25 00 00 00 c0 cb 08 00   1.......%.......
0010   00 00 01 00 c1 cb 1d 00 00 00 01 c0 cf 02 00 08   ................
0020   00 00 01 40 00 02 01 01 01 00 01 40 00 02 01 01   ...@.......@....
0030   04             ^^                      ^^

https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdprfx/286655bf-bf34-40d4-b5cb-157dd86df346

@FrederickGeek8
Copy link

FrederickGeek8 commented Oct 17, 2023

Thank you for working on this! This is important to my work because I spend much of it in RDP and the lag is awful. I downgraded to Windows 10 because of this problem. Thanks a lot Microsoft…

@samikha
Copy link

samikha commented Oct 18, 2023

@metalefty
Thanks a lot for working on this too!

@FrederickGeek8 In the meantime on Windows 11, I'm using a wfreerdp.exe FreeRDP client downloaded from here:
https://ci.freerdp.com/job/freerdp-nightly-windows/

(linked to from https://github.com/FreeRDP/FreeRDP/wiki/PreBuilds)

The performance is not as good as Win10 client, but it's much better than the lag when using the Win11 client. Make sure you call wfreerdp.exe with /rfx

@metalefty
Copy link
Member Author

WIP pull requests:

It's really WIP and not working yet.

@metalefty
Copy link
Member Author

For the record:

xfreerdp /v:'[fe80::5a9c:fcff:fe0c:ff9a%ue0]' /u:almalinux /nsc /rfx /rfx-mode:image /log-level:DEBUG

[02:26:05:347] [72693:54f18e00] [DEBUG][com.freerdp.gdi] - frameId 1 frameAction 0
[02:26:05:360] [72693:54f18e00] [DEBUG][com.freerdp.gdi] - destLeft 0 destTop 0 destRight 1024 destBottom 768 bpp 32 flags 0 codecID 4 width 1024 height 768 length 98787
[02:26:05:360] [72693:54f18e00] [ERROR][com.freerdp.gdi] - Unsupported codecID 4
[02:26:05:361] [72693:54f18e00] [DEBUG][com.freerdp.core.update] - SurfaceFrameMarker: action: End (1) id: 1
[02:26:05:361] [72693:54f18e00] [DEBUG][com.freerdp.gdi] - frameId 1 frameAction 1

@remcoros
Copy link

I'm using this client: https://apps.microsoft.com/detail/9WZDNCRFJ3PS?hl=en-US&gl=US

It seems to perform better than Windows 11 mstsc.exe and wfreerdp

Note: MS does not develop that app anymore, but it's a good alternative while waiting for Image RemoteFX support

@metalefty
Copy link
Member Author

Thank you guys for the information about other clients!

We're working on implementing another efficient codec compatible with Win11. Use other clients such as FreeRDP for the time being as a workaround.

@metalefty
Copy link
Member Author

GFX support with multi-monitor support (including monitor hot plug/unplug) has been added (#2256 #2338 #2595 #2879 #2891 #2911 #2929 #2933 #2942). v0.10.0 will be released soon.

@samikha
Copy link

samikha commented Jul 30, 2024

BTW, running the latest xrdp versions I seem to be getting RFX Pro codec (from xrdp.log):

xrdp_encoder_create: starting gfx rfx pro codec session

which gives good performance when using Microsoft Remote Desktop client

@metalefty
Copy link
Member Author

Yes, we have switched to RFX Pro from classic RFX. This issue can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client performance Performance issue such as codec, bandwidth and something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants