Live data from Hacker News

Moving the mouse cursor can cause CPU spikes on macOS

mmazzarolo.com

11–20 of 28 posts

Re: Moving the mouse cursor can cause CPU spikes on macOS

#11
Somewhat related:

You'd think an end user computer HW+OS by now would decouple the UI at a hardware level and figure out how to minimize the performance losses from at least a two-tier design. But, this would require new ground up everything, including new end-user software dev paradigms, and by-design potentially second-tier performance in order to maximize security. This seems insurmountable, of course, but I bet such innovations will emerge this decade.

My money is on whoever can offer fundamental, fully integrated fixes to the whole stack from cloud to edge. Jumpy cursor CPU's, and monolithic internet/endpoints will be an anachronism.

Kudos to Apple for being performance leaders, though. I just find the current assortment of consumer hardware offers weak assurances by default (not everyone has a megacorp or resources to harden and protect their infra). This small mouse cursor bug reminds me of the rabbit hole that needs fixing, imo.

Re: Moving the mouse cursor can cause CPU spikes on macOS

#13

I recently learned that moving my mouse was causing the coil whine sound coming from my Win10 gaming PC. Turning down the polling rate on my mouse was the only fix that worked.

I've also been hearing coil whine sound coming from MacBook's Caldigit dock when using a wired gaming mouse (only in totally silent rooms). I haven’t mentioned it in the article, but just like you said, lowering the polling rate fixes it too.

Re: Moving the mouse cursor can cause CPU spikes on macOS

#14

Sounds like they’re working on removing the 60fps hard limit that macOS has had for the past fifteen years, as part of bringing 120Hz support from the TV and tablet line to pro Macs someday.

What 60fps hard limit? You can already set it to 120fps if your monitor supports it (and it has been possible for a few years).

Re: Moving the mouse cursor can cause CPU spikes on macOS

#15
post #5

I've been writing some UI widgets, and I bet this is caused by redrawing the widgets every time the mouse moves. I've not used Big Sur so I don't know if this is the case, but if they added highlights on mouseover, the easy way to make that work is redraw on every mouse move, just in case the mouse entered or exited a control. The slightly harder way, of course, is to detect transitions and only redraw then.

Interesting. I'm wondering why wouldn't it be tied to the display FPS instead of the polling rate though.

Re: Moving the mouse cursor can cause CPU spikes on macOS

#17

Sounds like they’re working on removing the 60fps hard limit that macOS has had for the past fifteen years, as part of bringing 120Hz support from the TV and tablet line to pro Macs someday.

What 60fps hard limit? You can already set it to 120fps if your monitor supports it (and it has been possible for a few years).

Seconded. I have been using 144hz for a couple of years.

Re: Moving the mouse cursor can cause CPU spikes on macOS

#18
>Finally, I tried and with a Magic Trackpad 2 (which should have a polling rate of ~90Hz) and with the built-in MacBook trackpad, and there were almost no changes to the WindowServer CPU usage.

I just decided to test it on my MBP, continuously moving the cursor on trackpad, WindowsServer was hovering at ~20+%, and 2-5% when it is not moving. It is not as high as an USB mouse but it is definitely problematic.

And I have noticed this for quite some time, I just never thought it was the mouse / cursor.

Re: Moving the mouse cursor can cause CPU spikes on macOS

#19

I recently learned that moving my mouse was causing the coil whine sound coming from my Win10 gaming PC. Turning down the polling rate on my mouse was the only fix that worked.

Same issue here on a MSI laptop, the weirdest thing is that the coil whine is louder when opening certain applications like the desktop client of Signal and HoneyView image viewer.

As far as I heard, it's related to CPU C-states.

Post reply on HN