neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.44k stars 1.72k forks source link

A blue screen occurs when a remote connection is made using windows11 #3140

Open LiuChang0123 opened 6 days ago

LiuChang0123 commented 6 days ago
### xrdp version

0.9.21

### Detailed xrdp version, build options

xrdp 0.9.21.1
  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=aarch64-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/aarch64-linux-gnu
      --libexecdir=${prefix}/lib/aarch64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=aarch64-linux-gnu
      CFLAGS=-g -O2 -ffile-prefix-map=/build/xrdp-xCPoG3/xrdp-0.9.21.1=. -fstack-protector-strong -Wformat -Werror=format-security
      LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
      PKG_CONFIG_PATH=/build/xrdp-xCPoG3/xrdp-0.9.21.1/pkgconfig

  Compiled with OpenSSL 3.0.11 19 Sep 2023

Operating system & version

debian 12

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

No response

What desktop environment do you use?

No response

Environment xrdp running on

No response

What's your client?

No response

Area(s) with issue?

No response

Steps to reproduce

When using the Raspberry PI zero2w, I installed the bookworm system of debian12 for it, and then tried to connect remotely with win11. After entering the user name and password correctly, the desktop screen still wouldn't display properly, and there was a blue screen and then an error, like the following. 1

The following information is obtained by viewing related logs.

[20240623-18:01:04] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.70.173 port 20852
[20240623-18:01:04] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20240623-18:01:04] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20240623-18:01:04] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20240623-18:01:04] [WARN ] Cannot accept TLS connections because certificate or private key file is not readable. certificate file: [/etc/xrdp/cert.pem], private key file: [/etc/xrdp/key.pem]
[20240623-18:01:04] [INFO ] Security protocol: configured [RDP], requested [SSL|HYBRID|HYBRID_EX|RDP], selected [RDP]
[20240623-18:01:04] [ERROR] libxrdp_force_read: header read error
[20240623-18:01:04] [ERROR] Processing [ITU-T T.125] Connect-Initial failed
[20240623-18:01:04] [ERROR] [MCS Connection Sequence] receive connection request failed
[20240623-18:01:04] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
[20240623-18:01:04] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
[20240623-18:01:04] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
[20240623-18:01:04] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[20240623-18:01:04] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
[20240623-18:01:46] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.70.173 port 1699
[20240623-18:01:46] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20240623-18:01:46] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20240623-18:01:46] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20240623-18:01:46] [WARN ] Cannot accept TLS connections because certificate or private key file is not readable. certificate file: [/etc/xrdp/cert.pem], private key file: [/etc/xrdp/key.pem]
[20240623-18:01:46] [INFO ] Security protocol: configured [RDP], requested [RDP], selected [RDP]
[20240623-18:01:46] [INFO ] Connected client computer name: LC
[20240623-18:01:46] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20240623-18:01:46] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20240623-18:01:46] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000804]
[20240623-18:01:46] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
[20240623-18:01:46] [INFO ] Non-TLS connection established from ::ffff:192.168.70.173 port 1699: with security level : high
[20240623-18:01:47] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20240623-18:01:47] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 5242880 MB cache entries 100
[20240623-18:01:47] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[20240623-18:01:47] [WARN ] xrdp_caps_process_codecs: unknown codec id 5
[20240623-18:01:47] [WARN ] Cannot find keymap file /etc/xrdp/km-00000804.ini
[20240623-18:01:47] [WARN ] Cannot find keymap file /etc/xrdp/km-00000804.ini
[20240623-18:01:47] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20240623-18:01:47] [WARN ] local keymap file for 0x00000804 found and doesn't match built in keymap, using local keymap file
[20240623-18:01:53] [INFO ] connecting to sesman on 127.0.0.1:3350
[20240623-18:01:53] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20240623-18:01:53] [INFO ] sesman connect ok
[20240623-18:01:53] [INFO ] sending login info to session manager. Please wait...
[20240623-18:01:53] [INFO ] xrdp_wm_log_msg: login successful for user LC on display 10
[20240623-18:01:53] [INFO ] login successful for user LC on display 10
[20240623-18:01:53] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20240623-18:01:53] [INFO ] started connecting
[20240623-18:01:53] [INFO ] lib_mod_connect: connecting via UNIX socket
[20240623-18:05:23] [INFO ] connection problem, giving up
[20240623-18:05:23] [INFO ] some problem
[20240623-18:05:23] [ERROR] xrdp_wm_log_msg: Error connecting to user session
[20240623-18:05:23] [INFO ] Error connecting to user session

Seeing the above error message, I think it should be the permission problem, but after using the command

sudo adduser xrdp ssl-cert

the previous problem still occurs. I have tried many methods but none of them work

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Anything else?

No response

LiuChang0123 commented 6 days ago

I would also like to add that this problem occurs when using win11 remote connections, but using VNC-related applications can log in normally

matt335672 commented 6 days ago

Just came here from your discussion at #3139. I'll close that one and point it here.

Are you trying to use the same user as on the console?

Set up a separate user for xrdp - see the FAQ entry

LiuChang0123 commented 6 days ago

Just came here from your discussion at #3139. I'll close that one and point it here.

Are you trying to use the same user as on the console?

Set up a separate user for xrdp - see the FAQ entry

Following your advice, I re-established a user

sudo adduser username

However, when I logged in with a new user, I still got the same error as before. On this basis, I turned off VNC functionality and restarted xrdp but the problem did not seem to be resolved

xrdp.log

[20240625-17:21:33] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.52.173 port 13152
[20240625-17:21:33] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20240625-17:21:33] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20240625-17:21:33] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20240625-17:21:33] [WARN ] Cannot accept TLS connections because certificate or private key file is not readable. certificate file: [/etc/xrdp/cert.pem], private key file: [/etc/xrdp/key.pem]
[20240625-17:21:33] [INFO ] Security protocol: configured [RDP], requested [SSL|HYBRID|HYBRID_EX|RDP], selected [RDP]
[20240625-17:21:33] [ERROR] libxrdp_force_read: header read error
[20240625-17:21:33] [ERROR] Processing [ITU-T T.125] Connect-Initial failed
[20240625-17:21:33] [ERROR] [MCS Connection Sequence] receive connection request failed
[20240625-17:21:33] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
[20240625-17:21:33] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.52.173 port 13153
[20240625-17:21:33] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
[20240625-17:21:33] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20240625-17:21:33] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
[20240625-17:21:33] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20240625-17:21:33] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[20240625-17:21:33] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20240625-17:21:33] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
[20240625-17:21:33] [WARN ] Cannot accept TLS connections because certificate or private key file is not readable. certificate file: [/etc/xrdp/cert.pem], private key file: [/etc/xrdp/key.pem]
[20240625-17:21:33] [INFO ] Security protocol: configured [RDP], requested [RDP], selected [RDP]
[20240625-17:21:33] [INFO ] Connected client computer name: LC
[20240625-17:21:33] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20240625-17:21:33] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20240625-17:21:33] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000804]
[20240625-17:21:33] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
[20240625-17:21:33] [INFO ] Non-TLS connection established from ::ffff:192.168.52.173 port 13153: with security level : high
[20240625-17:21:33] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20240625-17:21:33] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 5242880 MB cache entries 100
[20240625-17:21:33] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[20240625-17:21:33] [WARN ] xrdp_caps_process_codecs: unknown codec id 5
[20240625-17:21:33] [WARN ] Cannot find keymap file /etc/xrdp/km-00000804.ini
[20240625-17:21:33] [WARN ] Cannot find keymap file /etc/xrdp/km-00000804.ini
[20240625-17:21:33] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20240625-17:21:33] [WARN ] local keymap file for 0x00000804 found and doesn't match built in keymap, using local keymap file
[20240625-17:22:01] [INFO ] connecting to sesman on 127.0.0.1:3350
[20240625-17:22:01] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20240625-17:22:01] [INFO ] sesman connect ok
[20240625-17:22:01] [INFO ] sending login info to session manager. Please wait...
[20240625-17:22:01] [INFO ] xrdp_wm_log_msg: login successful for user LC01 on display 10
[20240625-17:22:01] [INFO ] login successful for user LC01 on display 10
[20240625-17:22:01] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20240625-17:22:01] [INFO ] started connecting
[20240625-17:22:01] [INFO ] lib_mod_connect: connecting via UNIX socket
[20240625-17:25:31] [INFO ] connection problem, giving up
[20240625-17:25:31] [INFO ] some problem
[20240625-17:25:31] [ERROR] xrdp_wm_log_msg: Error connecting to user session
[20240625-17:25:31] [INFO ] Error connecting to user session

xrdp-sesman.log

[20240625-17:22:01] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 36434
[20240625-17:22:01] [INFO ] Terminal Server Users group is disabled, allowing authentication
[20240625-17:22:01] [INFO ] ++ created session (access granted): username LC01, ip ::ffff:192.168.52.173:13153 - socket: 12
[20240625-17:22:01] [INFO ] starting Xorg session...
[20240625-17:22:01] [INFO ] Starting session: session_pid 1435, display :10.0, width 1920, height 1080, bpp 24, client ip ::ffff:192.168.52.173:13153 - socket: 12, user name LC01
[20240625-17:22:01] [INFO ] [session start] (display 10): calling auth_start_session from pid 1435
[20240625-17:22:01] [ERROR] sesman_data_in: scp_process_msg failed
[20240625-17:22:01] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20240625-17:22:02] [INFO ] Starting X server on display 10: /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20240625-17:22:12] [WARN ] Timed out waiting for X server on display 10 to startup
[20240625-17:22:12] [INFO ] Session started successfully for user LC01 on display 10
[20240625-17:22:12] [INFO ] Starting the xrdp channel server for display 10
[20240625-17:22:12] [INFO ] Session in progress on display 10, waiting until the window manager (pid 1469) exits to end the session
[20240625-17:22:12] [WARN ] Timed out waiting for X server on display 10 to startup
[20240625-17:22:12] [ERROR] There is no X server active on display 10
[20240625-17:22:12] [ERROR] A fatal error has occurred attempting to start the window manager on display 10, aborting connection
[20240625-17:22:12] [WARN ] Window manager (pid 1469, display 10) exited quickly (0 secs). This could indicate a window manager config problem
[20240625-17:22:12] [INFO ] Calling auth_stop_session and auth_end from pid 1435
[20240625-17:22:12] [INFO ] Terminating X server (pid 1470) on display 10
[20240625-17:22:12] [INFO ] Terminating the xrdp channel server (pid 1492) on display 10
[20240625-17:22:12] [INFO ] X server on display 10 (pid 1470) returned exit code 1 and signal number 0
[20240625-17:22:12] [INFO ] xrdp channel server for display 10 (pid 1492) exit code 0 and signal number 0
[20240625-17:22:12] [INFO ] cleanup_sockets:
[20240625-17:22:12] [INFO ] Process 1435 has exited
[20240625-17:22:12] [INFO ] ++ terminated session:  username LC01, display :10.0, session_pid 1435, ip ::ffff:192.168.52.173:13153 - socket: 12
LiuChang0123 commented 6 days ago

I just found that my wins11 user name and the Raspberry PI user name are the same, so I changed a new computer to test, the blue screen still appears, the error content is as follows

[20240625-18:01:02] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.52.117 port 51693
[20240625-18:01:02] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20240625-18:01:02] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20240625-18:01:02] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20240625-18:01:02] [WARN ] Cannot accept TLS connections because certificate or private key file is not readable. certificate file: [/etc/xrdp/cert.pem], private key file: [/etc/xrdp/key.pem]
[20240625-18:01:02] [INFO ] Security protocol: configured [RDP], requested [SSL|HYBRID|HYBRID_EX|RDP], selected [RDP]
[20240625-18:01:02] [ERROR] libxrdp_force_read: header read error
[20240625-18:01:02] [ERROR] Processing [ITU-T T.125] Connect-Initial failed
[20240625-18:01:02] [ERROR] [MCS Connection Sequence] receive connection request failed
[20240625-18:01:02] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
[20240625-18:01:02] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
[20240625-18:01:02] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
[20240625-18:01:02] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[20240625-18:01:02] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
[20240625-18:01:03] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.52.117 port 51694
[20240625-18:01:03] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20240625-18:01:03] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20240625-18:01:03] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20240625-18:01:03] [WARN ] Cannot accept TLS connections because certificate or private key file is not readable. certificate file: [/etc/xrdp/cert.pem], private key file: [/etc/xrdp/key.pem]
[20240625-18:01:03] [INFO ] Security protocol: configured [RDP], requested [RDP], selected [RDP]
[20240625-18:01:03] [INFO ] Connected client computer name: REND_LC
[20240625-18:01:03] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20240625-18:01:03] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20240625-18:01:03] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000804]
[20240625-18:01:03] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
[20240625-18:01:03] [INFO ] Non-TLS connection established from ::ffff:192.168.52.117 port 51694: with security level : high
[20240625-18:01:03] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20240625-18:01:03] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100
[20240625-18:01:03] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[20240625-18:01:03] [WARN ] xrdp_caps_process_codecs: unknown codec id 5
[20240625-18:01:03] [WARN ] Cannot find keymap file /etc/xrdp/km-00000804.ini
[20240625-18:01:03] [WARN ] Cannot find keymap file /etc/xrdp/km-00000804.ini
[20240625-18:01:03] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20240625-18:01:03] [WARN ] local keymap file for 0x00000804 found and doesn't match built in keymap, using local keymap file
[20240625-18:01:12] [INFO ] connecting to sesman on 127.0.0.1:3350
[20240625-18:01:13] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20240625-18:01:13] [INFO ] sesman connect ok
[20240625-18:01:13] [INFO ] sending login info to session manager. Please wait...
[20240625-18:01:13] [INFO ] xrdp_wm_log_msg: login successful for user LC01 on display 10
[20240625-18:01:13] [INFO ] login successful for user LC01 on display 10
[20240625-18:01:13] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20240625-18:01:13] [INFO ] started connecting
[20240625-18:01:13] [INFO ] lib_mod_connect: connecting via UNIX socket
[20240625-18:04:43] [INFO ] connection problem, giving up
[20240625-18:04:43] [INFO ] some problem
[20240625-18:04:43] [ERROR] xrdp_wm_log_msg: Error connecting to user session
[20240625-18:04:43] [INFO ] Error connecting to user session
[20240625-18:06:38] [INFO ] Received termination signal, stopping the server accept new connections thread
[20240625-18:06:38] [INFO ] address [0.0.0.0] port [3389] mode 1
[20240625-18:06:38] [INFO ] listening to port 3389 on 0.0.0.0
[20240625-18:06:38] [INFO ] xrdp_listen_pp done
[20240625-18:06:40] [INFO ] starting xrdp with pid 1977
[20240625-18:06:40] [INFO ] address [0.0.0.0] port [3389] mode 1
[20240625-18:06:40] [INFO ] listening to port 3389 on 0.0.0.0
[20240625-18:06:40] [INFO ] xrdp_listen_pp done
metalefty commented 6 days ago

Hi, BTW, you should see the following guide in Detailed xrdp version, build options section of the bug report form. I

Paste the result between ~~~. Please DO NOT remove ~~~!

image

It means doing like this. The area inside the green square is "between ~~~".

image

LiuChang0123 commented 6 days ago

@metalefty OK,Thank you for your suggestion. I have revised it

matt335672 commented 5 days ago

Thanks for the updated logs.

There appears to be a problem starting the X server. From the sesman log:-

[20240625-17:22:02] [INFO ] Starting X server on display 10: /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20240625-17:22:12] [WARN ] Timed out waiting for X server on display 10 to startup

Can you try logging in to the machine over ssh and running these commands manually:-

rm -f ~/.xorgxrdp.*.log
/usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log

The command may produce an error, or it may run the X server. If there's an error, please post it. If the X server runs, can you CTRL-C out of it and post the contents of ~/.xorgxrdp.10.log?

LiuChang0123 commented 5 days ago

@matt335672 Ok, so let me try again. Before doing this, I looked at the answers to the previous questions and tried to reinstall the system with debian 11, and it seems that xrdp works fine. 12 That's interesting!

matt335672 commented 4 days ago

Great you've got something working, but if you've re-installed the system we can't debug your original problem.

Are you going to try again with Debian 12?

LiuChang0123 commented 3 days ago

@matt335672 No problem, I re-installed debian12 using the previous method, the problem still exists

[20240628-18:29:19] [INFO ] starting xrdp-sesman with pid 14516
[20240628-18:31:07] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 42048
[20240628-18:31:07] [INFO ] Terminal Server Users group is disabled, allowing authentication
[20240628-18:31:07] [INFO ] ++ created session (access granted): username lc2024, ip ::ffff:192.168.43.13:52144 - socket: 12
[20240628-18:31:07] [INFO ] starting Xorg session...
[20240628-18:31:07] [INFO ] Starting session: session_pid 14572, display :10.0, width 1920, height 1080, bpp 24, client ip ::ffff:192.168.43.13:52144 - socket: 12, user name lc2024
[20240628-18:31:07] [INFO ] [session start] (display 10): calling auth_start_session from pid 14572
[20240628-18:31:07] [ERROR] sesman_data_in: scp_process_msg failed
[20240628-18:31:07] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20240628-18:31:07] [INFO ] Starting X server on display 10: /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20240628-18:31:08] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20240628-18:31:08] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20240628-18:31:08] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20240628-18:31:08] [INFO ] Session started successfully for user lc2024 on display 10
[20240628-18:31:08] [INFO ] Starting the xrdp channel server for display 10
[20240628-18:31:08] [INFO ] Starting the default window manager on display 10: /etc/xrdp/startwm.sh
[20240628-18:31:08] [INFO ] Session in progress on display 10, waiting until the window manager (pid 14573) exits to end the session
[20240628-18:31:09] [WARN ] Window manager (pid 14573, display 10) exited with non-zero exit code 1 and signal 0. This could indicate a window manager config problem
[20240628-18:31:09] [WARN ] Window manager (pid 14573, display 10) exited quickly (1 secs). This could indicate a window manager config problem
[20240628-18:31:09] [INFO ] Calling auth_stop_session and auth_end from pid 14572
[20240628-18:31:09] [INFO ] Terminating X server (pid 14574) on display 10
[20240628-18:31:09] [INFO ] Terminating the xrdp channel server (pid 14577) on display 10
[20240628-18:31:09] [INFO ] X server on display 10 (pid 14574) returned exit code 1 and signal number 0
[20240628-18:31:09] [INFO ] xrdp channel server for display 10 (pid 14577) exit code 0 and signal number 0
[20240628-18:31:09] [INFO ] cleanup_sockets:
[20240628-18:31:09] [INFO ] Process 14572 has exited
[20240628-18:31:09] [INFO ] ++ terminated session:  username lc2024, display :10.0, session_pid 14572, ip ::ffff:192.168.43.13:52144 - socket: 12

Then, I used the command you provided

rm -f ~/.xorgxrdp.*.log
/usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log

The following results are displayed

X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
Current Operating System: Linux raspberrypi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64
Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=B8:27:EB:89:17:46 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  console=ttyS0,115200 console=tty1 root=PARTUUID=1da6ffa5-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=CN
xorg-server 2:21.1.7-3+rpt2+deb12u7 (https://www.debian.org/support)
Current version of pixman: 0.42.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: ".xorgxrdp.10.log", Time: Fri Jun 28 18:43:34 2024
(++) Using config file: "/etc/X11/xrdp/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xorgxrdpSetup:
xrdpdevSetup:
rdpmousePlug:
rdpkeybPlug:
rdpIdentify:
rdpDriverFunc: op 10
rdpProbe:
rdpProbe: found DRMDevice xorg.conf value [/dev/dri/renderD128]
rdpProbe: found DRI3 xorg.conf value [1]
(EE)
Fatal server error:
(EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

Following the prompts, I tried to open.xorgxrdp.10.log,Like the following.

cat ~/.xorgxrdp.10.log
[  1998.289]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[  1998.290] Current Operating System: Linux raspberrypi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64
[  1998.290] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=B8:27:EB:89:17:46 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  console=ttyS0,115200 console=tty1 root=PARTUUID=1da6ffa5-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=CN
[  1998.290] xorg-server 2:21.1.7-3+rpt2+deb12u7 (https://www.debian.org/support)
[  1998.290] Current version of pixman: 0.42.2
[  1998.290]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[  1998.290] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1998.291] (++) Log file: ".xorgxrdp.10.log", Time: Fri Jun 28 18:43:34 2024
[  1998.292] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[  1998.292] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  1998.292] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  1998.293] (**) Option "defaultserverlayout" "X11 Server"
[  1998.293] (**) ServerLayout "X11 Server"
[  1998.293] (**) |-->Screen "Screen (xrdpdev)" (0)
[  1998.293] (**) |   |-->Monitor "Monitor"
[  1998.295] (**) |   |-->Device "Video Card (xrdpdev)"
[  1998.295] (**) |   |-->GPUDevice "kms"
[  1998.295] (**) |-->Input Device "xrdpMouse"
[  1998.295] (**) |-->Input Device "xrdpKeyboard"
[  1998.295] (**) Option "DontVTSwitch" "on"
[  1998.295] (**) Option "AutoAddDevices" "off"
[  1998.295] (**) Not automatically adding devices
[  1998.295] (==) Automatically enabling devices
[  1998.295] (==) Automatically adding GPU devices
[  1998.295] (==) Automatically binding GPU devices
[  1998.295] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1998.295] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  1998.296]    Entry deleted from font path.
[  1998.296] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        built-ins
[  1998.296] (==) ModulePath set to "/usr/lib/xorg/modules"
[  1998.296] (II) Loader magic: 0x556a0c0ef0
[  1998.296] (II) Module ABI versions:
[  1998.296]    X.Org ANSI C Emulation: 0.4
[  1998.296]    X.Org Video Driver: 25.2
[  1998.296]    X.Org XInput driver : 24.4
[  1998.296]    X.Org Server Extension : 10.0
[  1998.301] (--) using VT number 2

[  1998.301] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[  1998.306] (II) xfree86: Adding drm device (/dev/dri/card0)
[  1998.306] (II) Platform probe for /sys/devices/platform/soc/soc:gpu/drm/card0
[  1998.307] (**) OutputClass "vc4" setting /dev/dri/card0 as PrimaryGPU
[  1998.307] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  1998.307] (II) LoadModule: "dbe"
[  1998.308] (II) Module "dbe" already built-in
[  1998.308] (II) LoadModule: "ddc"
[  1998.308] (II) Module "ddc" already built-in
[  1998.308] (II) LoadModule: "extmod"
[  1998.308] (II) Module "extmod" already built-in
[  1998.308] (II) LoadModule: "glx"
[  1998.308] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  1998.315] (II) Module glx: vendor="X.Org Foundation"
[  1998.315]    compiled for 1.21.1.7, module version = 1.0.0
[  1998.315]    ABI class: X.Org Server Extension, version 10.0
[  1998.315] (II) LoadModule: "int10"
[  1998.315] (II) Loading /usr/lib/xorg/modules/libint10.so
[  1998.316] (II) Module int10: vendor="X.Org Foundation"
[  1998.316]    compiled for 1.21.1.7, module version = 1.0.0
[  1998.316]    ABI class: X.Org Video Driver, version 25.2
[  1998.316] (II) LoadModule: "record"
[  1998.316] (II) Module "record" already built-in
[  1998.316] (II) LoadModule: "vbe"
[  1998.316] (II) Loading /usr/lib/xorg/modules/libint10.so
[  1998.316] (II) Module int10: vendor="X.Org Foundation"
[  1998.316]    compiled for 1.21.1.7, module version = 1.0.0
[  1998.316]    ABI class: X.Org Video Driver, version 25.2
[  1998.316] (II) LoadModule: "glamoregl"
[  1998.317] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[  1998.338] (II) Module glamoregl: vendor="X.Org Foundation"
[  1998.338]    compiled for 1.21.1.7, module version = 1.0.1
[  1998.338]    ABI class: X.Org ANSI C Emulation, version 0.4
[  1998.338] (II) LoadModule: "xorgxrdp"
[  1998.338] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[  1998.339] (II) Module XORGXRDP: vendor="X.Org Foundation"
[  1998.339]    compiled for 1.21.1.5, module version = 0.9.19
[  1998.339]    ABI class: X.Org Video Driver, version 25.2
[  1998.339] xorgxrdpSetup:
[  1998.339] (II) LoadModule: "fb"
[  1998.339] (II) Module "fb" already built-in
[  1998.339] (II) LoadModule: "xrdpdev"
[  1998.340] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[  1998.341] (II) Module XRDPDEV: vendor="X.Org Foundation"
[  1998.341]    compiled for 1.21.1.5, module version = 0.9.19
[  1998.341]    ABI class: X.Org Video Driver, version 25.2
[  1998.341] xrdpdevSetup:
[  1998.341] (II) LoadModule: "modesetting"
[  1998.342] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  1998.342] (II) Module modesetting: vendor="X.Org Foundation"
[  1998.342]    compiled for 1.21.1.7, module version = 1.21.1
[  1998.342]    Module class: X.Org Video Driver
[  1998.342]    ABI class: X.Org Video Driver, version 25.2
[  1998.342] (II) LoadModule: "xrdpmouse"
[  1998.343] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[  1998.343] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[  1998.343]    compiled for 1.21.1.5, module version = 0.9.19
[  1998.343]    Module class: X.Org XInput Driver
[  1998.343]    ABI class: X.Org XInput driver, version 24.4
[  1998.343] rdpmousePlug:
[  1998.343] (II) LoadModule: "xrdpkeyb"
[  1998.344] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[  1998.344] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[  1998.344]    compiled for 1.21.1.5, module version = 0.9.19
[  1998.344]    Module class: X.Org XInput Driver
[  1998.344]    ABI class: X.Org XInput driver, version 24.4
[  1998.345] rdpkeybPlug:
[  1998.345] rdpIdentify:
[  1998.345] (II) XRDPDEV: driver for xrdp: XRDPDEV
[  1998.345] rdpDriverFunc: op 10
[  1998.345] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  1998.739] (WW) Falling back to old probe method for XRDPDEV
[  1998.740] rdpProbe:
[  1998.740] (II) Loading sub module "fb"
[  1998.740] (II) LoadModule: "fb"
[  1998.740] (II) Module "fb" already built-in
[  1998.740] rdpProbe: found DRMDevice xorg.conf value [/dev/dri/renderD128]
[  1998.741] rdpProbe: found DRI3 xorg.conf value [1]
[  1998.741] (II) XRDPDEV(0): using default device
[  1998.741] (II) modeset(G0): using drv /dev/dri/card0
[  1998.741] (EE)
Fatal server error:
[  1998.741] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[  1998.741] (EE)
[  1998.742] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[  1998.742] (EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
[  1998.742] (EE)
[  1998.743] (EE) Server terminated with error (1). Closing log file.
root@raspberrypi:~# ^C
root@raspberrypi:~# cat ~/.xorgxrdp.10.log
[  1998.289]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[  1998.290] Current Operating System: Linux raspberrypi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64
[  1998.290] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=B8:27:EB:89:17:46 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  console=ttyS0,115200 console=tty1 root=PARTUUID=1da6ffa5-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=CN
[  1998.290] xorg-server 2:21.1.7-3+rpt2+deb12u7 (https://www.debian.org/support)
[  1998.290] Current version of pixman: 0.42.2
[  1998.290]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[  1998.290] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1998.291] (++) Log file: ".xorgxrdp.10.log", Time: Fri Jun 28 18:43:34 2024
[  1998.292] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[  1998.292] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  1998.292] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  1998.293] (**) Option "defaultserverlayout" "X11 Server"
[  1998.293] (**) ServerLayout "X11 Server"
[  1998.293] (**) |-->Screen "Screen (xrdpdev)" (0)
[  1998.293] (**) |   |-->Monitor "Monitor"
[  1998.295] (**) |   |-->Device "Video Card (xrdpdev)"
[  1998.295] (**) |   |-->GPUDevice "kms"
[  1998.295] (**) |-->Input Device "xrdpMouse"
[  1998.295] (**) |-->Input Device "xrdpKeyboard"
[  1998.295] (**) Option "DontVTSwitch" "on"
[  1998.295] (**) Option "AutoAddDevices" "off"
[  1998.295] (**) Not automatically adding devices
[  1998.295] (==) Automatically enabling devices
[  1998.295] (==) Automatically adding GPU devices
[  1998.295] (==) Automatically binding GPU devices
[  1998.295] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1998.295] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  1998.296]    Entry deleted from font path.
[  1998.296] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        built-ins
[  1998.296] (==) ModulePath set to "/usr/lib/xorg/modules"
[  1998.296] (II) Loader magic: 0x556a0c0ef0
[  1998.296] (II) Module ABI versions:
[  1998.296]    X.Org ANSI C Emulation: 0.4
[  1998.296]    X.Org Video Driver: 25.2
[  1998.296]    X.Org XInput driver : 24.4
[  1998.296]    X.Org Server Extension : 10.0
[  1998.301] (--) using VT number 2

[  1998.301] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[  1998.306] (II) xfree86: Adding drm device (/dev/dri/card0)
[  1998.306] (II) Platform probe for /sys/devices/platform/soc/soc:gpu/drm/card0
[  1998.307] (**) OutputClass "vc4" setting /dev/dri/card0 as PrimaryGPU
[  1998.307] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  1998.307] (II) LoadModule: "dbe"
[  1998.308] (II) Module "dbe" already built-in
[  1998.308] (II) LoadModule: "ddc"
[  1998.308] (II) Module "ddc" already built-in
[  1998.308] (II) LoadModule: "extmod"
[  1998.308] (II) Module "extmod" already built-in
[  1998.308] (II) LoadModule: "glx"
[  1998.308] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  1998.315] (II) Module glx: vendor="X.Org Foundation"
[  1998.315]    compiled for 1.21.1.7, module version = 1.0.0
[  1998.315]    ABI class: X.Org Server Extension, version 10.0
[  1998.315] (II) LoadModule: "int10"
[  1998.315] (II) Loading /usr/lib/xorg/modules/libint10.so
[  1998.316] (II) Module int10: vendor="X.Org Foundation"
[  1998.316]    compiled for 1.21.1.7, module version = 1.0.0
[  1998.316]    ABI class: X.Org Video Driver, version 25.2
[  1998.316] (II) LoadModule: "record"
[  1998.316] (II) Module "record" already built-in
[  1998.316] (II) LoadModule: "vbe"
[  1998.316] (II) Loading /usr/lib/xorg/modules/libint10.so
[  1998.316] (II) Module int10: vendor="X.Org Foundation"
[  1998.316]    compiled for 1.21.1.7, module version = 1.0.0
[  1998.316]    ABI class: X.Org Video Driver, version 25.2
[  1998.316] (II) LoadModule: "glamoregl"
[  1998.317] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[  1998.338] (II) Module glamoregl: vendor="X.Org Foundation"
[  1998.338]    compiled for 1.21.1.7, module version = 1.0.1
[  1998.338]    ABI class: X.Org ANSI C Emulation, version 0.4
[  1998.338] (II) LoadModule: "xorgxrdp"
[  1998.338] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[  1998.339] (II) Module XORGXRDP: vendor="X.Org Foundation"
[  1998.339]    compiled for 1.21.1.5, module version = 0.9.19
[  1998.339]    ABI class: X.Org Video Driver, version 25.2
[  1998.339] xorgxrdpSetup:
[  1998.339] (II) LoadModule: "fb"
[  1998.339] (II) Module "fb" already built-in
[  1998.339] (II) LoadModule: "xrdpdev"
[  1998.340] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[  1998.341] (II) Module XRDPDEV: vendor="X.Org Foundation"
[  1998.341]    compiled for 1.21.1.5, module version = 0.9.19
[  1998.341]    ABI class: X.Org Video Driver, version 25.2
[  1998.341] xrdpdevSetup:
[  1998.341] (II) LoadModule: "modesetting"
[  1998.342] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  1998.342] (II) Module modesetting: vendor="X.Org Foundation"
[  1998.342]    compiled for 1.21.1.7, module version = 1.21.1
[  1998.342]    Module class: X.Org Video Driver
[  1998.342]    ABI class: X.Org Video Driver, version 25.2
[  1998.342] (II) LoadModule: "xrdpmouse"
[  1998.343] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[  1998.343] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[  1998.343]    compiled for 1.21.1.5, module version = 0.9.19
[  1998.343]    Module class: X.Org XInput Driver
[  1998.343]    ABI class: X.Org XInput driver, version 24.4
[  1998.343] rdpmousePlug:
[  1998.343] (II) LoadModule: "xrdpkeyb"
[  1998.344] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[  1998.344] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[  1998.344]    compiled for 1.21.1.5, module version = 0.9.19
[  1998.344]    Module class: X.Org XInput Driver
[  1998.344]    ABI class: X.Org XInput driver, version 24.4
[  1998.345] rdpkeybPlug:
[  1998.345] rdpIdentify:
[  1998.345] (II) XRDPDEV: driver for xrdp: XRDPDEV
[  1998.345] rdpDriverFunc: op 10
[  1998.345] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  1998.739] (WW) Falling back to old probe method for XRDPDEV
[  1998.740] rdpProbe:
[  1998.740] (II) Loading sub module "fb"
[  1998.740] (II) LoadModule: "fb"
[  1998.740] (II) Module "fb" already built-in
[  1998.740] rdpProbe: found DRMDevice xorg.conf value [/dev/dri/renderD128]
[  1998.741] rdpProbe: found DRI3 xorg.conf value [1]
[  1998.741] (II) XRDPDEV(0): using default device
[  1998.741] (II) modeset(G0): using drv /dev/dri/card0
[  1998.741] (EE)
Fatal server error:
[  1998.741] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[  1998.741] (EE)
[  1998.742] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[  1998.742] (EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
[  1998.742] (EE)
[  1998.743] (EE) Server terminated with error (1). Closing log file.
matt335672 commented 6 hours ago

This looks to me like you're pulling in hardware devices when you don't need to. It was fixed in neutrinolabs/xorgxrdp#241 which isn't in your Debian 12 build yet.

Edit /etc/X11/xrdp/xorg.conf and make the following changes:-

1) After the line Option "AutoAddDevices" "off" add a new line containing Option "AutoAddGPU" "off" 2) After the line Device "Video Card (xrdpdev)", add a new line containing GPUDevice ""

These are the same changes in commit neutrinolabs/xorgxrdp@b7002eee91b104dee8d9b9479e306419eaff5b8d, if you'd rather work from that.

Give that a go and report back