45

When I try to connect to Windows 2012 Server using Remote Desktop Connection, I'm connected for about 1 sec. and then disconnected with following error:

Because of a protocol error (code: 0x112f), the remote session will be disconnected.

Until yesterday, connection was working fine with no error, no server changes. I never saw this error before. I tried to lower visual appearance settings in Experience panel (found as possible solution to similar error), but with no result.

Ondřej Šotek
  • 1,633
  • 1
  • 11
  • 24
  • You can just try to restart 'Remote Desktop Serivces' service at Services list window(Win + R -> services.msc -> Enter) and then try to reconnect – Volodymyr Oct 09 '20 at 13:22

9 Answers9

40

This error may be triggered by insufficient memory on RDP server.

After few tries with this error, RDP managed to get a connection to the server and I was able to stop a bogus service consuming too much memory. This can be done also with sysinternals or sc.

McX
  • 1,166
  • 1
  • 11
  • 15
  • You are Right!. My test program bugged and eat up all memory,and I couldn't connect – Benny Ae May 30 '19 at 21:44
  • 1
    In my case, the error was triggered only when I had the "Use all my monitors (2) for the remote session". When I unchecked and used a single monitor I was able to connect and manage the memory on the server – Slack Groverglow Apr 20 '21 at 13:56
18

Might not be a solution for all but I found that if I reduced the screen resolution of the RDP session, I was able to get in. The server was at 95% capacity I went from 3 high res monitors to 1 800x600 window.

ThatUser
  • 397
  • 4
  • 10
  • That is so clever! That worked for me. The remote PC was running 24 instances of Edge and I fell it's leaking memory. – Frank Monroe Jun 04 '20 at 15:23
  • 1
    This was the solution for me, thank you so much! Turns out 3 screens in full screen takes up a lot of memory. I was able to connect after deselecting _Use all my monitors for the remote session_ under the _Display_ tab. Now all I have to do is quit some programs, and I can go back to using my multimonitor setup in fullscreen again! – Adrian Wiik Sep 12 '20 at 00:07
  • 1
    An update to this: I have found that if you connect using only one monitor first (uncheck "Use all my monitors for the remote session" in the "Display" tab before connecting), and then connect using all monitors _while still being connected with one monitor_, the multi-monitor connection will "take over" and successfully connect without the 0x112f error. Hope this helps! – Adrian Wiik Mar 19 '21 at 08:29
14

Server restart helped, I'm able to connect to server again.

Ondřej Šotek
  • 1,633
  • 1
  • 11
  • 24
7

If the server accessible with RPC (basically, if you can access a shared folder on it), you could free some memory and thus let the RDP service work properly. The following windows native commands can be used:

To get the list of memory consuming tasks:

tasklist /S <remote_server> /V /FI "MEMUSAGE gt 10000"

To kill a task by its name:

taskkill /S <remote_server> /IM <process_image_name> /F

To show the list of desktop sessions:

qwinsta.exe /SERVER:<remote_server>

To close an old abandoned desktop session:

logoff <session_id> /SERVER:<remote_server> 

After some memory is freed, the RDP should start working.

zc2
  • 449
  • 3
  • 7
3

A simple thing. Disable the vsphere options 3D for the virtual maschine . It works perfect. When you want, reinstall the vm-tools for the virtual maschine.

2

Resized VM with more memory fixed this issue.

1

I got the same error recently. I think McX is right it was caused by insufficient memory on RDP server. Here is the solution that works for us.

  1. use sc cmd to get running services on the remote server. Make sure you can use windows explorer to access the remote server \\remote_server.

    sc \\<remote_server> query

  2. find out the service you can stop.

    sc \\<remote_server> stop <service_name>

After stopping one service, the remote desktop works again.

John-L
  • 21
  • 1
  • 1
1

If anyone comes to this thread and has this issue when you remote to a VMware VM with windows 10 1903, disabling 3d in the graphics card worked for me.

doktorg
  • 187
  • 1
  • 11
1

There may be a problem with the video adapter. At least that's what I had. I picked up problems immediately after updating Windows 10 to the 2004 version. Disabling hardware graphics — solved the problem.

https://www.reddit.com/r/sysadmin/comments/gz6chp/rdp_issues_on_2004_update/

Roman Koff
  • 33
  • 8
  • I got the protocol error 0x122f ONLY when reconnecting after disconnecting while flagged "Use all my monitors...". Disabling those two values solved the problem. (RDP From Windows 10 to WIndows 10.) Thank you so much for this answer! – Stephan Møller Sep 21 '20 at 10:13
  • 1
    Hell continues. After some updates, it started to fall off again. John-L's solution makes sense. I also found the following crutch: (the bug appears in the "use all monitors" mode) I created a single-screen connection profile and an all-screen connection profile. If you run a single-screen mode and close it, then the multi-screen mode is once again available. – Roman Koff Nov 13 '20 at 21:19
  • I again began getting this error. :( – Stephan Møller Nov 19 '20 at 11:49
  • Yes. They broke something again, but in a different way (after the update) – Roman Koff Nov 20 '20 at 14:37