xrdp - blank black screen after a while

Greetings.

I am running DietPi v6.34.3 on an Odroid XU4. I’ve installed xrdp via dietpi-software.

It works fine, however: If i do not connect for longer, at next connect i only see a black screen with the cursor of the system being visible.

I’ve to run

service xrdp restart

in order to get it working again.


I am using the default Windows RDP Client. I’ve tried to disable the persistent bitmap caching, without success.

Any help? It’s pretty annoying, as i have to login via Putty first, to restart xrdp :frowning:

Hi,

what time frame we are talking about. Is it hours or days before XRDP stuck?

Like 10-15 minutes or less.

When it works, if i disconnect and connect again instantly, it’s no problem.

I have 2 test installations running

  • RPi3B+ running DietPi 32bit
  • RPi4B running DietPi 64bit

Both are still working on xrdp even after hours. Not sure what could be the issue on your side. Once you system is not reaction on RDP anymore, can you check systemctl status xrdp

Weird, it’s basically a fresh install.

Thats what i get from systemctl status xrdp:

root@DietPi:~# systemctl status xrdp
● xrdp.service - xrdp daemon
   Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: ena
bled)
   Active: active (running) since Thu 2021-01-21 20:35:56 CET; 4h 34m
in ago
     Docs: man:xrdp(8)
           man:xrdp.ini(5)
  Process: 10170 ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill (code=exited, stat
us=0/SUCCESS)
  Process: 10188 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/S
UCCESS)
  Process: 10179 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, st
atus=0/SUCCESS)
 Main PID: 10190 (xrdp)
   CGroup: /system.slice/xrdp.service
           └─10190 /usr/sbin/xrdp

Jän 22 01:09:26 DietPi xrdp[21023]: (21023)(-1225792480)[DEBUG] Closed socket 16
 (AF_INET6 ::ffff:127.0.0.1 port 43536)
Jän 22 01:09:26 DietPi xrdp[21023]: (21023)(-1225792480)[INFO ] The following ch
annel is allowed: rdpdr (0)
Jän 22 01:09:26 DietPi xrdp[21023]: (21023)(-1225792480)[INFO ] The following ch
annel is allowed: rdpsnd (1)
Jän 22 01:09:26 DietPi xrdp[21023]: (21023)(-1225792480)[INFO ] The following channel is allowed: cliprdr (2)
Jän 22 01:09:26 DietPi xrdp[21023]: (21023)(-1225792480)[INFO ] The following channel is allowed: drdynvc (3)
Jän 22 01:09:26 DietPi xrdp[21023]: (21023)(-1225792480)[DEBUG] The allow channel list now initialized for this session
Jän 22 01:09:30 DietPi xrdp[21023]: (21023)(-1225792480)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.0.100 port 3389)
Jän 22 01:09:30 DietPi xrdp[21023]: (21023)(-1225792480)[DEBUG] xrdp_mm_module_cleanup
Jän 22 01:09:30 DietPi xrdp[21023]: (21023)(-1225792480)[DEBUG] Closed socket 17 (AF_UNIX)
Jän 22 01:09:30 DietPi xrdp[21023]: (21023)(-1225792480)[DEBUG] Closed socket 18 (AF_UNIX)

Greetings

that looks quite ok.

ok once your rdp connection is not working can you check following two thinks as well

systemctl status xrdp-sesman.service
ss -tulpn | grep LISTEN

Sure, here we go

root@DietPi:~# systemctl status xrdp-sesman.service
● xrdp-sesman.service - xrdp session manager
   Loaded: loaded (/lib/systemd/system/xrdp-sesman.service; enabled; vendor pres
et: enabled)
   Active: active (running) since Thu 2021-01-21 20:35:55 CET; 18h ag
o
     Docs: man:xrdp-sesman(8)
           man:sesman.ini(5)
  Process: 10173 ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill (
code=exited, status=1/FAILURE)
  Process: 10176 ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS (code=exited, s
tatus=0/SUCCESS)
 Main PID: 10178 (xrdp-sesman)
   CGroup: /system.slice/xrdp-sesman.service
           └─10178 /usr/sbin/xrdp-sesman

Jän 22 14:57:17 DietPi xrdp-sesman[10178]: (10178)(-1225160112)[INFO ] A connect
ion received from ::ffff:127.0.0.1 port 43554
Jän 22 14:57:17 DietPi xrdp-sesman[10178]: (10178)(-1225160112)[INFO ] ++ reconn
ected session: username root, display :13.0, session_pid 10193, ip ::ffff:192.16
8.0.21:60875 - socket: 12
Jän 22 14:57:17 DietPi xrdp-sesman[10178]: (10178)(-1225160112)[DEBUG] Closed so
cket 8 (AF_INET6 ::ffff:127.0.0.1 port 3350)
Warning: Journal has been rotated since unit was started. Log output is incomple
te or unavailable.

&

root@DietPi:~# ss -tulpn | grep LISTEN
tcp    LISTEN     0      80     127.0.0.1:3306                  *:*                   users:(("mysqld",pid=723,fd=17))
tcp    LISTEN     0      128       *:80                    *:*                   users:(("apache2",pid=943,fd=3),("apache2",pid=942,fd=3),("apache2",pid=940,fd=3),("apache2",pid=939,fd=3),("apache2",pid=937,fd=3),("apache2",pid=936,fd=3),("apache2",pid=935,fd=3),("apache2",pid=934,fd=3),("apache2",pid=862,fd=3))
tcp    LISTEN     0      128       *:22                    *:*                   users:(("sshd",pid=599,fd=3))
tcp    LISTEN     0      2      ::ffff:127.0.0.1:3350                 :::*                   users:(("xrdp-sesman",pid=10178,fd=7))
tcp    LISTEN     0      128      :::22                   :::*                   users:(("sshd",pid=599,fd=4))
tcp    LISTEN     0      2        :::3389                 :::*                   users:(("xrdp",pid=10190,fd=11))

Thanks for your patience and help.

hmm looks like session manager is hanging or died? At least on my test I don’t have these messages on my service status.

Process: 10173 ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill (code=exited, status=1/FAILURE)

Can you try to restart session manager only next time? systemctl restart xrdp-sesman.service