Message boards : BOINC client : Feature request: suspend GPU tasks when fullscreen app is running
Message board moderation
Author | Message |
---|---|
Send message Joined: 11 Jun 13 Posts: 1 |
On my Windows boxes, I can run GPU tasks almost all the time. No lag, no drag, everything is smooth. The only noticeable exceptions are: 1. Video games. When I occasionally get to play, I have to disable GPU tasks so that the game plays smoothly. 2. Films and cartoons, especially in HD quality (e.g., BluRay discs). If I leave GPU tasks running, video often gets jerky and lags behind audio track. Yes, I know that there is a preference to only use GPU when the box is not in use, but it does not quite fit. For games, it does work, but as I said I am only an occasional player, so most of the time GPU tasks are suspended because I am using the computer for other purposes. Typing text, surfing the Internet, whatever. So, leaving this option on is a waste of GPU computational power. For films, this option does not work either: after the period of presumed "inactivity", the tasks are resumed, and video gets jerky again. Fairly annoying, I assure you. So, I propose to add an option to suspend GPU computation if any application is running in fullscreen mode. For me, these apps are games and videos, without exception. I guess I am not the only one. Here is the snippet of code that does the detection under Windows: bool isFullscreenAppActive() { HWND hwnd = GetForegroundWindow(); if( hwnd == 0 ) { return false; } // Everything is minimized. if( hwnd == GetShellWindow() ) { return false; } if( hwnd == GetDesktopWindow() ) { return false; } // Aha, we have some window. Does it fit the screen? RECT rcWindow; GetWindowRect( hwnd, &rcWindow ); HMONITOR hm = MonitorFromRect( &rcWindow, MONITOR_DEFAULTTONULL ); if(!hm) { return false; } MONITORINFO mi = {sizeof (mi)}; GetMonitorInfo( hm, &mi ); return EqualRect( &rcWindow, &mi.rcMonitor ) != FALSE; } This code works fairly reliably on my Windows boxes (WinXP, Win7, Win7 64-bit). In theory, it may return false positives when a screensaver becomes active. In practice, I didn't see any. As for Linux machines running X-server, I do not have any solution. Neither have I for Mac. Detecting fullscreen applications may be tricky on these systems, so I hope someone with better knowledge would step in and add the code. For now, the function may always return 'false' on these systems (no fullscreen apps detected - which is the truth). In the meanwhile, could you please add this option anyway? It might be marked OS-specific for a time being. |
Send message Joined: 29 Aug 05 Posts: 15581 |
Check out the cc_config.xml option <exclusive_gpu_app>important.exe</exclusive_gpu_app> This works under any platform. A cc_config.xml like this: <cc_config> <log_flags> </log_flags> <options> <exclusive_app>BurnoutParadise.exe</exclusive_app> <exclusive_app>Crysis.exe</exclusive_app> <exclusive_app>Crysis2.exe</exclusive_app> <exclusive_app>Crysis3.exe</exclusive_app> <exclusive_app>DarkAthena.exe</exclusive_app> <exclusive_app>DarkAthena_Launcher.exe</exclusive_app> <exclusive_app>DOOM3.exe</exclusive_app> <exclusive_app>DOOM3DED.exe</exclusive_app> <exclusive_app>dxhr.exe</exclusive_app> <exclusive_app>dxhrml.exe</exclusive_app> <exclusive_app>EFLC.exe</exclusive_app> <exclusive_app>FarCry2.exe</exclusive_app> <exclusive_app>FUEL.exe</exclusive_app> <exclusive_app>GTAIV.exe</exclusive_app> <exclusive_app>hl2.exe</exclusive_app> <exclusive_app>iw3sp.exe</exclusive_app> <exclusive_app>iw4sp.exe</exclusive_app> <exclusive_app>iw5sp.exe</exclusive_app> <exclusive_app>LaunchEFLC.exe</exclusive_app> <exclusive_app>Launcher.exe</exclusive_app> <exclusive_app>LaunchGTAIV.exe</exclusive_app> <exclusive_app>nexus.exe</exclusive_app> <exclusive_app>nexus_DX9.exe</exclusive_app> <exclusive_app>NFS11.exe</exclusive_app> <exclusive_app>NFS13.exe</exclusive_app> <exclusive_app>oblivion.exe</exclusive_app> <exclusive_app>OFDR.exe</exclusive_app> <exclusive_app>OperationFlashpoint.exe</exclusive_app> <exclusive_app>RedRiver.exe</exclusive_app> <exclusive_app>RedRiverLauncher.exe</exclusive_app> <exclusive_app>skyrim4gb.exe</exclusive_app> <exclusive_app>SkyrimLauncher.exe</exclusive_app> <exclusive_app>SpecOpsTheLine.exe</exclusive_app> <exclusive_app>TESV.exe</exclusive_app> <exclusive_gpu_app>FEAR.exe</exclusive_gpu_app> <exclusive_gpu_app>farcry3.exe</exclusive_gpu_app> <exclusive_gpu_app>FarCry.exe</exclusive_gpu_app> <exclusive_gpu_app>Bioshock.exe</exclusive_gpu_app> <exclusive_gpu_app>Bioshock2.exe</exclusive_gpu_app> <exclusive_gpu_app>MOHDW.exe</exclusive_gpu_app> <exclusive_gpu_app>HitmanBloodMoney.exe</exclusive_gpu_app> <exclusive_gpu_app>Fallout3.exe</exclusive_gpu_app> <exclusive_gpu_app>HitmanContracts.exe</exclusive_gpu_app> <exclusive_gpu_app>hitman2.exe</exclusive_gpu_app> <exclusive_gpu_app>S2DNG.exe</exclusive_gpu_app> <exclusive_gpu_app>S2DNGEditor.exe</exclusive_gpu_app> <exclusive_gpu_app>HMA.exe</exclusive_gpu_app> </options> </cc_config> The above is what's in MY cc_config.xml For some of the games all of BOINC will suspend, for others I can continue to use my CPUs, but want my GPU to stop processing. |
Send message Joined: 29 Aug 05 Posts: 15581 |
I did forward your request to the developers, who answered this back: Charlie Fenton wrote: you wrote:So, I propose to add an option to suspend GPU computation if any application is running in fullscreen mode. |
Copyright © 2025 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.