The user sees a black screen during reconnection if during the previous session applications were launched that could not be unloaded when the session was completed.
Very often, these are programs for displaying the status of household printers installed on the server (which display the "print started / completed windows", etc.)
Under the administrator, see which processes with the user name remain hanging on the server after disconnecting the user
Another reason may be a 32-bit spooler completion timeout (1C - 32-bit application)
When contacting 1C: Enterprise for printing, the SplWOW64.exe process starts, which automatically ends some time after the print job is executed. The delay in completing the SplWOW64.exe process improves the performance of repeated print operations. This process is used for conversions between 32-bit and 64-bit applications. If this process itself did not end before the closure of "1C: Enterprise", then the terminal session does not close either.
Decision
The following actions should be done:
Reduce the timeout for completing the SplWOW64.exe process. To do this, set the value of the SplWOW64TimeOut registry value to 1 (if there is no value, create it with the DWORD type (32 bits)). Registry branch: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Print
Add the SplWOW64.exe process to the list of processes terminated at the end of the terminal session.
To do this, set the value of the system registry SPLWOW64.EXE to set to 0 (in the absence of a value, it should be created with a DWORD type (32 bits)). Registry branch: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ TerminalServer \ SysProcs
Features of using 1C: Enterprise when working on a terminal server