Bug 488883 - Connecting with Windows RDP client fails with "An internal error has occurred"
Summary: Connecting with Windows RDP client fails with "An internal error has occurred"
Status: RESOLVED DUPLICATE of bug 489097
Alias: None
Product: KRdp
Classification: Plasma
Component: general (show other bugs)
Version: 6.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-21 10:45 UTC by fell
Modified: 2024-07-10 08:54 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
krdp segfault journal (15.85 KB, text/plain)
2024-06-23 05:42 UTC, Dinko
Details
krdp full gdb backtrace (164.64 KB, text/plain)
2024-06-24 08:41 UTC, Dinko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fell 2024-06-21 10:45:58 UTC
SUMMARY
I wanted to test out the new RDP feature in Plasma 6.1, but it seems like it does not work. When attempting to connect with the Windows 10 RDP client (see details below) it fails with "An internal error has occurred". Unfortunately it does not give me any other information.

The physical monitor of the remote machine was turned off when testing, this may or may not be related.

STEPS TO REPRODUCE
1. Set up a system with Plasma 6.1
2. Enable the RDP server in the system settings
3. (May be optional) Turn off or disconnect the monitor
4. Attempt to connect from a Windows machine
5. Accept the warning about the self-signed certificate

OBSERVED RESULT
The RDP client initially connects. It warns about a self signed certificate. After confirmation, it displays a black window matching the screen dimensions and an error message reading "An internal error has occurred".

EXPECTED RESULT
The RDP client initially connects. It warns about a self signed certificate. After confirmation, it displays an interactive window showing the screen of the remote machine.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.5-zen1-1.1-zen (64-bit)
Graphics Platform: wayland
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 31.3 GiB of RAM

Remote Desktop Connection:
Shell Version 10.0.19041
Control Version 10.0.19041
©2017 Microsoft Corporation. All rights reserved.
Network Level Authentication supported.
Remote Desktop Protocol 10.8 supported.
Comment 1 Dinko 2024-06-23 05:42:06 UTC
Created attachment 170844 [details]
krdp segfault journal

Same problem on
Operating System: Arch Linux 
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Xeon® CPU E3-1225 v3 @ 3.20GHz
Memory: 15,5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics P4600/P4700

I've attached the journal of the krdpserver segfault.
Comment 2 Akseli Lahtinen 2024-06-24 07:28:38 UTC
Can you install debug symbols for krdpserver and try again to see if the segfault happens? https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Backtraces

Also I can't connect to my system either, but I do not get a crash with KRDP. So there is connection issue at the very least.

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.1
Kernel Version: 6.9.5-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600

> KPIPEWIRE_FORCE_ENCODER=libx264 krdpserver -u test -p test
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib64/dri-nonfree/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
kpipewire_vaapi_logging: VAAPI: Mesa Gallium driver 24.1.2 for AMD Radeon RX 6600 (radeonsi, navi23, LLVM 18.1.6, DRM 3.57, 6.9.5-200.fc40.x86_64) in use for device "/dev/dri/renderD128"
kpipewire_vaapi_logging: DRM device not found
[10:26:22:985] [21626:21672] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
[10:26:22:985] [21626:21672] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
[10:26:22:985] [21626:21672] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
[10:26:25:870] [21626:21672] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEEDED [0x00090312]
[10:26:25:871] [21626:21672] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEEDED [0x00090313]
[10:26:25:871] [21626:21672] [ERROR][com.freerdp.core.transport] - BIO_read returned a system error 104: Connection reset by peer
[10:26:25:871] [21626:21672] [ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[10:26:25:871] [21626:21672] [ERROR][com.freerdp.core.nla] - [nla_recv] error: -1
[10:26:25:872] [21626:21672] [ERROR][com.freerdp.core.transport] - client authentication failure
[10:26:25:872] [21626:21672] [ERROR][com.freerdp.core.peer] - peer_recv_callback: CONNECTION_STATE_INITIAL - rdp_server_accept_nego() fail
[10:26:25:872] [21626:21672] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
[10:26:27:721] [21626:21698] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
[10:26:27:721] [21626:21698] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
[10:26:27:721] [21626:21698] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
[10:26:27:727] [21626:21698] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEEDED [0x00090312]
[10:26:27:728] [21626:21698] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEEDED [0x00090313]
[10:26:27:729] [21626:21698] [INFO][com.freerdp.core.connection] - Accepted client: DESKTOP-4TSPRTT
[10:26:27:729] [21626:21698] [INFO][com.freerdp.core.connection] - Accepted channels:
[10:26:27:729] [21626:21698] [INFO][com.freerdp.core.connection] -  rdpdr
[10:26:27:729] [21626:21698] [INFO][com.freerdp.core.connection] -  rdpsnd
[10:26:27:729] [21626:21698] [INFO][com.freerdp.core.connection] -  cliprdr
[10:26:27:729] [21626:21698] [INFO][com.freerdp.core.connection] -  drdynvc
[10:26:27:729] [21626:21698] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
[10:26:27:729] [21626:21698] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QApplication(0x7ffd97f70920), parent's thread is QThread(0x380b4710), current thread is QThread(0x383f6960)
org.kde.krdp: New client connected:  Windows platform Windows NT
kpipewire_record_logging: Forcing H264 Software encoding, main profile
[libx264 @ 0x7fc9cca21e80] -qscale is ignored, -crf is recommended.
[libx264 @ 0x7fc9cca21e80] MB rate (19350000) > level limit (16711680)
[libx264 @ 0x7fc9cca21e80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fc9cca21e80] profile Constrained Baseline, level 6.2, 4:2:0, 8-bit
kpipewire_dmabuf_logging: eglChooseConfig returned this many configs: 1
[10:26:27:986] [21626:21698] [ERROR][com.freerdp.core.transport] - BIO_read returned a system error 104: Connection reset by peer
[10:26:27:986] [21626:21698] [ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[10:26:27:986] [21626:21713] [ERROR][com.freerdp.channels.rdpgfx.server] - WTSVirtualChannelRead failed!
[10:26:27:986] [21626:21713] [ERROR][com.freerdp.channels.rdpgfx.server] - rdpgfx_server_handle_messages failed with error 1359
[libx264 @ 0x7fc9cca21e80] frame I:1     Avg QP:20.00  size:511449
[libx264 @ 0x7fc9cca21e80] frame P:8     Avg QP:24.62  size: 48973
[libx264 @ 0x7fc9cca21e80] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x7fc9cca21e80] mb P  I16..4:  2.1%  0.0%  0.0%  P16..4:  9.6%  0.0%  0.0%  0.0%  0.0%    skip:88.3%
[libx264 @ 0x7fc9cca21e80] coded y,uvDC,uvAC intra: 26.1% 24.1% 22.8% inter: 4.7% 6.2% 5.0%
[libx264 @ 0x7fc9cca21e80] i16 v,h,dc,p: 58% 31% 10%  1%
[libx264 @ 0x7fc9cca21e80] i8c dc,h,v,p: 72% 16% 11%  1%
[libx264 @ 0x7fc9cca21e80] kb/s:802872.88
*** pw_stream_destroy called from wrong context, check thread and locking: Not in loop
*** impl_ext_end_proxy called from wrong context, check thread and locking: Not in loop
'pthread_equal(impl->thread, thread_id)' failed at ../spa/plugins/support/loop.c:363 loop_leave()
Comment 3 Dinko 2024-06-24 08:41:38 UTC
Created attachment 170899 [details]
krdp full gdb backtrace

I've attached the backtrace with all debug symbols installed through gdb. Hope it helps.
Comment 4 Akseli Lahtinen 2024-07-02 09:33:44 UTC
Thank you, this is helpful
Comment 5 David R 2024-07-02 15:48:49 UTC
Hello,

Don't know if useful to mention it also, but same issue on Arch also.
I'm full intel on a laptop.

I've see the command : KPIPEWIRE_FORCE_ENCODER=libx264 krdpserver -u test -p test

KPIPEWIRE_FORCE_ENCODER=libx264 krdpserver -u test -p test
org.kde.krdp: Initializing Freedesktop Portal Session
org.kde.krdp: Listening for connections on QHostAddress("0.0.0.0") 3389
org.kde.krdp: Started Freedesktop Portal session
kpipewire_vaapi_logging: VAAPI: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 () in use for device "/dev/dri/renderD128"
org.kde.krdp: Closing Freedesktop Portal Session
org.kde.krdp: Initializing Freedesktop Portal Session
org.kde.krdp: Session setup completed, start processing...
[17:47:54:955] [3130:3161] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
[17:47:54:956] [3130:3161] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
[17:47:54:956] [3130:3161] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
org.kde.krdp: Started Freedesktop Portal session
[17:48:01:857] [3130:3161] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEEDED [0x00090312]
[17:48:01:864] [3130:3161] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEEDED [0x00090313]
[17:48:01:870] [3130:3161] [ERROR][com.freerdp.core.transport] - BIO_read returned a system error 104: Connexion ré-initialisée par le correspondant
[17:48:01:870] [3130:3161] [ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[17:48:01:870] [3130:3161] [ERROR][com.freerdp.core.nla] - [nla_recv] error: -1
[17:48:01:870] [3130:3161] [ERROR][com.freerdp.core.transport] - client authentication failure
[17:48:01:870] [3130:3161] [ERROR][com.freerdp.core.peer] - peer_recv_callback: CONNECTION_STATE_INITIAL - rdp_server_accept_nego() fail
[17:48:01:870] [3130:3161] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
org.kde.krdp: Unable to check file descriptor
org.kde.krdp: Closing session
org.kde.krdp: Closing Freedesktop Portal Session
org.kde.krdp: Initializing Freedesktop Portal Session
org.kde.krdp: Session setup completed, start processing...
[17:48:04:390] [3130:3173] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
[17:48:04:390] [3130:3173] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
[17:48:04:390] [3130:3173] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
[17:48:04:416] [3130:3173] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEEDED [0x00090312]
[17:48:04:422] [3130:3173] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEEDED [0x00090313]
[17:48:04:428] [3130:3173] [INFO][com.freerdp.core.connection] - Accepted client: DESKTOP-BB9QL0J
[17:48:04:428] [3130:3173] [INFO][com.freerdp.core.connection] - Accepted channels:
[17:48:04:428] [3130:3173] [INFO][com.freerdp.core.connection] -  rdpdr
[17:48:04:428] [3130:3173] [INFO][com.freerdp.core.connection] -  rdpsnd
[17:48:04:428] [3130:3173] [INFO][com.freerdp.core.connection] -  cliprdr
[17:48:04:428] [3130:3173] [INFO][com.freerdp.core.connection] -  drdynvc
[17:48:04:428] [3130:3173] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
[17:48:04:428] [3130:3173] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
org.kde.krdp: Started Freedesktop Portal session
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QApplication(0x7ffda8343420), parent's thread is QThread(0x63fb1559d8d0), current thread is QThread(0x63fb1593a370)
org.kde.krdp: New client connected:  Windows platform Windows NT
org.kde.krdp: Video stream initialized
kpipewire_record_logging: Forcing H264 Software encoding, main profile
org.kde.krdp: Received caps:
org.kde.krdp:   RDPGFX_CAPVERSION_8 AVC: false YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_81 AVC: false YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_10 AVC: true YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_102 AVC: true YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_103 AVC: true YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_104 AVC: true YUV420: true
org.kde.krdp:   RDPGFX_CAPVERSION_105 AVC: true YUV420: true
org.kde.krdp:   RDPGFX_CAPVERSION_106 AVC: true YUV420: true
org.kde.krdp: Selected caps: RDPGFX_CAPVERSION_106
[libx264 @ 0x7719c046ab00] -qscale is ignored, -crf is recommended.
[libx264 @ 0x7719c046ab00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7719c046ab00] profile Constrained Baseline, level 6.1, 4:2:0, 8-bit
kpipewire_dmabuf_logging: eglChooseConfig returned this many configs: 1
zsh: segmentation fault (core dumped)  KPIPEWIRE_FORCE_ENCODER=libx264 krdpserver -u test -p test

Hope this helps a bit.

Regards
Comment 6 Arjen Hiemstra 2024-07-10 08:54:17 UTC

*** This bug has been marked as a duplicate of bug 489097 ***