Windows 10: Disable stealing CPU/GPU cycles from other apps when a window is in focus

Discus and support Disable stealing CPU/GPU cycles from other apps when a window is in focus in Windows 10 BSOD Crashes and Debugging to solve the problem; Hello all, I'm running 2 instances of the same GPU-bound python script. The editor I'm using (IDLE), starts each script inside a terminal console and... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by Nicolas Chaumont, Oct 3, 2019.

  1. Disable stealing CPU/GPU cycles from other apps when a window is in focus


    Hello all,


    I'm running 2 instances of the same GPU-bound python script. The editor I'm using (IDLE), starts each script inside a terminal console and the scripts open up their own window to view a camera feed (using OpenCV). Here is what I observe:

    • When no window that show a camera feed is in focus, both apps run at the same speed, i.e. the frame rate is ~7.5fps.
    • When I click on any of these two windows, its frame rate is suddenly bumped up to ~12fps, and the other's drops down to ~4fps.


    Again, when I click on any other window, both run at the same frame rate. I changed the priority in Task Manager to high and low, but the performance is the same and my issue remains. This is an issue because I need to do things (video tracking/recording, store to DB) that require a sustained, near constant speed, and a random user-induced change in frame rate of a factor of 1-3 is unacceptable. Is there a way to disable this effect? Maybe by switching an option somewhere in the Windows settings to not change a window's priority while in focus? Or maybe invoke the script in the Windows shell/powershell with a setting that makes an app immune to changes in CPU allocation when in/out of focus?


    FYI, here is a summary of my configuration:

    • OS: Windows 10 64-bit Pro v1803
    • CPU: Intel I9-7920X@2.9GHz (CPU usage: 100%)
    • RAM: 64GB (memory usage: 45%)
    • GPU: Nvidia GeForce RTX 2080Ti (GPU usage: 5%)
    • CUDA 10.1/CUDNN 7.6.3.30
    • Nvidia Driver 436.48 (release date 10/01/2019)
    • OpenPose 1.5.1
    • OpenCV 4.1.1
    • python 3.6.8
    • Video source: 2 USB cameras, 1920x1080 @ 30fps


    Thank you in advance!

    Nicolas

    :)
     
    Nicolas Chaumont, Oct 3, 2019
    #1
  2. condabest Win User

    Disabling Apps/Programs from Focus Stealing


    This is a general inquiry about how to disable specific programs' ability to steal focus/move their windows to front in windows 10. There used to be a registry you could edit to disable this I believe, but was removed for Windows 7(?) and apparently editing it (I've read [1]) doesn't affect anything.

    Is there some way to edit a program's permission's or the registry or another setting to prevent either all programs or select programs from stealing focus etc? (This is for programs that don't give you the option of turning it off in their settings.)

    Thanks for the help Disable stealing CPU/GPU cycles from other apps when a window is in focus :)

    [1] Preventing applications from stealing focus
     
    condabest, Oct 3, 2019
    #2
  3. dalchina Win User
    Disabling Apps/Programs from Focus Stealing


    Looking at this a slightly different way, you can use a 3rd party utility to expose a function to keep Windows on top. There are a number of of older utilities that did that which don't work now, and some that do. Some added 'Send to back' as well.

    'Keep on top' is something I use quite frequently - you can set two Windows 'on top' and so prioritise those two as well.

    Presently I use Actual Window Manager (they also do Actual Title Bar - which just has title bar functions and is cheaper, being a subset). I got the former 'free' (legitimately).

    Disable stealing CPU/GPU cycles from other apps when a window is in focus [​IMG]


    Here you can see added buttons- the pin is 'on top' and changes when the window is pinned 'on top'.


    Disable stealing CPU/GPU cycles from other apps when a window is in focus [​IMG]

    Here you can see 'Keep on top' added to rt click title bar options. However this gives no visible indication of the window being on top. These options are a combination of those from Moo0 Window menu plus (which is redundant, given the other program) and those from Actual Window Manager.
     
    dalchina, Oct 3, 2019
    #3
  4. Imakuni Win User

    Disable stealing CPU/GPU cycles from other apps when a window is in focus

    System and compressed memory eating CPU cycles

    • Did it, nothing found.
    • Already tried that before posting.
    • It's Windows 10, so it's pretty much always up to date. Regardless, I tried again, nothing new.
    It's funny how being idle lowers CPU consumption to a few %, while simply moving the mouse skyrockets the resource steal (and the faster you move, the more cycles it uses).
     
    Imakuni, Oct 3, 2019
    #4
Thema:

Disable stealing CPU/GPU cycles from other apps when a window is in focus

Loading...
  1. Disable stealing CPU/GPU cycles from other apps when a window is in focus - Similar Threads - Disable stealing CPU

  2. mstsc.exe stealing focus

    in Windows 10 Software and Apps
    mstsc.exe stealing focus: Hello.I have a problem on my Windows 11 PC. Whenever I do anything on my PC, a program called mstsc.exe steals focus of my opened window. This happens every few minutes. The program is located in C:\Windows\System32\mstsc.exe. I used this program:...
  3. mstsc.exe stealing focus

    in Windows 10 Gaming
    mstsc.exe stealing focus: Hello.I have a problem on my Windows 11 PC. Whenever I do anything on my PC, a program called mstsc.exe steals focus of my opened window. This happens every few minutes. The program is located in C:\Windows\System32\mstsc.exe. I used this program:...
  4. Programs launched with administrator rights are stealing focus from other windows

    in Windows 10 Gaming
    Programs launched with administrator rights are stealing focus from other windows: I'm running Windows 11 22598.200, but this has been happening for longer, I don't know when it started. I'm pretty sure this is not expected behavior, right?Basically, anything launched as admin steals focus from everything else, so the only thing I can click on is that one...
  5. Programs launched with administrator rights are stealing focus from other windows

    in Windows 10 Software and Apps
    Programs launched with administrator rights are stealing focus from other windows: I'm running Windows 11 22598.200, but this has been happening for longer, I don't know when it started. I'm pretty sure this is not expected behavior, right?Basically, anything launched as admin steals focus from everything else, so the only thing I can click on is that one...
  6. Black Window Stealing Focus

    in Windows 10 Support
    Black Window Stealing Focus: First off, from what I can tell this is some sort of window. Windows can display over top of it, but only by bringing up or forcing the OS to show a window or item by hovering mouse over taskbar icon. The black window also is not fullscreen as anything being displayed behind...
  7. SearchUI Stealing Focus

    in Windows 10 Gaming
    SearchUI Stealing Focus: Hi, I've recently started playing RDR2 but every few minutes SearchUI.exe steals focus from the game. From what I've read, you are unable to uninstall Cortana or rename to stop the process from running. Has anybody had a similar issue and been able to resolve? Windows...
  8. Focus stealing

    in Windows 10 Ask Insider
    Focus stealing: I have an application that has drop down menus for work. (like a status change from started to completed) And if I have the work application open, and I open any other application, Skype, Internet explorer, Chrome anything, AFTER the work app is running, I can no longer use...
  9. Windows Updater Steals Focus

    in Windows 10 Installation and Upgrade
    Windows Updater Steals Focus: When playing games via Steam every hour or so the game would mysteriously minimize or at the very least drop out of full screen for a couple of seconds. After a lot of research and debugging I was able to track the problem down to Windows Updater stealing focus. This is...
  10. Disabling Apps/Programs from Focus Stealing

    in Windows 10 Support
    Disabling Apps/Programs from Focus Stealing: This is a general inquiry about how to disable specific programs' ability to steal focus/move their windows to front in windows 10. There used to be a registry you could edit to disable this I believe, but was removed for Windows 7(?) and apparently editing it (I've read [1])...