Open TunaErtemalp opened 4 years ago
@TunaErtemalp Play around with power settings. I recall minimum (slider left) runs at idle, which is exactly what you’re looking for.
I think IDLE means either a lot of CPU usage, or actual human activity using the mouse/keyboard. Plus, WMC stuff doesn't take a lot of CPU/GPU power, but does "stutter" if some other process is making use of CPU/GPU heavily. So, in either case, FAHClient never really triggers a PAUSE while WMC is in action. I tried IDLE as well as LIGHT choices in FAH, alone and in combination.
I have just put together this script that I called watch_fahclient.cmd and am gonna try put it into my Windows Startup folder. This is my first attempt, not heavily tested yet, so it might have issues. Just throwing it out there for now... Yes, it has the side-effect that currently it'll override any manual PAUSE, and UNPAUSE it in about a minute if WMC is not running in the background. I deemed it to be okay for my purposes. It probably can be fixed by using some file to store whether it was paused because of this script and querying FAHClient's status during checks and apply some logic to not override a manual PAUSE (or manual FOLD during an automatic Pause), but... Meh.
rem un-REM the following if you want to disable this script without taking it out of the Startup folder
rem goto :EOF
REM Make sure this window is minimized to avoid clutter
if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /K "cmd /C ^"%~dpnx0^""
set minimized=
goto :EOF
:minimized
set minimized=
set ProcessListToCheck=EHrec.exe EHshell.exe
REM Script to watch [%ProcessListToCheck%] to pause FAHClient if any one of them is running
REM Wait for 2 minutes for everything to start on boot and between checking for active FAHClient
:FAHClientFound1
timeout /t 120
:redoAll
REM Make sure FAHClient.exe is running
tasklist | findstr /i FAHClient.exe
goto FAHClientFound%ERRORLEVEL%
:FAHClientFound0
set ProcessListHit=
for %%p in (%ProcessListToCheck%) do (
call :checkProcess %%p
)
if "%ProcessListHit%"=="" (
FAHClient --send-unpause
) else (
echo ***** FAHClient paused due to [%ProcessListHit%] running
)
REM Wait for 1 minute between checks
timeout /t 60
goto :redoAll
:checkProcess
REM Is %1 still running?
tasklist | findstr /i %1
goto processFound%ERRORLEVEL%
:processFound0
REM %1 is running: pausing FAHClient.
FAHClient --send-pause
set ProcessListHit=%ProcessListHit% %1
goto :EOF
:processFound1
goto :EOF
See also #1483 for use of Screensaver as idle trigger.
Using the screensaver for THIS issue is neither a solution nor a workaround nor a tool that can be used to implement something acceptable. As I mentioned in #1483 , screensaver is about the USER being idle, not about the PC being idle, let alone being about a process running on a PC, possibly without even making the PC highly used but still competing for resources with FAH to the detriment of each other.
Historically speaking, screensavers have never been about the COMPUTER being idle. They had a few non-performance related goals: 1) Avoid CRT screen burn by a static image being the display for too long while the user/developer wasn't doing anything, 2) Have something pretty on the screens of computers in someone's office to draw ooohs and aaahs when noone was using them, 3) as art, 4) to display the graphics capabilities of certain PCs/OSs while no one was using them, 5) keep the data on screens off the prying eyes when nobody was using the PC, 6) Provide a layer of security with a wake-up password for those users who have the habit of leaving their PCs/offices without locking their computer(s),...
Sadly, none of these are design goals compatible with the idle or exclusionary performance requirements for applications like FAH & BOINC.& GIMPS.
Not a bug, but feature request or enhancement. Originally posted on https://foldingforum.org/viewtopic.php?f=61&t=35227#p333982:
One of my hosts is a Windows Media Center (yes, still running Win7) with a 4-tuner card, recording cable TV. As such, it is only busy when there is recording/viewing, therefore largely idle. I'd like to run FAH on it 100% at FULL, but that ends up affecting the recording quality as well as viewing. Before I converted all my 6 hosts from BOINC to FAH recently, on this machine, I was able to use BOINC's cc_config.xml to define:
So, every time there was an activation of WMC for recording (ehrec.exe in the background) or viewing (ehshell.exe showing the UI), from the WMC PC or from a WMC Extender XBox 360, the BOINC process would get into a PAUSE status for the CPU and GPU, and unpause when those processes went away.
No such functionality exists for FAH, so I will look into writing a script that checks these processes every 60s or so, and try to put FAH into PAUSE/FOLD state accordingly. But, I would gladly throw away that script if/when something like this gets implemented. :)
Thanks for listening Tuna