The remote desktop gets terminated after session disconnection when the screen blanking is enabled
Behaviour described below is not caused by the NoMachine software, but it affects all the situations in which the X server "goes offscreen".
A change made in NoMachine v8.12.12 should avoid to trigger that misbehaviour.
If it still occurs, as a workaround, disable the blanking of the screen:
open the NoMachine UI on the remote host -> Settings -> Server -> Security and uncheck the 'Blank the physical screen when somebody connects' option.
After that the NoMachine session is closed, the remote desktop gets terminated. When the user reconnects to the remote physical display, all applications previously running are closed because the desktop environment has been restarted.
This happens when the screen blanking is enabled in NoMachine. It is reproducible also with system user switch, if screen blanking is enabled. In all of these cases, the X server suddenly terminates when it switches virtual terminal ("goes offscreen").
The stacktrace of Xorg is similar for all cases we analyzed so far and it doesn't reference the NoMachine software.
When this occurs, the last printed line in Xorg log is:
[ 94029.825] (II) AIGLX: Suspending AIGLX clients for VT switch
After that, the Xorg process suddenly terminates with this stack:
[ 94049.806] (EE) Backtrace:
[ 94049.807] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x13c) [0x56336083460c]
[ 94049.808] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x60) [0x7f6efda2c3c0]
[ 94049.809] (EE) 2: /usr/lib/xorg/Xorg (InitCallbackManager+0x1660) [0x5633606d9b30]
[ 94049.809] (EE) 3: /usr/lib/xorg/Xorg (DeliverEvents+0x108e) [0x5633606e3b3e]
[ 94049.809] (EE) 4: /usr/lib/xorg/Xorg (AssignTypeAndName+0x6dab) [0x5633607c5aeb]
[ 94049.809] (EE) 5: /usr/lib/xorg/Xorg (SendErrorToClient+0x354) [0x5633606d2f14]
[ 94049.810] (EE) 6: /usr/lib/xorg/Xorg (InitFonts+0x3b4) [0x5633606d6fc4]
[ 94049.811] (EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf3) [0x7f6efd84a0b3]
[ 94049.811] (EE) 8: /usr/lib/xorg/Xorg (_start+0x2e) [0x5633606c0a6e]
[ 94049.811] (EE)
[ 94049.811] (EE) Segmentation fault at address 0x28
SOLVED, Released in version 8.12.12
