Friday, November 15, 2024

performance – Screen sharing high CPU usage when using mouse / keyboard

I’m connecting into an M1 macbook (Sonoma) from a 2019 iMac (Sonoma, 64GB, i9, Radeon 570x 4GB) using Apple Screen Sharing.

Especially when viewing Chrome / Electron based applications, the iMac’s fans start spinning at full rev, and I notice 100% or more CPU usage by the Screen sharing app (not globally as shown on the Activity Monitor graph). I’ve noticed that it happens when there is mouse or keyboard activity; as soon as I switch out of the Screen Sharing app on the iMac, the CPU usage gets down to normal, even when I keep the Screen Sharing window visible, with all the macbook’s UI updates going on.

Sure, it’s summer, the 2019 iMac isn’t a youngster or a graphics dragon, but:

  • if I connect into the very same M1 from my 2015 iMac (Mojave), I don’t have this problem, the fans spin up now and then, but nothing noticeable;
  • it’s not Sonoma specific, because I don’t have problems connecting from my M2 macbook (Sonoma, ARD classic mode, the advanced is too buggy) either (but it can be Intel-Sonoma specific);
  • it really is bound to mouse / keyboard activity, and it really depends on the app running on the M1, Chrome + Electron apps being the worst offenders.

My solution so far has been to throw cpulimit with a 75% limit at Screen Sharing. It solves the fan noise, but Screen Sharing starts stuttering a lot with some Electron apps (not all). Then I stop using the mouse or keyboard, and it gets back to running smoothly.

Does anyone have any pointers?

Related Articles

Latest Articles