neutrinolabs / xrdp

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

Blackscreen not solved by current alternatives. #2288

Closed igorfk closed 2 years ago

igorfk commented 2 years ago

Hi!

Debian 11 with xrdp 0.9.12 from pre compiled packages (apt install xrdp xorgxrdp)

I was connecting to the XRDP server very well, only trying to make USB redirection work for me, but just modifying the "FuseMountName=..." line in sesman.ini and various other parameters in the RDP clients, after one of the several service restarts I could not log anymore just that black screen after the default XRDP login screen. Tried several suggestions that I find over the web and here in the project but none work, as:

Tried to log with xfreerdp, rdesktop, mstsc, and from different hosts, always black screen after the XRDP login screen.

Any clue on how can I get to the session?

These are my logs and configuration files (clients and server in the same VLAN), now, without caring with usb redirection:

/var/log/xrdp.log

[20220610-14:50:21] [INFO ] starting xrdp with pid 1614435
[20220610-14:50:21] [INFO ] address [0.0.0.0] port [32000] mode 4
[20220610-14:50:21] [INFO ] listening to port 32000 on 0.0.0.0
[20220610-14:50:21] [INFO ] xrdp_listen_pp done
[20220610-14:50:25] [INFO ] Socket 12: AF_INET connection received from 10.0.2.10 port 37066
[20220610-14:50:25] [DEBUG] Closed socket 12 (AF_INET 10.0.2.5:32000)
[20220610-14:50:25] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:32000)
[20220610-14:50:25] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20220610-14:50:25] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20220610-14:50:25] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20220610-14:50:25] [DEBUG] TLSv1.3 enabled
[20220610-14:50:25] [DEBUG] TLSv1.2 enabled
[20220610-14:50:25] [DEBUG] Info - All channels are disabled
[20220610-14:50:25] [DEBUG] Security layer: requested 3, selected 0
[20220610-14:50:25] [INFO ] connected client computer name: computer
[20220610-14:50:25] [INFO ] all channels are disabled by configuration
[20220610-14:50:25] [INFO ] Non-TLS connection established from 10.0.2.10 port 37066: encrypted with standard RDP security
[20220610-14:50:25] [DEBUG] MCS_CJRQ - channel join request received
[20220610-14:50:25] [DEBUG] MCS_CJRQ - channel join request received
[20220610-14:50:25] [DEBUG] MCS_CJRQ - channel join request received
[20220610-14:50:25] [DEBUG] MCS_CJRQ - channel join request received
[20220610-14:50:25] [DEBUG] MCS_CJRQ - channel join request received
[20220610-14:50:25] [DEBUG] xrdp_0018dfcc_wm_login_mode_event_00000001
[20220610-14:50:25] [INFO ] Loading keymap file /etc/xrdp/km-00000416.ini
[20220610-14:50:25] [WARN ] local keymap file for 0x00000416 found and doesn't match built in keymap, using local keymap file
[20220610-14:50:30] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20220610-14:50:30] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20220610-14:50:31] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20220610-14:50:31] [DEBUG] return value from xrdp_mm_connect 0
[20220610-14:50:33] [INFO ] xrdp_wm_log_msg: login successful for display 11
[20220610-14:50:33] [DEBUG] xrdp_wm_log_msg: started connecting
[20220610-14:50:37] [DEBUG] Closed socket 17 (AF_UNIX)
[20220610-14:50:37] [INFO ] lib_mod_log_peer: xrdp_pid=1630156 connected to X11rdp_pid=1660273 X11rdp_uid=72226 X11rdp_gid=513 client_ip=10.0.2.10 client_port=37066
[20220610-14:50:37] [DEBUG] xrdp_wm_log_msg: connected ok
[20220610-14:50:37] [DEBUG] xrdp_mm_connect_chansrv: skip connecting to chansrv because all channels are disabled
[20220610-14:50:37] [DEBUG] Closed socket 16 (AF_INET6 ::ffff:127.0.0.1 port 54182)

/var/log/xrdp-sesman.log

[20220610-14:50:30] [INFO ] A connection received from ::ffff:127.0.0.1 port 54182
[20220610-14:50:33] [INFO ] ++ created session (access granted): username username, ip 10.0.2.10:37066 - socket: 12
[20220610-14:50:33] [INFO ] starting Xorg session...
[20220610-14:50:33] [DEBUG] Closed socket 10 (AF_INET6 :: port 5911)
[20220610-14:50:33] [DEBUG] Closed socket 10 (AF_INET6 :: port 6011)
[20220610-14:50:33] [DEBUG] Closed socket 10 (AF_INET6 :: port 6211)
[20220610-14:50:33] [DEBUG] Closed socket 9 (AF_INET6 ::ffff:127.0.0.1 port 3350)
[20220610-14:50:33] [INFO ] calling auth_start_session from pid 1651813
[20220610-14:50:36] [DEBUG] Closed socket 8 (AF_INET6 ::ffff:127.0.0.1 port 3350)
[20220610-14:50:36] [DEBUG] Closed socket 9 (AF_INET6 ::ffff:127.0.0.1 port 3350)
[20220610-14:50:36] [INFO ] /usr/lib/xorg/Xorg :11 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log  
[20220610-14:50:37] [CORE ] waiting for window manager (pid 1660272) to exit

/home/username/.xorgxrdp.10.log

[  3493.847] 
X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
[  3493.847] Build Operating System: linux Debian
[  3493.847] Current Operating System: Linux xrdp-server 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64
[  3493.847] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.10.0-14-amd64 root=UUID=40cb84ab-34c4-4a10-8bc8-f38c331abaff ro quiet splash
[  3493.847] Build Date: 16 December 2021  05:08:23PM
[  3493.847] xorg-server 2:1.20.11-1+deb11u1 (https://www.debian.org/support) 
[  3493.847] Current version of pixman: 0.40.0
[  3493.847]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  3493.847] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  3493.847] (++) Log file: ".xorgxrdp.10.log", Time: Fri Jun 10 14:48:49 2022
[  3493.847] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[  3493.847] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  3493.848] (==) ServerLayout "X11 Server"
[  3493.848] (**) |-->Screen "Screen (xrdpdev)" (0)
[  3493.848] (**) |   |-->Monitor "Monitor"
[  3493.848] (**) |   |-->Device "Video Card (xrdpdev)"
[  3493.848] (**) |-->Input Device "xrdpMouse"
[  3493.848] (**) |-->Input Device "xrdpKeyboard"
[  3493.848] (**) Option "DontVTSwitch" "on"
[  3493.848] (**) Option "AutoAddDevices" "off"
[  3493.848] (**) Not automatically adding devices
[  3493.848] (==) Automatically enabling devices
[  3493.848] (==) Automatically adding GPU devices
[  3493.848] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  3493.848] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  3493.848]    Entry deleted from font path.
[  3493.848] (==) 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
[  3493.848] (==) ModulePath set to "/usr/lib/xorg/modules"
[  3493.848] (II) Loader magic: 0x55b908482e40
[  3493.848] (II) Module ABI versions:
[  3493.848]    X.Org ANSI C Emulation: 0.4
[  3493.848]    X.Org Video Driver: 24.1
[  3493.848]    X.Org XInput driver : 24.1
[  3493.848]    X.Org Server Extension : 10.0
[  3493.849] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c8
[  3493.850] (II) xfree86: Adding drm device (/dev/dri/card0)
[  3493.850] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[  3493.852] (--) PCI:*(6@0:0:0) 1002:15d8:1002:15d8 rev 217, Mem @ 0xe0000000/268435456, 0xf0000000/2097152, 0xfcc00000/524288, I/O @ 0x0000e000/256
[  3493.852] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  3493.852] (II) LoadModule: "dbe"
[  3493.852] (II) Module "dbe" already built-in
[  3493.852] (II) LoadModule: "ddc"
[  3493.852] (II) Module "ddc" already built-in
[  3493.852] (II) LoadModule: "extmod"
[  3493.852] (II) Module "extmod" already built-in
[  3493.853] (II) LoadModule: "glx"
[  3493.853] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  3493.853] (II) Module glx: vendor="X.Org Foundation"
[  3493.853]    compiled for 1.20.11, module version = 1.0.0
[  3493.853]    ABI class: X.Org Server Extension, version 10.0
[  3493.853] (II) LoadModule: "int10"
[  3493.853] (II) Loading /usr/lib/xorg/modules/libint10.so
[  3493.853] (II) Module int10: vendor="X.Org Foundation"
[  3493.853]    compiled for 1.20.11, module version = 1.0.0
[  3493.853]    ABI class: X.Org Video Driver, version 24.1
[  3493.853] (II) LoadModule: "record"
[  3493.853] (II) Module "record" already built-in
[  3493.853] (II) LoadModule: "vbe"
[  3493.853] (II) Loading /usr/lib/xorg/modules/libvbe.so
[  3493.853] (II) Module vbe: vendor="X.Org Foundation"
[  3493.853]    compiled for 1.20.11, module version = 1.1.0
[  3493.853]    ABI class: X.Org Video Driver, version 24.1
[  3493.853] (II) LoadModule: "glamoregl"
[  3493.853] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[  3493.855] (II) Module glamoregl: vendor="X.Org Foundation"
[  3493.855]    compiled for 1.20.11, module version = 1.0.1
[  3493.855]    ABI class: X.Org ANSI C Emulation, version 0.4
[  3493.855] (II) LoadModule: "xorgxrdp"
[  3493.855] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[  3493.856] (II) Module XORGXRDP: vendor="X.Org Foundation"
[  3493.856]    compiled for 1.20.6, module version = 0.2.12
[  3493.856]    ABI class: X.Org Video Driver, version 24.0
[  3493.856] xorgxrdpSetup:
[  3493.856] (II) LoadModule: "fb"
[  3493.856] (II) Loading /usr/lib/xorg/modules/libfb.so
[  3493.856] (II) Module fb: vendor="X.Org Foundation"
[  3493.856]    compiled for 1.20.11, module version = 1.0.0
[  3493.856]    ABI class: X.Org ANSI C Emulation, version 0.4
[  3493.856] (II) LoadModule: "xrdpdev"
[  3493.856] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[  3493.856] (II) Module XRDPDEV: vendor="X.Org Foundation"
[  3493.856]    compiled for 1.20.6, module version = 0.2.12
[  3493.856]    ABI class: X.Org Video Driver, version 24.0
[  3493.856] xrdpdevSetup:
[  3493.856] (II) LoadModule: "xrdpmouse"
[  3493.856] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[  3493.856] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[  3493.856]    compiled for 1.20.6, module version = 0.2.12
[  3493.856]    Module class: X.Org XInput Driver
[  3493.856]    ABI class: X.Org XInput driver, version 24.1
[  3493.856] rdpmousePlug:
[  3493.856] (II) LoadModule: "xrdpkeyb"
[  3493.856] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[  3493.856] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[  3493.856]    compiled for 1.20.6, module version = 0.2.12
[  3493.856]    Module class: X.Org XInput Driver
[  3493.856]    ABI class: X.Org XInput driver, version 24.1
[  3493.856] rdpkeybPlug:
[  3493.856] rdpIdentify:
[  3493.856] (II) XRDPDEV: driver for xrdp: XRDPDEV
[  3493.856] rdpDriverFunc: op 10
[  3493.856] (WW) Falling back to old probe method for XRDPDEV
[  3493.856] rdpProbe:
[  3493.856] (II) Loading sub module "fb"
[  3493.856] (II) LoadModule: "fb"
[  3493.856] (II) Loading /usr/lib/xorg/modules/libfb.so
[  3493.856] (II) Module fb: vendor="X.Org Foundation"
[  3493.856]    compiled for 1.20.11, module version = 1.0.0
[  3493.856]    ABI class: X.Org ANSI C Emulation, version 0.4
[  3493.856] rdpProbe: found DRMDevice xorg.conf value [/dev/dri/renderD128]
[  3493.856] rdpProbe: found DRI3 xorg.conf value [1]
[  3493.856] (II) XRDPDEV(0): using default device
[  3493.856] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  3493.856] rdpPreInit:
[  3493.856] rdpPreInit: /dev/dri/renderD128 open failed
[  3493.856] (**) XRDPDEV(0): Depth 24, (--) framebuffer bpp 32
[  3493.856] (==) XRDPDEV(0): RGB weight 888
[  3493.856] (==) XRDPDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[  3493.856] (==) XRDPDEV(0): Default visual is TrueColor
[  3493.856] (==) XRDPDEV(0): DPI set to (96, 96)
[  3493.856] (II) XRDPDEV(0):   mode "640x480" ok
[  3493.856] (II) XRDPDEV(0):   mode "800x600" ok
[  3493.856] (II) XRDPDEV(0): Virtual size is 800x600 (pitch 800)
[  3493.856] (**) XRDPDEV(0):  Default mode "800x600": 36.0 MHz (scaled from 0.0 MHz), 35.2 kHz, 56.2 Hz
[  3493.856] (II) XRDPDEV(0): Modeline "800x600"x0.0   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz d)
[  3493.856] rdpScreenInit: virtualX 800 virtualY 600 rgbBits 8 depth 24
[  3493.856] rdpScreenInit: pfbMemory bytes 1920000
[  3493.856] rdpScreenInit: pfbMemory 0x7fe9734a3010
[  3493.856] rdpSimdInit: assigning yuv functions
[  3493.856] rdpSimdInit: cpuid ax 1 cx 0 return ax 0x00810f81 bx 0x02040800 cx 0x7ed8320b dx 0x178bfbff
[  3493.856] rdpSimdInit: sse2 amd64 yuv functions assigned
[  3493.856] (==) XRDPDEV(0): Backing store enabled
[  3493.856] rdpClientConInit: disconnect idle session after [14400] sec
[  3493.856] rdpClientConInit: kill disconnected [1] timeout [60] sec
[  3493.856] rdpXvInit: depth 24
[  3493.856] rdpScreenInit: out
[  3493.856] (II) Initializing extension Generic Event Extension
[  3493.856] (II) Initializing extension SHAPE
[  3493.857] (II) Initializing extension MIT-SHM
[  3493.857] (II) Initializing extension XInputExtension
[  3493.857] (II) Initializing extension XTEST
[  3493.857] (II) Initializing extension BIG-REQUESTS
[  3493.857] (II) Initializing extension SYNC
[  3493.857] (II) Initializing extension XKEYBOARD
[  3493.857] (II) Initializing extension XC-MISC
[  3493.857] (II) Initializing extension SECURITY
[  3493.857] (II) Initializing extension XFIXES
[  3493.857] (II) Initializing extension RENDER
[  3493.857] (II) Initializing extension RANDR
[  3493.857] (II) Initializing extension COMPOSITE
[  3493.857] (II) Initializing extension DAMAGE
[  3493.857] (II) Initializing extension MIT-SCREEN-SAVER
[  3493.858] (II) Initializing extension DOUBLE-BUFFER
[  3493.858] (II) Initializing extension RECORD
[  3493.858] (II) Initializing extension DPMS
[  3493.858] (II) Initializing extension Present
[  3493.858] (II) Initializing extension DRI3
[  3493.858] (II) Initializing extension X-Resource
[  3493.858] (II) Initializing extension XVideo
[  3493.858] (II) Initializing extension XVideo-MotionCompensation
[  3493.858] (II) Initializing extension SELinux
[  3493.858] (II) SELinux: Disabled on system
[  3493.858] (II) Initializing extension GLX
[  3493.858] (II) AIGLX: Screen 0 is not DRI2 capable
[  3493.882] (II) IGLX: Loaded and initialized swrast
[  3493.882] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[  3493.882] (II) Initializing extension XFree86-VidModeExtension
[  3493.882] (II) Initializing extension XFree86-DGA
[  3493.882] (II) Initializing extension XFree86-DRI
[  3493.882] (II) Initializing extension DRI2
[  3493.882] rdpCreateScreenResources:
[  3493.903] (II) Using input driver 'XRDPMOUSE' for 'xrdpMouse'
[  3493.903] (**) Option "CorePointer"
[  3493.903] (**) xrdpMouse: always reports core events
[  3493.903] rdpmousePreInit: drv 0x55b908e83a00 info 0x55b9090bfb70, flags 0x0
[  3493.903] (II) XINPUT: Adding extended input device "xrdpMouse" (type: Mouse, id 6)
[  3493.903] rdpmouseControl: what 0
[  3493.903] rdpmouseDeviceInit:
[  3493.903] rdpmouseCtrl:
[  3493.903] rdpRegisterInputCallback: type 1 proc 0x7fe973b80380
[  3493.903] (**) xrdpMouse: (accel) keeping acceleration scheme 1
[  3493.903] (**) xrdpMouse: (accel) acceleration profile 0
[  3493.904] (**) xrdpMouse: (accel) acceleration factor: 2.000
[  3493.904] (**) xrdpMouse: (accel) acceleration threshold: 4
[  3493.904] rdpmouseControl: what 1
[  3493.904] rdpmouseDeviceOn:
[  3493.904] (II) Using input driver 'XRDPKEYB' for 'xrdpKeyboard'
[  3493.904] (**) Option "CoreKeyboard"
[  3493.904] (**) xrdpKeyboard: always reports core events
[  3493.904] rdpkeybPreInit: drv 0x55b908e83970 info 0x55b90922f6e0, flags 0x0
[  3493.904] (II) XINPUT: Adding extended input device "xrdpKeyboard" (type: Keyboard, id 7)
[  3493.904] rdpkeybControl: what 0
[  3493.904] rdpkeybDeviceInit:
[  3493.918] rdpkeybChangeKeyboardControl:
[  3493.918] rdpkeybChangeKeyboardControl: autoRepeat on
[  3493.918] rdpRegisterInputCallback: type 0 proc 0x7fe973b7b7e0
[  3493.918] rdpkeybControl: what 1
[  3493.918] rdpkeybDeviceOn:
[  3493.923] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[  3493.923] (II) AutoAddDevices is off - not adding device.
[  3493.923] (II) config/udev: Adding input device Video Bus (/dev/input/event0)
[  3493.923] (II) AutoAddDevices is off - not adding device.
[  3493.924] (II) config/udev: Adding input device Power Button (/dev/input/event1)
[  3493.924] (II) AutoAddDevices is off - not adding device.
[  3493.924] (II) config/udev: Adding drm device (/dev/dri/card0)
[  3493.924] (II) xfree86: Adding drm device (/dev/dri/card0)
[  3493.924] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[  3493.924] (II) config/udev: Adding input device HD-Audio Generic HDMI/DP,pcm=3 (/dev/input/event4)
[  3493.924] (II) AutoAddDevices is off - not adding device.
[  3493.925] (II) config/udev: Adding input device HD-Audio Generic HDMI/DP,pcm=7 (/dev/input/event5)
[  3493.925] (II) AutoAddDevices is off - not adding device.
[  3493.925] (II) config/udev: Adding input device HD-Audio Generic HDMI/DP,pcm=8 (/dev/input/event6)
[  3493.925] (II) AutoAddDevices is off - not adding device.
[  3493.925] (II) config/udev: Adding input device PC Speaker (/dev/input/event3)
[  3493.925] (II) AutoAddDevices is off - not adding device.
[  3493.929] rdpDeferredRandR:
[  3493.929] rdpResizeSession: width 1024 height 768
[  3493.929]   calling RRScreenSizeSet
[  3493.929] rdpRRScreenSetSize: width 1024 height 768 mmWidth 271 mmHeight 203
[  3493.929] rdpRRGetInfo:
[  3493.929]   screen resized to 1024x768
[  3493.929]   RRScreenSizeSet ok 1
[  3493.929] rdpResizeSession: width 1024 height 768
[  3494.019] rdpInDeferredRepeatCallback:
[  3494.019] rdpkeybChangeKeyboardControl:
[  3494.019] rdpkeybChangeKeyboardControl: autoRepeat off
[  3494.259] rdpClientConGotConnection:
[  3494.259] rdpClientConGotConnection: g_sck_accept ok new_sck 94
[  3494.259] rdpClientConGetConnection: engaging idle timer, timeout [14400] sec
[  3494.259] rdpAddClientConToDev: adding first clientCon 0x55b90939c6f0
[  3494.296] rdpClientConProcessMsgVersion: version 0 0 0 1
[  3494.297] rdpClientConProcessScreenSizeMsg: set width 1024 height 768 bpp 8
[  3494.297] rdpClientConProcessScreenSizeMsg: shmemid 8 shmemptr 0x7fe9735b8000
[  3494.308] rdpClientConProcessMsgClientInput: invalidate x 0 y 0 cx 1024 cy 768
[  3494.350] rdpClientConProcessMsgClientInfo:
[  3494.350]   got client info bytes 5752
[  3494.350]   jpeg support 0
[  3494.350]   offscreen support 0
[  3494.350]   offscreen size 0
[  3494.350]   offscreen entries 0
[  3494.350]   client supports glyph cache but server disabled
[  3494.350]   client can not do offscreen to offscreen blits
[  3494.350]   client can not do new(color) cursor
[  3494.350]   client can not do multimon
[  3494.350] rdpRRSetRdpOutputs: numCrtcs 0 numOutputs 0 monitorCount 0
[  3494.350] rdpRRSetRdpOutputs: add output 0 left 0 top 0 width 1024 height 768
[  3494.350] rdpLoadLayout: keylayout 0x00000416 variant  display 10
[  3494.361] rdpkeybChangeKeyboardControl:
[  3494.361] rdpkeybChangeKeyboardControl: autoRepeat on
[  3494.362] rdpkeybChangeKeyboardControl:
[  3494.362] rdpkeybChangeKeyboardControl: autoRepeat on
[  3494.471] rdpInDeferredRepeatCallback:
[  3494.471] rdpkeybChangeKeyboardControl:
[  3494.471] rdpkeybChangeKeyboardControl: autoRepeat off
[  3494.471] rdpInDeferredRepeatCallback:
[  3494.471] rdpkeybChangeKeyboardControl:
[  3494.471] rdpkeybChangeKeyboardControl: autoRepeat off
[  3548.823] rdpClientConRecv: g_sck_recv failed(returned 0)
[  3548.823] rdpClientConRecvMsg: error
[  3548.823] rdpClientConCheck: rdpClientConGotData failed
[  3548.823] rdpClientConDisconnect:
[  3548.823] rdpClientConDisconnect: disconnected, idle timer disengaged
[  3548.823] rdpClientConDisconnect: engaging disconnect timer, exit after 60 seconds
[  3548.823] rdpRemoveClientConFromDev: removing clientCon 0x55b90939c6f0
[  3608.859] rdpDeferredDisconnectCallback: disconnect timeout exceeded, exiting
[  3608.875] rdpmouseControl: what 2
[  3608.875] rdpmouseDeviceOff:
[  3608.875] rdpkeybControl: what 2
[  3608.875] rdpkeybDeviceOff:
[  3608.875] rdpkeybControl: what 3
[  3608.875] rdpkeybUnInit: drv 0x55b908e83970 info 0x55b90922f6e0, flags 0x0
[  3608.875] rdpUnregisterInputCallback: proc 0x7fe973b7b7e0
[  3608.875] rdpmouseControl: what 3
[  3608.875] rdpmouseUnInit: drv 0x55b908e83a00 info 0x55b9090bfb70, flags 0x0
[  3608.875] rdpUnregisterInputCallback: proc 0x7fe973b80380
[  3608.876] rdpCloseScreen:
[  3608.876] xorgxrdpDownDown:
[  3608.876] xorgxrdpDownDown: 1
[  3608.876] rdpClientConDeinit:
[  3608.876] rdpClientConDeinit: deleting file /run/xrdp/sockdir/xrdp_display_10
[  3608.876] rdpClientConDeinit: deleting file /run/xrdp/sockdir/xrdp_disconnect_display_10
[  3608.878] (II) Server terminated successfully (0). Closing log file.

cat /etc/xrdp/xrdp.ini #Comments removed for brevity

[Globals]
ini_version=1
fork=true
port=tcp://:32000
use_vsock=false
tcp_nodelay=true
tcp_keepalive=true
security_layer=negotiate
crypt_level=medium
certificate=
key_file=
ssl_protocols=TLSv1.2, TLSv1.3
tls_ciphers=HIGH
autorun=
allow_channels=false
allow_multimon=true
bitmap_cache=true
bitmap_compression=true
bulk_compression=true
max_bpp=8
new_cursors=false
use_fastpath=both
blue=474740
dark_blue=08246b
ls_top_window_bg_color=3671ad
ls_width=322
ls_height=220
ls_bg_color=E8E8E8
ls_logo_filename=/usr/share/xrdp/ad256.bmp
ls_logo_x_pos=0
ls_logo_y_pos=25
ls_label_x_pos=25
ls_label_width=70
ls_input_x_pos=110
ls_input_width=200
ls_input_y_pos=110
ls_btn_ok_x_pos=185
ls_btn_ok_y_pos=190
ls_btn_ok_width=65
ls_btn_ok_height=24
ls_btn_cancel_x_pos=110
ls_btn_cancel_y_pos=190
ls_btn_cancel_width=65
ls_btn_cancel_height=24

[Logging]
LogFile=xrdp.log
LogLevel=DEBUG
EnableSyslog=true
SyslogLevel=DEBUG
ConsoleLevel=DEBUG

[Channels]
rdpdr=true
rdpsnd=false
drdynvc=true
cliprdr=true
rail=false
xrdpvr=false
tcutils=true

[Xorg]
name=Remote
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
code=20

cat /etc/xrdp/sesman.ini #Comments removed for brevity

[Globals]
ListenAddress=127.0.0.1
ListenPort=3350
EnableUserWindowManager=true
UserWindowManager=startwm.sh
DefaultWindowManager=startwm.sh
ReconnectScript=reconnectwm.sh

[Security]
AllowRootLogin=false
MaxLoginRetry=5
TerminalServerUsers=tsusers
TerminalServerAdmins=tsadmins
AlwaysGroupCheck=false
RestrictOutboundClipboard=false

[Sessions]
X11DisplayOffset=10
MaxSessions=50
KillDisconnected=true
DisconnectedTimeLimit=60
IdleTimeLimit=14400
Policy=Default

[Logging]
LogFile=xrdp-sesman.log
LogLevel=DEBUG
EnableSyslog=1
SyslogLevel=DEBUG
ConsoleLevel=DEBUG

[Xorg]
param=/usr/lib/xorg/Xorg
param=-config
param=xrdp/xorg.conf
param=-noreset
param=-nolisten
param=tcp
param=-logfile
param=.xorgxrdp.%s.log

[Chansrv]
FuseMountName=/run/user/%u/gvfs
FileUmask=077

[SessionVariables]
igorfk commented 2 years ago

hundreds of these processes spawn while in blackscreen:

username  149955  0.0  0.0   2420    84 ?        S    13:56   0:00 /bin/sh /etc/X11/Xsession
username  149956  0.0  0.0   5304   504 ?        S    13:56   0:00 sleep 3
username  149961  0.0  0.0   2420    80 ?        S    13:56   0:00 /bin/sh /etc/X11/Xsession
username  149962  0.0  0.0   5304   504 ?        S    13:56   0:00 sleep 3
...
username  150146  0.0  0.0   2420    84 ?        S    13:56   0:00 /bin/sh /etc/X11/Xsession
username  150147  0.0  0.0   5304   564 ?        S    13:56   0:00 sleep 3
username  150152  0.0  0.0   2420    80 ?        S    13:56   0:00 /bin/sh /etc/X11/Xsession
username  150153  0.0  0.0   5304   572 ?        S    13:56   0:00 sleep 3
matt335672 commented 2 years ago

It looks like /etc/X11/Xsession is failing to start a session for some reason, and retrying something.

I can't find any sleep commands in my session startup scripts.

Can you post the output of this command?

DISPLAY= /bin/sh -x /etc/X11/Xsession

Don't miss out the space after DISPLAY=

If that command ends with lines something like this:-

+ ERRFILE=/home/username/.xsession-errors
+ [ -w /home/username/.xsession-errors ]
+ [ ! -L /home/username/.xsession-errors ]
+ chmod 600 /home/username/.xsession-errors
+ stat -c%s /home/username/.xsession-errors
+ [ 388129 -gt 500000 ]
+ exec

you'll find more information in ~/.xsession-errors. That would be useful to see too.

igorfk commented 2 years ago

First: Thank you for all your work in this project @matt335672 and all other Devs

Second: I'm dumb.

Trying to make USB redirection work for me, eventually I executed the following command:

cp /etc/xrdp/startwm.sh /etc/X11/Xsession

instead of

cp /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.backup
cp /etc/X11/Xsession /etc/xrdp/startwm.sh

I was following a good article but the problem was... me.

Restoring the original /etc/X11/Xsession file did the trick: XRDP server running without problems, get in the session and everything smooth.

matt335672 commented 2 years ago

Well, it had the interesting side-effect of giving us something unusual to think about!

I'm very sure you're not dumb - we all fat-finger stuff from time-to-time.

Thanks for getting back to us.