TeamViewer closes connection often when switching between remote monitors

I've been using Teamviewer for a very long time (10+ years). However I am becoming very frustrated over the past 3/4 years with Teamviewer often closing the connection with no reason displayed when switching between monitors.

Teamviewer will often (but not always) close the connection when I press the button to switch monitor and it will also sometimes close all the connections if I connect to another machine with multiple monitors at the same time as an existing connection to a machine with multiple monitors.

If I check the logs, it usually goes like this:

2023/10/05 08:19:33.633  9540       9920 G1!! CBitmapBuffer::CBitmapBuffer Failed to create buffer, width 3856, height 2176, buffer size 33562624, Errorcode=8

2023/10/05 08:19:35.420  4844       6132 S0!! TcpProcessConnector::HandleRead error 10054 reading from process 9540: An existing connection was forcibly closed by the remote host, Errorcode=64

2023/10/05 08:19:35.420  4844       6132 S0   TcpProcessConnector::CloseConnection(): PID=9540

So it seems that Teamviewer isn't able to allocate sufficient resources to do what it needs to.

What can I do to solve this problem? Besides the obvious answer of never using a computer with multiple monitors or connecting to a computer with multiple monitors.

Note that most of the time at least one of the monitors is 4k/2160 resolution.

Tagged: