[GH-ISSUE #358] Windows11 RDP connect Ubuntu 22.04 failed #1272

Closed
opened 2026-02-28 12:03:26 +03:00 by kerem · 8 comments
Owner

Originally created by @Yan-Gzc on GitHub (Feb 24, 2023).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/358

Originally assigned to: @VShawn on GitHub.

Windows11 RDP connect Ubuntu 22.04 failed

PRemoteM version: v0.7.2.2

Description:

  1. Ubuntu 22.04 开启系统自带RDP配置
  2. mstsc 连接正常
  3. remote 远程桌面 连接正常
  4. PRemoteM 连接闪退,log:exit with error code 3334(由于协议错误,会话连接将断开。请重新连接到远程计算机。

20230224143505

Log :

[T:001][14:20:02.545] Debug SetSelfStartingHelper.SetSelfStartByRegistryKey(True, "PRemoteM")
[T:012][14:20:02.557] Warning [ProtocolRunnerHostHelper.cs(GetRunner:33)] we don't have a protocol named: RDP
[T:001][14:20:02.558] Info CloseEmptyWindows: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 0
[T:001][14:20:02.562] Debug AxMsRdpClient09Host: Status => Initializing
[T:001][14:20:02.563] Debug RDP Host: _rdpClient.Dispose()
[T:001][14:20:02.563] Debug RDP Host: init new AxMsRdpClient9NotSafeForScriptingEx()
[T:001][14:20:02.564] Debug RDP Host: init CreateControl();
[T:001][14:20:02.597] Debug RDP Host: init Static
[T:001][14:20:02.597] Debug RDP Host: init conn bar
[T:001][14:20:02.598] Debug RDP Host: init Redirect
[T:001][14:20:02.598] Debug RDP Host: init Display with ScaleFactor = 125, W = 0, H = 0
[T:001][14:20:02.600] Debug RDP Host: Display init end: RDP.DesktopWidth = 2560, RDP.DesktopHeight = 1080,
[T:001][14:20:02.600] Debug RDP Host: init Performance
[T:001][14:20:02.601] Debug RdpInit: DisplayPerformance = Auto, flag = 0
[T:001][14:20:02.601] Debug RDP Host: init Gateway
[T:001][14:20:02.601] Debug AxMsRdpClient09Host: Status => Initialized
[T:001][14:20:02.840] Info CloseEmptyWindows: Current: Host = 1, Full = 1, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 0
[T:001][14:20:02.841] Debug Move host(23738738) to full(12322052)
[T:001][14:20:02.842] Info MoveProtocolHostToFullScreen: Current: Host = 1, Full = 1, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 0
[T:001][14:20:02.842] Debug AxMsRdpClient09Host: Status => Connecting
[T:001][14:20:03.123] Debug Start Conn: Office-T480(55513932) by host(23738738) with full
[T:001][14:20:10.537] Debug RDP Host: OnRequestGoFullScreen
[T:001][14:20:10.670] Debug RDP to FullScreen resize ParentWindow to : W = 2048, H = 864, while screen size is 2560 × 1080, ScaleFactor = 125
[T:001][14:20:10.670] Debug RDP resize to: W = 2560, H = 1080, ScaleFactor = 125
[T:001][14:20:10.671] Error [AxMsRdpClient09Host.xaml.cs(b__0:750)]

System.Runtime.InteropServices.COMException (0x8000FFFF): 灾难性故障 (0x8000FFFF (E_UNEXPECTED))
at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
at AxMSTSCLib.AxMsRdpClient9NotSafeForScripting.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
at PRM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass49_0.b__0() in D:\a\PRemoteM\PRemoteM\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 750

StackTrace: at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
at AxMSTSCLib.AxMsRdpClient9NotSafeForScripting.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
at PRM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass49_0.b__0() in D:\a\PRemoteM\PRemoteM\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 750

[T:001][14:20:11.122] Debug RDP Host: RdpOnOnConnected
[T:001][14:20:11.122] Debug AxMsRdpClient09Host: Status => Connected
[T:001][14:20:11.128] Debug RDP Host: ReConn with full screen
[T:001][14:20:11.196] Debug RDP Host: RdpOnDisconnected
[T:001][14:20:11.196] Debug AxMsRdpClient09Host: Status => Disconnected
[T:001][14:20:11.196] Warning [AxMsRdpClient09Host.cs(OnRdpClientDisconnected:112)] RDP(Office-T480) exit with error code 3334(由于协议错误,会话连接将断开。请重新连接到远程计算机。)
[T:001][14:20:11.407] Debug RDP Host: _rdpClient.Dispose()
[T:027][14:20:11.408] Debug MarkProtocolHostToClose: marking to close: AxMsRdpClient09Host(id = 6, hash = 23738738)
[T:027][14:20:11.408] Info MarkProtocolHostToClose: Current: Host = 0, Full = 1, Tab = 0, HostToBeDispose = 1, WindowToBeDispose = 0
[T:027][14:20:11.409] Info CloseEmptyWindows: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 1, WindowToBeDispose = 1
[T:027][14:20:11.409] Debug Closing: 1 Empty Host.
[T:027][14:20:11.410] Info CloseMarkedProtocolHost: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 1
[T:027][14:20:11.410] Debug Disposing AxMsRdpClient09Host(23738738)
[T:027][14:20:11.433] Debug RDP Host: _rdpClient.Dispose()
[T:027][14:20:11.434] Debug Dispose done AxMsRdpClient09Host(23738738)

Originally created by @Yan-Gzc on GitHub (Feb 24, 2023). Original GitHub issue: https://github.com/1Remote/1Remote/issues/358 Originally assigned to: @VShawn on GitHub. Windows11 RDP connect Ubuntu 22.04 failed PRemoteM version: v0.7.2.2 Description: 1. Ubuntu 22.04 开启系统自带RDP配置 2. mstsc 连接正常 3. remote 远程桌面 连接正常 4. PRemoteM 连接闪退,log:exit with error code 3334(由于协议错误,会话连接将断开。请重新连接到远程计算机。 ![20230224143505](https://user-images.githubusercontent.com/16558453/221109200-044b1848-f466-470a-8d7d-e5870de912d2.png) Log : [T:001][14:20:02.545] `Debug` SetSelfStartingHelper.SetSelfStartByRegistryKey(True, "PRemoteM") [T:012][14:20:02.557] `Warning` [ProtocolRunnerHostHelper.cs(GetRunner:33)] we don't have a protocol named: RDP [T:001][14:20:02.558] `Info` CloseEmptyWindows: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 0 [T:001][14:20:02.562] `Debug` AxMsRdpClient09Host: Status => Initializing [T:001][14:20:02.563] `Debug` RDP Host: _rdpClient.Dispose() [T:001][14:20:02.563] `Debug` RDP Host: init new AxMsRdpClient9NotSafeForScriptingEx() [T:001][14:20:02.564] `Debug` RDP Host: init CreateControl(); [T:001][14:20:02.597] `Debug` RDP Host: init Static [T:001][14:20:02.597] `Debug` RDP Host: init conn bar [T:001][14:20:02.598] `Debug` RDP Host: init Redirect [T:001][14:20:02.598] `Debug` RDP Host: init Display with ScaleFactor = 125, W = 0, H = 0 [T:001][14:20:02.600] `Debug` RDP Host: Display init end: RDP.DesktopWidth = 2560, RDP.DesktopHeight = 1080, [T:001][14:20:02.600] `Debug` RDP Host: init Performance [T:001][14:20:02.601] `Debug` RdpInit: DisplayPerformance = Auto, flag = 0 [T:001][14:20:02.601] `Debug` RDP Host: init Gateway [T:001][14:20:02.601] `Debug` AxMsRdpClient09Host: Status => Initialized [T:001][14:20:02.840] `Info` CloseEmptyWindows: Current: Host = 1, Full = 1, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 0 [T:001][14:20:02.841] `Debug` Move host(23738738) to full(12322052) [T:001][14:20:02.842] `Info` MoveProtocolHostToFullScreen: Current: Host = 1, Full = 1, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 0 [T:001][14:20:02.842] `Debug` AxMsRdpClient09Host: Status => Connecting [T:001][14:20:03.123] `Debug` Start Conn: Office-T480(55513932) by host(23738738) with full [T:001][14:20:10.537] `Debug` RDP Host: OnRequestGoFullScreen [T:001][14:20:10.670] `Debug` RDP to FullScreen resize ParentWindow to : W = 2048, H = 864, while screen size is 2560 × 1080, ScaleFactor = 125 [T:001][14:20:10.670] `Debug` RDP resize to: W = 2560, H = 1080, ScaleFactor = 125 [T:001][14:20:10.671] `Error` [AxMsRdpClient09Host.xaml.cs(<SetRdpResolution>b__0:750)] > System.Runtime.InteropServices.COMException (0x8000FFFF): 灾难性故障 (0x8000FFFF (E_UNEXPECTED)) at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at AxMSTSCLib.AxMsRdpClient9NotSafeForScripting.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at PRM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass49_0.<SetRdpResolution>b__0() in D:\a\PRemoteM\PRemoteM\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 750 > StackTrace: at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at AxMSTSCLib.AxMsRdpClient9NotSafeForScripting.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at PRM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass49_0.<SetRdpResolution>b__0() in D:\a\PRemoteM\PRemoteM\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 750 [T:001][14:20:11.122] `Debug` RDP Host: RdpOnOnConnected [T:001][14:20:11.122] `Debug` AxMsRdpClient09Host: Status => Connected [T:001][14:20:11.128] `Debug` RDP Host: ReConn with full screen [T:001][14:20:11.196] `Debug` RDP Host: RdpOnDisconnected [T:001][14:20:11.196] `Debug` AxMsRdpClient09Host: Status => Disconnected [T:001][14:20:11.196] `Warning` [AxMsRdpClient09Host.cs(OnRdpClientDisconnected:112)] RDP(Office-T480) exit with error code 3334(由于协议错误,会话连接将断开。请重新连接到远程计算机。) [T:001][14:20:11.407] `Debug` RDP Host: _rdpClient.Dispose() [T:027][14:20:11.408] `Debug` MarkProtocolHostToClose: marking to close: AxMsRdpClient09Host(id = 6, hash = 23738738) [T:027][14:20:11.408] `Info` MarkProtocolHostToClose: Current: Host = 0, Full = 1, Tab = 0, HostToBeDispose = 1, WindowToBeDispose = 0 [T:027][14:20:11.409] `Info` CloseEmptyWindows: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 1, WindowToBeDispose = 1 [T:027][14:20:11.409] `Debug` Closing: 1 Empty Host. [T:027][14:20:11.410] `Info` CloseMarkedProtocolHost: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 1 [T:027][14:20:11.410] `Debug` Disposing AxMsRdpClient09Host(23738738) [T:027][14:20:11.433] `Debug` RDP Host: _rdpClient.Dispose() [T:027][14:20:11.434] `Debug` Dispose done AxMsRdpClient09Host(23738738)
kerem 2026-02-28 12:03:26 +03:00
Author
Owner

@VShawn commented on GitHub (Feb 24, 2023):

因为我目前手上没有带桌面的 Ubuntu 机器进行测试(倒不如说我就没有带桌面的Linux机器...),所以要晚些再弄。

你可以暂时勾选这个选项,使用 mstsc 来连接你这台服务器。

image

<!-- gh-comment-id:1442893915 --> @VShawn commented on GitHub (Feb 24, 2023): 因为我目前手上没有带桌面的 Ubuntu 机器进行测试(倒不如说我就没有带桌面的Linux机器...),所以要晚些再弄。 你可以暂时勾选这个选项,使用 mstsc 来连接你这台服务器。 ![image](https://user-images.githubusercontent.com/10143738/221114195-5feffc65-d2a6-443a-9c95-0d4e1a8f06d8.png)
Author
Owner

@Yan-Gzc commented on GitHub (Mar 1, 2023):

目前确实这样在使用,tks

<!-- gh-comment-id:1449254904 --> @Yan-Gzc commented on GitHub (Mar 1, 2023): 目前确实这样在使用,tks
Author
Owner

@VShawn commented on GitHub (Jun 21, 2023):

image

works with win10 + ubuntu22.04, maybe it related to Win11

<!-- gh-comment-id:1600019409 --> @VShawn commented on GitHub (Jun 21, 2023): ![image](https://github.com/1Remote/1Remote/assets/10143738/d9c1ab96-0d2a-4d26-8d22-214b9ed7b303) works with win10 + ubuntu22.04, maybe it related to Win11
Author
Owner

@VShawn commented on GitHub (Jul 4, 2023):

@Yan-Gzc 请问现在还有这个问题么?Ubuntu22 的RDP 在我电脑上工作得很好。

<!-- gh-comment-id:1619578160 --> @VShawn commented on GitHub (Jul 4, 2023): @Yan-Gzc 请问现在还有这个问题么?Ubuntu22 的RDP 在我电脑上工作得很好。
Author
Owner

@scylamb commented on GitHub (Jul 5, 2023):

@VShawn 借个楼问一嘴,没法全屏是我的问题?
image

<!-- gh-comment-id:1621026513 --> @scylamb commented on GitHub (Jul 5, 2023): @VShawn 借个楼问一嘴,没法全屏是我的问题? ![image](https://github.com/1Remote/1Remote/assets/24493892/24a3624e-dfa7-4069-a6e8-b455c7cec61f)
Author
Owner

@scylamb commented on GitHub (Jul 5, 2023):

@VShawn 借个楼问一嘴,没法全屏是我的问题? image

也是Win11 U22.04

<!-- gh-comment-id:1621026804 --> @scylamb commented on GitHub (Jul 5, 2023): > @VShawn 借个楼问一嘴,没法全屏是我的问题? ![image](https://user-images.githubusercontent.com/24493892/251040600-24a3624e-dfa7-4069-a6e8-b455c7cec61f.png) 也是Win11 U22.04
Author
Owner

@VShawn commented on GitHub (Jul 5, 2023):

这个是软件bug,以前也偶尔会接到没有最大化按钮的反馈,我一直在追踪它但一直没定位到问题所在。你那边能复现这个bug吗?

<!-- gh-comment-id:1621027655 --> @VShawn commented on GitHub (Jul 5, 2023): 这个是软件bug,以前也偶尔会接到没有最大化按钮的反馈,我一直在追踪它但一直没定位到问题所在。你那边能复现这个bug吗?
Author
Owner

@VShawn commented on GitHub (Jul 30, 2023):

close the inactive ticket feel free to reopen it.

<!-- gh-comment-id:1657052957 --> @VShawn commented on GitHub (Jul 30, 2023): close the inactive ticket feel free to reopen it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#1272
No description provided.