Skip to content

Clipboard suddenly stop to work #3625

@Mingun

Description

@Mingun

xrdp version

0.9.24

Detailed xrdp version, build options

$ xrdp --version
xrdp 0.9.24
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2020 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/xrdp-Fn5kxo/xrdp-0.9.24=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/build/xrdp-Fn5kxo/xrdp-0.9.24=/usr/src/xrdp-0.9.24-4 
      LDFLAGS=-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=3 
      PKG_CONFIG_PATH=/build/xrdp-Fn5kxo/xrdp-0.9.24/pkgconfig

  Compiled with OpenSSL 3.0.13 30 Jan 2024

Operating system & version

Ubuntu 24.04.3 LTS

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

xorg (libxup.so)

What desktop environment do you use?

GNOME

Environment xrdp running on

No response

What's your client?

mstsc.exe from Windows 10, 19044.6332

Area(s) with issue?

Clipboard

Steps to reproduce

I started remote session on my work computer when I worked remotely. I finish my work and on the next day I reconnected to the session and some time later found, that I cannot copy-paste text or files between local and remote computers, neither from client to host, or host to client. That issue remains persistent after reconnection to the session.

After looking at logs I found the following lines:
/var/log/xrdp.log

[20251001-21:36:48] [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed
[20251001-21:36:48] [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed
[20251001-21:36:48] [ERROR] libxrdp_process_data: xrdp_rdp_recv failed
[20251001-21:36:48] [ERROR] xrdp_process_data_in: xrdp_process_loop failed
[20251001-21:36:48] [ERROR] SSL_write: I/O error
[20251001-21:36:48] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[20251001-21:36:49] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
[20251001-21:38:16] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:10.8.14.189 port 54177
[20251001-21:38:16] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20251001-21:38:16] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20251001-21:38:16] [INFO ] Security protocol: configured [SSL|RDP], requested [SSL|HYBRID|HYBRID_EX|RDP], selected [SSL]
[20251001-21:38:16] [ERROR] SSL_read: I/O error
[20251001-21:38:16] [ERROR] libxrdp_force_read: header read error
[20251001-21:38:16] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:10.8.14.189 port 54178
[20251001-21:38:16] [ERROR] Processing [ITU-T T.125] Connect-Initial failed
[20251001-21:38:16] [ERROR] [MCS Connection Sequence] receive connection request failed
[20251001-21:38:16] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20251001-21:38:16] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
[20251001-21:38:16] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20251001-21:38:16] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
[20251001-21:38:16] [INFO ] Security protocol: configured [SSL|RDP], requested [SSL|HYBRID|HYBRID_EX|RDP], selected [SSL]
[20251001-21:38:16] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
[20251001-21:38:16] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[20251001-21:38:16] [INFO ] Connected client computer name: MOTHERSHIP
[20251001-21:38:16] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
[20251001-21:38:16] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20251001-21:38:16] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20251001-21:38:17] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000409]
[20251001-21:38:17] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
[20251001-21:38:17] [INFO ] TLS connection established from ::ffff:10.8.14.189 port 54178: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384
[20251001-21:38:17] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20251001-21:38:17] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100
[20251001-21:38:17] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[20251001-21:38:17] [WARN ] xrdp_caps_process_codecs: unknown codec id 5
[20251001-21:38:17] [INFO ] xrdp_caps_process_codecs: RemoteFX, codec id 3, properties len 49
[20251001-21:38:17] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20251001-21:38:17] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20251001-21:38:28] [INFO ] connecting to sesman on 127.0.0.1:3350
[20251001-21:38:28] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20251001-21:38:28] [INFO ] sesman connect ok
[20251001-21:38:28] [INFO ] sending login info to session manager. Please wait...
[20251001-21:38:29] [INFO ] xrdp_wm_log_msg: login successful for user mingun on display 10
[20251001-21:38:29] [INFO ] login successful for user mingun on display 10
[20251001-21:38:29] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20251001-21:38:29] [INFO ] started connecting
[20251001-21:38:29] [INFO ] lib_mod_connect: connecting via UNIX socket
[20251001-21:38:29] [INFO ] lib_mod_log_peer: xrdp_pid=207023 connected to X11rdp_pid=48171 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff:10.8.14.189 client_port=54178
[20251001-21:38:29] [INFO ] connected ok
[20251001-21:38:33] [WARN ] xrdp_mm_chansrv_connect: connect failed trying again...
[20251001-21:38:37] [WARN ] xrdp_mm_chansrv_connect: connect failed trying again...
[20251001-21:38:41] [WARN ] xrdp_mm_chansrv_connect: connect failed trying again...
[20251001-21:38:46] [WARN ] xrdp_mm_chansrv_connect: connect failed trying again...
[20251001-21:38:46] [ERROR] xrdp_mm_chansrv_connect: error in trans_connect chan

/var/log/xrdp-sesman.log

[20251001-21:38:28] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 34854
[20251001-21:38:29] [INFO ] ++ reconnected session: username mingun, display :10.0, session_pid 48143, ip ::ffff:10.8.14.189:54178 - socket: 12
[20251001-21:38:29] [ERROR] sesman_data_in: scp_process_msg failed
[20251001-21:38:29] [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
[20251001-21:38:29] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20251001-21:38:30] [INFO ] Process 207026 has exited

~/.local/share/xrdp/xrdp-chansrv.10.log
Note, that this log does not contain entries from the several last reconnects. You also can notice, that on the previous day it successfully transferred file from remote to client, so clipboard worked that time:

[20250930-20:09:15] [INFO ] Socket 12: AF_UNIX connection received
[20250930-20:09:15] [INFO ] sound_process_output_format:
[20250930-20:09:15] [INFO ]       wFormatNo       0
[20250930-20:09:15] [INFO ]       wFormatTag      WAVE_FORMAT_PCM
[20250930-20:09:15] [INFO ]       nChannels       2
[20250930-20:09:15] [INFO ]       nSamplesPerSec  44100
[20250930-20:09:15] [INFO ]       nAvgBytesPerSec 176400
[20250930-20:09:15] [INFO ]       nBlockAlign     4
[20250930-20:09:15] [INFO ]       wBitsPerSample  16
[20250930-20:09:15] [INFO ]       cbSize          0
[20250930-20:09:15] [INFO ] sound_process_output_format:
[20250930-20:09:15] [INFO ]       wFormatNo       1
[20250930-20:09:15] [INFO ]       wFormatTag      WAVE_FORMAT_PCM
[20250930-20:09:16] [INFO ]       nChannels       2
[20250930-20:09:16] [INFO ]       nSamplesPerSec  22050
[20250930-20:09:16] [INFO ]       nAvgBytesPerSec 88200
[20250930-20:09:16] [INFO ]       nBlockAlign     4
[20250930-20:09:16] [INFO ]       wBitsPerSample  16
[20250930-20:09:16] [INFO ]       cbSize          0
[20250930-20:09:16] [INFO ] sound_process_training: round trip time 15
[20250930-20:09:16] [INFO ] Detected remote smartcard 'SCARD'
[20250930-20:09:16] [INFO ] Detected remote printer 'PRN3' (not supported)
[20250930-20:09:16] [INFO ] Detected remote printer 'PRN4' (not supported)
[20250930-20:09:16] [INFO ] Detected remote printer 'PRN2' (not supported)
[20250930-21:45:23] [INFO ] S2C: Transferred a file: filename=/home/mingun/Изображения/OnCommandOpen.png, uid=1000
[20251001-11:20:00] [INFO ] Socket 12: AF_UNIX connection received
[20251001-11:20:01] [INFO ] sound_process_output_format:
[20251001-11:20:01] [INFO ]       wFormatNo       0
[20251001-11:20:01] [INFO ]       wFormatTag      WAVE_FORMAT_PCM
[20251001-11:20:01] [INFO ]       nChannels       2
[20251001-11:20:01] [INFO ]       nSamplesPerSec  44100
[20251001-11:20:01] [INFO ]       nAvgBytesPerSec 176400
[20251001-11:20:01] [INFO ]       nBlockAlign     4
[20251001-11:20:01] [INFO ]       wBitsPerSample  16
[20251001-11:20:01] [INFO ]       cbSize          0
[20251001-11:20:01] [INFO ] sound_process_output_format:
[20251001-11:20:01] [INFO ]       wFormatNo       1
[20251001-11:20:01] [INFO ]       wFormatTag      WAVE_FORMAT_PCM
[20251001-11:20:01] [INFO ]       nChannels       2
[20251001-11:20:01] [INFO ]       nSamplesPerSec  22050
[20251001-11:20:02] [INFO ]       nAvgBytesPerSec 88200
[20251001-11:20:02] [INFO ]       nBlockAlign     4
[20251001-11:20:02] [INFO ]       wBitsPerSample  16
[20251001-11:20:02] [INFO ]       cbSize          0
[20251001-11:20:02] [INFO ] sound_process_training: round trip time 13
[20251001-11:20:02] [INFO ] Detected remote smartcard 'SCARD'
[20251001-11:20:02] [INFO ] Detected remote printer 'PRN3' (not supported)
[20251001-11:20:02] [INFO ] Detected remote printer 'PRN4' (not supported)
[20251001-11:20:02] [INFO ] Detected remote printer 'PRN2' (not supported)

I also found that /etc/xrdp/reconnectwm.sh was not run, because some time after unexpected disconnect I noted, that my keyboard layout was not restored, which should done by this script (as recommended in #3579 (comment)). /run/user/$(id -u)/reconnect.log, however, contains:

+ sleep 1
+ setxkbmap -layout us,ru

✔️ Expected Behavior

Clipboard should not stop working

❌ Actual Behavior

Clipboard stop working and I have no idea how to enable it again (except rebooting remote machine (I hope))

Anything else?

By the way, why logs are so obscure? If some method "failed" why there is no at least result code of this failure? How to debug such problems?

Also, I installing updates on remote machine (including new Linux kernel version), but did not reboot it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions