Exactly the same behaviour here on a RPI3 with a fresh bookworm 64bits. Did the same as Otalado with exactly the same result.
Given the fact that he has this on a ripi5 and i on a rpi3 points that this issue might be related to bookworm, and not so much to the board version.
Xrdp used to work fine on older versions of the software. Most probably related to with the move to Wayland in Bookworm?
Has anyone Xrdp working on bookworm? If so, please tell what magic you did to get it working.
The output of my /var/log/xrdp.log:
[20240217-16:38:27] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.9 port 33340
[20240217-16:38:27] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20240217-16:38:27] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20240217-16:38:27] [INFO ] Security protocol: configured [SSL|RDP], requested [SSL|HYBRID|HYBRID_EX|RDP], selected [SSL]
[20240217-16:38:27] [INFO ] Connected client computer name: SM-G781B
[20240217-16:38:27] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20240217-16:38:27] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20240217-16:38:27] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00c is unknown (ignored)
[20240217-16:38:28] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000409]
[20240217-16:38:28] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
[20240217-16:38:28] [INFO ] TLS connection established from ::ffff:192.168.1.9 port 33340: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384
[20240217-16:38:28] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20240217-16:38:28] [INFO ] xrdp_process_offscreen_bmpcache: support level 0 cache size 0 MB cache entries 0
[20240217-16:38:28] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[20240217-16:38:28] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20240217-16:38:28] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20240217-16:38:28] [INFO ] connecting to sesman on 127.0.0.1:3350
[20240217-16:38:28] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20240217-16:38:28] [INFO ] sesman connect ok
[20240217-16:38:28] [INFO ] sending login info to session manager. Please wait...
[20240217-16:38:29] [INFO ] xrdp_wm_log_msg: login successful for user pi2 on display 10
[20240217-16:38:29] [INFO ] login successful for user pi2 on display 10
[20240217-16:38:29] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20240217-16:38:29] [INFO ] started connecting
[20240217-16:38:29] [INFO ] lib_mod_connect: connecting via UNIX socket
[20240217-16:41:59] [INFO ] connection problem, giving up
[20240217-16:41:59] [INFO ] some problem
[20240217-16:41:59] [ERROR] xrdp_wm_log_msg: Error connecting to user session
[20240217-16:41:59] [INFO ] Error connecting to user session
[20240217-16:46:29] [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed
[20240217-16:46:29] [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed
[20240217-16:46:29] [ERROR] libxrdp_process_data: xrdp_rdp_recv failed
[20240217-16:46:29] [ERROR] xrdp_process_data_in: xrdp_process_loop failed
[20240217-16:46:29] [ERROR] SSL_shutdown: I/O error