scopehal-apps icon indicating copy to clipboard operation
scopehal-apps copied to clipboard

macOS: CPU + GPU usage increase when window is hidden or off screen

Open sphereinabox opened this issue 9 months ago • 2 comments

I'm running macOS 14.7.6 on 16" m1pro MacBook pro when I hide ngscopeclient or it's not visible because it's on another space (virtual desktop) the CPU usage and GPU usage increase dramatically.

Visible, about 39% of one core cpu and 18% GPU: Image

Hidden, about 52% of one core cpu, 86% GPU Image

I think when the window is hidden the framerate is running unlocked.

sphereinabox avatar Apr 14 '25 15:04 sphereinabox

hiding the window with command+h is all that's needed to reproduce this.

Web searching I found people reporting similar (or opposite, too low framerate when hidden) issues with different apps using glfw. Imhex's latest release has some changes that sound like this, and it seems they have a 5fps target when hidden now.

web results I found:

  • someone wanting to disable reduced framerate when hidden https://github.com/glfw/glfw/issues/975
  • same "100% cpu when hidden" issue I'm seeing https://github.com/openframeworks/openFrameworks/issues/3181 comments mention glfw framerate limit
  • imhex commit changing idle target framerate https://github.com/WerWolv/ImHex/commit/602c85b57d360ef1a0abe13918bb837ee6dde615

sphereinabox avatar Apr 14 '25 15:04 sphereinabox

I think this is probably the same bug as #893 (trying to resize the window to 0x0 pixels and all hell breaking loose). Can you check if its fixed now?

azonenberg avatar Sep 23 '25 17:09 azonenberg