neutrinolabs / xrdp

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

rdp session closes as soon as it starts #3076

Closed modernNeo closed 5 months ago

modernNeo commented 5 months ago

xrdp version

0.9.21.1

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=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 -ffile-prefix-map=/build/xrdp-QTF2mN/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-QTF2mN/xrdp-0.9.21.1/pkgconfig

  Compiled with OpenSSL 3.0.11 19 Sep 2023

Operating system & version

Debian GNU/Linux 12 (bookworm)

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

xorgxrdp

What desktop environment do you use?

Cinnamon

Environment xrdp running on

physical machine with Alder Lake-P Integrated Graphics Controller

What's your client?

No response

Area(s) with issue?

No response

Steps to reproduce

open remmina on a separate linux and try to connect via RDP to the machine with xrdp

✔️ Expected Behavior

establish a graphical connection to the machine

❌ Actual Behavior

the session closes

Anything else?

xrdp.log

[20240517-00:45:54] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.92 port 52358
[20240517-00:45:54] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20240517-00:45:54] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20240517-00:45:54] [INFO ] Security protocol: configured [SSL|RDP], requested [SSL|HYBRID|RDP], selected [SSL]
[20240517-00:45:54] [INFO ] Connected client computer name: jace-debian-thi
[20240517-00:45:54] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20240517-00:45:54] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20240517-00:45:54] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000409]
[20240517-00:45:55] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
[20240517-00:45:55] [INFO ] TLS connection established from ::ffff:192.168.1.92 port 52358: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384
[20240517-00:45:55] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20240517-00:45:55] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 7864320 MB cache entries 2000
[20240517-00:45:55] [INFO ] xrdp_caps_process_codecs: RemoteFX, codec id 3, properties len 49
[20240517-00:45:55] [WARN ] Client Capability: not enough orders supported by client, client wants off screen bitmap but offscreen bitmaps disabled
[20240517-00:45:55] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20240517-00:45:55] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20240517-00:45:59] [INFO ] connecting to sesman on 127.0.0.1:3350
[20240517-00:45:59] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20240517-00:45:59] [INFO ] sesman connect ok
[20240517-00:45:59] [INFO ] sending login info to session manager. Please wait...
[20240517-00:45:59] [INFO ] xrdp_wm_log_msg: login successful for user jace on display 10
[20240517-00:45:59] [INFO ] login successful for user jace on display 10
[20240517-00:45:59] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20240517-00:45:59] [INFO ] started connecting
[20240517-00:45:59] [INFO ] lib_mod_connect: connecting via UNIX socket
[20240517-00:45:59] [INFO ] lib_mod_log_peer: xrdp_pid=1838 connected to X11rdp_pid=1842 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff:192.168.1.92 client_port=52358
[20240517-00:45:59] [INFO ] connected ok

xrdp-sesman.log

[20240517-00:45:59] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 38176
[20240517-00:45:59] [INFO ] Terminal Server Users group is disabled, allowing authentication
[20240517-00:45:59] [INFO ] ++ created session (access granted): username jace, ip ::ffff:192.168.1.92:52358 - socket: 12
[20240517-00:45:59] [INFO ] starting Xorg session...
[20240517-00:45:59] [INFO ] Starting session: session_pid 1840, display :10.0, width 642, height 486, bpp 24, client ip ::ffff:192.168.1.92:52358 - socket: 12, user name jace
[20240517-00:45:59] [ERROR] sesman_data_in: scp_process_msg failed
[20240517-00:45:59] [INFO ] [session start] (display 10): calling auth_start_session from pid 1840
[20240517-00:45:59] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20240517-00:45:59] [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  
[20240517-00:45:59] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20240517-00:45:59] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20240517-00:45:59] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20240517-00:45:59] [INFO ] Session started successfully for user jace on display 10
[20240517-00:45:59] [INFO ] Starting the xrdp channel server for display 10
[20240517-00:45:59] [INFO ] Starting the default window manager on display 10: /etc/xrdp/startwm.sh
[20240517-00:45:59] [INFO ] Session in progress on display 10, waiting until the window manager (pid 1841) exits to end the session
[20240517-00:45:59] [WARN ] Window manager (pid 1841, display 10) exited with non-zero exit code 1 and signal 0. This could indicate a window manager config problem
[20240517-00:45:59] [WARN ] Window manager (pid 1841, display 10) exited quickly (0 secs). This could indicate a window manager config problem
[20240517-00:45:59] [INFO ] Calling auth_stop_session and auth_end from pid 1840
[20240517-00:45:59] [INFO ] Terminating X server (pid 1842) on display 10
[20240517-00:45:59] [INFO ] Terminating the xrdp channel server (pid 1850) on display 10
[20240517-00:45:59] [INFO ] X server on display 10 (pid 1842) returned exit code 0 and signal number 0
[20240517-00:45:59] [INFO ] xrdp channel server for display 10 (pid 1850) exit code 0 and signal number 0
[20240517-00:45:59] [INFO ] cleanup_sockets:
[20240517-00:45:59] [INFO ] Process 1840 has exited
[20240517-00:45:59] [INFO ] ++ terminated session:  username jace, display :10.0, session_pid 1840, ip ::ffff:192.168.1.92:52358 - socket: 12

.xsession-errors

Xsession: X session started for jace at Fri 17 May 2024 12:45:59 AM PDT
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:10.0
dbus-update-activation-environment: setting XDG_CURRENT_DESKTOP=
localuser:jace being added to access control list
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
default: No such file or directory

xorg.conf

Section "ServerLayout"
    Identifier "X11 Server"
    Screen "Screen (xrdpdev)"
    InputDevice "xrdpMouse" "CorePointer"
    InputDevice "xrdpKeyboard" "CoreKeyboard"
EndSection

Section "ServerFlags"
    # This line prevents "ServerLayout" sections in xorg.conf.d files
    # overriding the "X11 Server" layout (xrdp #1784)
    Option "DefaultServerLayout" "X11 Server"
    Option "DontVTSwitch" "on"
    Option "AutoAddDevices" "off"
EndSection

Section "Module"
    Load "dbe"
    Load "ddc"
    Load "extmod"
    Load "glx"
    Load "int10"
    Load "record"
    Load "vbe"
    Load "glamoregl"
    Load "xorgxrdp"
    Load "fb"
EndSection

Section "InputDevice"
    Identifier "xrdpKeyboard"
    Driver "xrdpkeyb"
EndSection

Section "InputDevice"
    Identifier "xrdpMouse"
    Driver "xrdpmouse"
EndSection

Section "Monitor"
    Identifier "Monitor"
    Option "DPMS"
    HorizSync 30-80
    VertRefresh 60-75
    ModeLine "1920x1080" 138.500 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
    ModeLine "1280x720" 74.25 1280 1720 1760 1980 720 725 730 750 +HSync +VSync
    Modeline "1368x768" 72.25 1368 1416 1448 1528 768 771 781 790 +hsync -vsync
    Modeline "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync
EndSection

Section "Device"
    Identifier "Video Card (xrdpdev)"
    Driver "xrdpdev"
    Option "DRMDevice" "/dev/dri/renderD128"
    Option "DRI3" "1"
EndSection

Section "Screen"
    Identifier "Screen (xrdpdev)"
    Device "Video Card (xrdpdev)"
    Monitor "Monitor"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "640x480" "800x600" "1024x768" "1280x720" "1280x1024" "1600x900" "1920x1080"
    EndSubSection
EndSection
modernNeo commented 5 months ago

wound up just doing a fresh install and was able to got RDP working as a result, just with the issue outlined here