*** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Please remove this comment after reading and before submitting - thanks! *** SUMMARY This was not an issue in KRDC from 5.x, new since upgrading to KRDC 6.x with libfreerdp integration (which is great btw and means I can run natively without XWayland). After logging in to Windows using RDP, if I log out or disconnect (or get idle disconnected), the tab will stay active (with just the last bitmap on the screen) and I have to manually disconnect. In prior KRDC it would go away. STEPS TO REPRODUCE 1. login to Windows via RDP 2. start->sign off or log out or whatever, or disconnect 3. notice that tab is still there, have to press disconnect on KRDC menu or X on tab OBSERVED RESULT tab stays up EXPECTED RESULT tab should be disposed of SOFTWARE/OS VERSIONS Windows: macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: KDE Plasma Version: KDE Frameworks Version: 6.12.0 Qt Version: 6.8.3 ADDITIONAL INFORMATION Here are the console messages surrounding the connect and then disconnect [11:41:40:543] [2214069:00221bbc] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [dynamic] Loaded pulse backend for rdpsnd [11:41:41:644] [2214069:00221bbc] [INFO][com.freerdp.channels.rdpsnd.client] - [rdpsnd_load_device_plugin]: [dynamic] Loaded pulse backend for rdpsnd [11:41:41:898] [2214069:00221bbc] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:14} OnOpen=(nil), OnClose=0x7a7b32e7c040 [11:41:59:446] [2214069:0021c919] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:14} OnOpen=(nil), OnClose=0x7a7b32e7c040 [11:42:00:235] [2214069:0021c901] [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_LOGOFF_BY_USER (0x0000000C):The disconnection was initiated by the user logging off their session on the server. [11:42:00:235] [2214069:0021c901] [ERROR][com.freerdp.core] - [rdp_set_error_info]: ERRINFO_LOGOFF_BY_USER [0x0001000C] [11:42:01:810] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:815] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:817] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:819] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:822] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:824] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:826] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:828] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:828] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [11:42:01:830] [2214069:0021c8b5] [WARN][com.freerdp.api] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated
Hum, i need to investigate a bit further on this one, since it's working here (the tab closes on remote disconnect): [23:15:52:094] [8343:000020ae] [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_LOGOFF_BY_USER (0x0000000C):The disconnection was initiated by the user logging off their session on the server. [23:15:52:094] [8343:000020ae] [ERROR][com.freerdp.core] - [rdp_set_error_info]: ERRINFO_LOGOFF_BY_USER [0x0001000C] [23:15:52:094] [8343:000020ae] [ERROR][com.freerdp.core.rdp] - [rdp_recv_callback_int][0x4093b970]: CONNECTION_STATE_CAPABILITIES_EXCHANGE_DEMAND_ACTIVE status STATE_RUN_QUIT_SESSION [-2] [23:15:52:094] [8343:000020ae] [ERROR][com.freerdp.core.transport] - [transport_check_fds]: transport_check_fds: transport->ReceiveCallback() - STATE_RUN_QUIT_SESSION [-2] [23:15:52:207] [8343:000020ae] [WARN][com.freerdp.channels.rdpsnd.client] - [rdpsnd_check_pulse]: pulse->stream=(nil)
What is the best way to get more information? For instance, what environment variables can I set to perhaps get more debugging output to help narrow down where the issue may be?
I use these: WLOG_LEVEL=DEBUG QT_LOGGING_RULES="KRDC=true" krdc
Created attachment 180581 [details] attachment-620899-0.html I'm not sure if it got everything needed, but I did set those two environment variables and ran KRDC and connected to a desktop, then did a disconnect, but the tab stayed up. Let me know if you want to see a video. ... [14:08:25:327] [3323673:0032b958] [DEBUG][com.freerdp.channels.rdpgfx.client] - [rdpgfx_recv_evict_cache_entry_pdu]: RecvEvictCacheEntryPdu: ca cheSlot: 421 [14:08:25:327] [3323673:0032b958] [DEBUG][com.freerdp.channels.rdpgfx.client] - [rdpgfx_recv_evict_cache_entry_pdu]: RecvEvictCacheEntryPdu: ca cheSlot: 422 [14:08:55:086] [3323673:0032b928] [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_RPC_INITIATED_DISCONNECT (0x00000001):The disconnection was initiated by an administrative tool on the server in another session. [14:08:55:086] [3323673:0032b928] [ERROR][com.freerdp.core] - [rdp_set_error_info]: ERRINFO_RPC_INITIATED_DISCONNECT [0x00010001] [14:08:55:086] [3323673:0032b928] [DEBUG][com.freerdp.core.rdp] - [rdp_read_header][0x5fb9d83c8410]: DisconnectProviderUltimatum: reason: 1 [14:08:55:087] [3323673:0032b928] [DEBUG][com.freerdp.core.rdp] - [rdp_finalize_reset_flags][0x5fb9d83c8410]: [CONNECTION_STATE_ACTIVE] reset finalize_sc_pdus [14:08:55:087] [3323673:0032b928] [DEBUG][com.freerdp.core.rdp] - [rdp_client_transition_to_state][0x5fb9d83c8410]: CONNECTION_STATE_ACTIVE --> CONNECTION_STATE_INITIAL [14:08:55:091] [3323673:0032b958] [WARN][com.freerdp.channels.drdynvc.client] - [check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:17} OnOpen=(nil), OnClose=0x70e48fe05040 [14:08:55:091] [3323673:0032b928] [DEBUG][com.freerdp.channels.audin.client] - [audin_pulse_context_state_callback]: context state PA_CONTEXT_TERMINATED KRDC: RemoteView::Disconnected [14:09:14:399] [3323673:0032b719] [WARN][com.freerdp.core] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated [14:09:14:401] [3323673:0032b719] [WARN][com.freerdp.core] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated ... (many repeated messages about input because i had moved my mouse over the window) [14:09:17:806] [3323673:0032b719] [WARN][com.freerdp.core] - [input_ensure_client_running]: [APPLICATION BUG] input functions called after the session terminated After clicking the X to close the tab that was stuck: KRDC: Stopping RDP session KRDC: RDP session stopped KRDC: KRDC: saving window size: QSize(1536, 896) KRDC: -1 KRDC: -1 KRDC: 0 KRDC: 0 -----Original Message----- From: Fabio <bugzilla_noreply@kde.org<mailto:Fabio%20%3cbugzilla_noreply@kde.org%3e>> Reply-To: bug-control@kde.org<mailto:bug-control@kde.org> To: mike@papersolve.com<mailto:mike@papersolve.com> Subject: [krdc] [Bug 503176] krdc RDP tab stays open even on remote logout/disconnect Date: 04/23/2025 01:44:43 PM https://bugs.kde.org/show_bug.cgi?id=503176 --- Comment #3 from Fabio <ctrlaltca@gmail.com<mailto:ctrlaltca@gmail.com>> --- I use these: WLOG_LEVEL=DEBUG QT_LOGGING_RULES="KRDC=true" krdc
A possibly relevant merge request was started @ https://invent.kde.org/network/krdc/-/merge_requests/180
Thank you for the detailed logs, I think I've found the bug and fixed it.
Git commit 9c53100d0d6a92202dd551963b6234cd0e2c3e5a by Fabio Bas. Committed on 23/04/2025 at 19:52. Pushed by ctrlaltca into branch 'master'. RDP: ensure rdpview gets closed on session disconnect M +1 -1 rdp/rdpview.cpp https://invent.kde.org/network/krdc/-/commit/9c53100d0d6a92202dd551963b6234cd0e2c3e5a
Git commit 65f48d148724fe3e482548046008e9704675a5a2 by Fabio Bas. Committed on 23/04/2025 at 19:55. Pushed by ctrlaltca into branch 'release/25.04'. RDP: ensure rdpview gets closed on session disconnect (cherry picked from commit 9c53100d0d6a92202dd551963b6234cd0e2c3e5a) Co-authored-by: Fabio Bas <ctrlaltca@gmail.com> M +1 -1 rdp/rdpview.cpp https://invent.kde.org/network/krdc/-/commit/65f48d148724fe3e482548046008e9704675a5a2
Confirmed, that did it, thanks!