To get the same behavior, I changed my config like that (/etc/fahclient/config.xml) removing "idle" option and adding "pause-on-start" option on slots :
Code: Select all
<!-- Client Control -->
<fold-anon v='true'/>
<!-- Slot Control -->
<power v='FULL'/>
<!-- User Information -->
<passkey v='xxxxx'/>
<team v='xxx'/>
<user v='xxxxxxxxxx'/>
<!-- Folding Slots -->
<slot id='0' type='CPU'>
<pause-on-start v='true'/>
<paused v='true'/>
</slot>
<slot id='1' type='GPU'>
<pause-on-start v='true'/>
<paused v='true'/>
</slot>
Code: Select all
#!/bin/bash
CMD=/usr/bin/FAHClient
SLEEP_INTERVAL_ON=60
SLEEP_INTERVALL_OFF=10
sleep_interval=$SLEEP_INTERVAL_ON
while true; do
if xset -q | grep -q "Monitor is Off"; then
new_state=off
else
new_state=on
fi
if [ "$new_state" != "$old_state" ]; then
old_state="$new_state"
if [ "$new_state" == "on" ]; then
$CMD --send-pause
sleep_interval=$SLEEP_INTERVAL_ON
else
$CMD --send-unpause
sleep_interval=$SLEEP_INTERVAL_OFF
fi
fi
sleep $sleep_interval
done
Code: Select all
chmod +x /home/user/bin/testmonitor
Code: Select all
kcmshell5 autostart
At next session start, the folding will start only when screen is OFF, for instance when you set up DPMS ON on your screen as power saving option.