RDP session screen goes black after sign off

Brittany Brown 16 Reputation points
2022-02-07T18:42:49.12+00:00

Normally a user signs off to disconnect from the RDP session, recently users have been experiencing a black screen when signing off. Most of them don't have the menu bar pinned and then can't figure out how to disconnect, the ones that do have the menu bar pinned must click X to close the session.

I have been reviewing event viewer logs and the trend I see is 24>25>40

24: Remote Desktop Services: Session has disconnected (this is the sign off)
25: Session reconnection succeeded with Source Network Address (::% format)
40: Session X has been disconnected, reason code 5

This behavior is only occurring during outside of the network connections, all internal connections behave as expected. Any suggestions?

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,617 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Aeron W. Barhorst 5 Reputation points
    2023-08-16T20:17:46.6366667+00:00

    We are seeing this as well, this started within the last month. Upon logoff, the RDP client is still open on the Windows 11 client with a black background. On the server side, the user appears to be fully logged off and is no longer in the session list. So at first glance, this appears to be a client-side issue. My money is on one of Microsoft's careless monthly cumulative updates.

    1 person found this answer helpful.

  2. Aeron W. Barhorst 5 Reputation points
    2023-09-26T20:35:11.3333333+00:00

    As a workaround, I ended up deploying a script to the user's desktop that ran "taskkill /F /IM MSTSC.EXE "

    I was going to circle back around in a few months to see if Microsoft fixed it. I haven't heard any more complaints.


  3. Juliano Coelho 0 Reputation points
    2023-10-02T19:43:27.75+00:00

    Any news about this issue? I have the same problem when connecting through RDS Gateways.

    0 comments No comments

  4. Brett C 0 Reputation points
    2024-11-19T18:18:49.27+00:00

    Hey all,

    I finally solved this, in our case it was firewall related. Port 3391 UDP was being denied to the remote desktop gateway server. After whitelisting UDP 3391 we can finally successfully logout of the RD Gateway without a black screen.

    Hopefully this helps.

    BC

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.