GPU starts up while computer is in use

Message boards : Questions and problems : GPU starts up while computer is in use
Message board moderation

To post messages, you must log in.

AuthorMessage
David Schwartz

Send message
Joined: 17 Nov 10
Posts: 11
United States
Message 62448 - Posted: 5 Jun 2015, 21:54:45 UTC
Last modified: 5 Jun 2015, 21:56:07 UTC

Your method for checking for computer usage is somewhat flawed. If I'm watching a movie, for example, my GPU kicks in after awhile and (being integrated and all) the video slows down to about a fourth of a frame per second. There has to be some way for determining if the computer is in use besides relying on activity from a HID. I myself wrote a script that made it so that BOINC only ran when the monitor is off. That would be at least a good option to add, seeing as how 99% of (if not all) computers do turn their monitors off eventually when not in use, but won't do so if a movie is playing in fullscreen. Are there any plans to fix this, or am I going to have to just keep using my script?
ID: 62448 · Report as offensive
Coleslaw
Avatar

Send message
Joined: 23 Feb 12
Posts: 198
United States
Message 62449 - Posted: 5 Jun 2015, 21:58:33 UTC - in response to Message 62448.  
Last modified: 5 Jun 2015, 21:58:42 UTC

There is the exclusive app option. You can also change your preferences so that BOINC waits say 2 hours of idle time before kicking in. And of course if the show/movie is short, right clicking on the icon in the task bar and selecting Snooze typically gives you an hour.
ID: 62449 · Report as offensive
David Schwartz

Send message
Joined: 17 Nov 10
Posts: 11
United States
Message 62450 - Posted: 5 Jun 2015, 22:04:10 UTC - in response to Message 62449.  

Right, the delay is a decent workaround, but again, it would be ideal to be able to tell BOINC directly that I don't want it running when the monitor is on. I have the monitor set to turn off at about 15 minutes normally. That's a lot of potential computation lost if I set it to have a delay that lasts the duration of a movie. The best solution is to implement what I suggested: resume when monitor goes dark. I have no problem with continuing to use my script though, if that's what I have to do to get BOINC to act appropriately.
ID: 62450 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 62451 - Posted: 5 Jun 2015, 22:25:08 UTC - in response to Message 62450.  
Last modified: 5 Jun 2015, 22:57:09 UTC

The problem with that is that not everyone has got a monitor attached to the system they run BOINC on, nothing said about the myriad of problems it may give when running BOINC in a virtual machine.

So that's why the developers added the exclusive application option, which you can set for all of BOINC to suspend (<exclusive_app>) or only suspend the GPU but leave CPU tasks running (<exclusive_gpu_app>).

In BOINC up to 7.4.42, you can set the CPU applications through Tools->Computing preferences->exclusive application. If you want to use the GPU option here, you have to hand-edit the cc_config.xml file to add the correct lines.

In the upcoming BOINC 7.6, the exclusive application window also has the option to set GPU exclusions through the GUI.

An example of a cc_config.xml file with application exclusions:
<cc_config>
<log_flags>
</log_flags>
<options>
<exclusive_app>notepad.exe</exclusive_app>
<exclusive_app>winamp.exe</exclusive_app>
<exclusive_gpu_app>NFS.exe</exclusive_gpu_app>
<exclusive_gpu_app>eso.exe<exclusive_gpu_app>
</options>
</cc_config>

In the above example, BOINC will completely suspend all work when it detects Notepad and Winamp in memory. It won't continue calculations until these programs have left the memory.
It will suspend calculations done on the GPU when it finds a Need for Speed executable, or the Elder Scrolls Online executable in memory; CPU calculations are allowed to continue.

From my own log:
05/06/2015 21:22:03 | | Suspending computation - an exclusive app is running
05/06/2015 21:22:03 | SETI@home | [cpu_sched] Preempting 09oc12ac.9408.9883.438086664204.12.1_0 (removed from memory)
06/06/2015 00:56:36 | | Resuming computation
06/06/2015 00:56:36 | SETI@home | [task] task_state=EXECUTING for 09oc12ac.9408.9883.438086664204.12.1_0 from start
06/06/2015 00:56:36 | SETI@home | [cpu_sched] Restarting task 09oc12ac.9408.9883.438086664204.12.1_0 using setiathome_v7 version 703 (opencl_ati5_cat132) in slot 0


Multiple lines are allowed. One line per program. No need for the complete path to the program you want to exclude. BOINC scans the memory every 10 seconds for the exclusions, so if one is in memory within 10 seconds BOINC will suspend.
ID: 62451 · Report as offensive
David Schwartz

Send message
Joined: 17 Nov 10
Posts: 11
United States
Message 62452 - Posted: 5 Jun 2015, 23:15:14 UTC - in response to Message 62451.  
Last modified: 5 Jun 2015, 23:36:50 UTC

This won't work in my case. I'm watching movies in Safari (via HTML5, so no plugin, which is run in an external process these days, unlike HTML5), so excluding Safari isn't really really an option, since most of the time I'm doing other things and I don't tend to quit it when I go away from my computer. Plus, I just want to exclude the GPU from running while the monitor is on, not the CPU. The CPU in my computer is powerful enough to handle BOINC and 99% of what I do with my laptop simultaneously (well, I have BOINC set to run at 85% though), so I don't have to worry about it. Having an external monitor isn't relevant, because you could code it to check all monitors if need be. As to the VM thing... Well, certainly if you were running this in a VM, you wouldn't turn the option on. I'm not saying this should be default (since many options in BOINC are not), but it's an obvious enough of a feature to warrant adding it in a future update. Do you have a solution for this common scenario? I suppose I could just post my script if anyone finds this feature useful... But a native solution would be ideal.

Note: I've been using BOINC extensively for the last decade or so. I've delved into the config files numerous times, and I am aware of its capabilities and limitations. Figured I should just get that out of the way.
ID: 62452 · Report as offensive
David Schwartz

Send message
Joined: 17 Nov 10
Posts: 11
United States
Message 62453 - Posted: 6 Jun 2015, 2:00:29 UTC - in response to Message 62452.  
Last modified: 6 Jun 2015, 2:03:27 UTC

I suppose that I'll just keep my script for now. Thanks for responding at least! Hopefully this problem doesn't hurt BOINC adoption too much.
ID: 62453 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 62454 - Posted: 6 Jun 2015, 2:21:31 UTC - in response to Message 62453.  

A) I am not a developer, just a volunteer as everyone else.
B) I am not in America, instead I am in The Netherlands, and it's the middle of the night here (04:04am). You're kind of lucky I am still up, but I will be to bed in a couple of minutes.
C) I suppose what you could do is sign up to Github and in the BOINC section make a new issue, requesting that the developers add it, and include the script in the request.
D) You're the only person thus far who has complained about it and who makes it difficult working out a solution other than just having your way by having your script added.
E) BOINC has been in development since 2002 and in general use since 2004. I think that the 217,694 active volunteers group shows that what you feel is a problem isn't one and that they haven't had any problems adopting BOINC as it is.
ID: 62454 · Report as offensive
David Schwartz

Send message
Joined: 17 Nov 10
Posts: 11
United States
Message 62455 - Posted: 6 Jun 2015, 6:28:46 UTC - in response to Message 62454.  
Last modified: 6 Jun 2015, 6:33:50 UTC

Although your tone is offensive, I will do my best to address your points calmly:

A) That's fine that you're not a developer. I appreciate your attempts to help me nonetheless!

B) I appreciate your assistance, but don't pretend like you're some irreplaceable gem. Please, get some rest. I had no intention of keeping you from your sleep.

C) You suppose correctly, and I may do that, unfortunately though my script is written in a language that isn't even remotely cross-platform. I suppose just as a feature concept it would do the trick though. I'll take this helpful suggestion under advisement. Thanks.

E) It isn't a major issue, but it IS an issue, even if you want to dismiss it. Is the issue that you're not understanding me? If so, I can elaborate. I consider good code to be important to the adoption of any piece of software. If even a minor issue is let slide, often larger issues eventually work their way in. This is an issue for me for logical reasons, so it therefore must be an issue for at least a few others. I don't see how you can come to any other conclusion, if you truly understand my problem.
ID: 62455 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 62456 - Posted: 6 Jun 2015, 8:48:30 UTC
Last modified: 6 Jun 2015, 9:02:57 UTC

There might be an alternative approach which could be helpful.

I run a Windows communications (messaging) program which has this configuration option:

Show me as 'Busy' and block my alerts when I'm running a full-screen program or presentation settings are turned on.

That's basically an automatic 'do not disturb when I'm busy'.

'Full-screen' should cover both films and gaming, and would be a lot more user-friendly than digging around in the system to locate the image name for each separate game or media player - and it should be a better solution for the timing problem too. Allow BOINC to be configured not to run GPU apps precisely when, and for as long as, the GPU is being called upon to perform at full performance as a graphics device. Although it may not have been expressed on the various message boards as a feature request, there's been low-level grumbling for years from people who say "I keep forgetting to re-enable GPU computing (or un-snooze the GPU) when I stop gaming".

MSFullscreenChange

"Fires when an element is displayed in full-screen mode, or when it exits full-screen mode."

That's a starting point: they'll also need a 'get current state', in case BOINC starts on a timer while the film is playing.

Maybe SHQueryUserNotificationState is what we're looking for.
ID: 62456 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 62458 - Posted: 6 Jun 2015, 14:39:59 UTC - in response to Message 62456.  

'Full-screen' should cover both films and gaming

Plenty of games that don't run in full-screen. I have a couple that run in windowed full-screen mode. It looks like full-screen but is in a window that leaves a one or two pixel wide area free around the whole screen. This uses less of the GPU than true full-screen does and is therefore quite liked by gamers and developers alike, because it allows for more fluently gaming at the higher resolutions.
ID: 62458 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 62459 - Posted: 6 Jun 2015, 17:13:12 UTC - in response to Message 62458.  

Maybe the 'rectangle comparison' routine from stackoverflow would work then. More than one way to solve a problem, if the will is there.
ID: 62459 · Report as offensive

Message boards : Questions and problems : GPU starts up while computer is in use

Copyright © 2024 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.