Bug#721298: boinc-client: Idle Detection Not Working Computer Always In Use

Preston Maness aspensmonster at riseup.net
Wed Dec 16 17:40:06 UTC 2015

Hash: SHA512

Howdy howdy,

I have a pull request with upstream now:


And I've attached a patch against upstream's master as of this morning
(HEAD 1ca5f51cc7c993799f27d99bfa871d57567a30e5).

I'm not an autotools whiz, so I don't know if the changes I made to
configure.ac --mostly pulled from the commit that originally deleted
them, but I added a small flag when building the client so that the
original commit's checks are actually run-- are ideal, or if the
changes made are suitable for an automatic detection of new
dependencies. I'm starting to learn about package management a la
git-buildpackage, but I've got a ways to go.


P.S. - It looks like there's another bug from January 2015 that's
essentially a dupe of this one. Hopefully both can be closed soon :D

On 12/16/2015 01:16 AM, Gianfranco Costamagna wrote:
> Hi if you can give me a patch for the source code and submit a pull
> request upstream (github), I can find with git log the configure.ac
> patches, add the Debian dependencies again and reupload on
> unstable. Thanks G.
> Sent from Yahoo Mail on Android
> On Wed, 16 Dec, 2015 at 0:34, Preston
> Maness<aspensmonster at riseup.net> wrote:   -----BEGIN PGP SIGNED
> MESSAGE----- Hash: SHA512
> An update:
> Re-incorporating the XSS idle-detection code works as expected. I 
> scrapped the DPMS code and only kept the XSS code. Inclusion of
> #include <X11/extensions/scrnsaver.h>
> in "client/hostinfo_unix.cpp" ultimately pulls in a conflicting 
> definition of "Always" between X-related code and boinc's 
> "lib/prefs.h", fixed by renaming boinc's declaration. After this,
> the boinc-client and boincmgr compile and idle detection works as
> expected (keyboard and mouse inputs are appropriately detected, and
> computation is suspended).
> Working on cleaning up the changes, hopefully getting upstream to 
> reinstate the XSS code, and determining how best to get the fix
> into the Debian packages. From what I can tell, an additional
> dependency on "libxss1" would be necessary.
> Cheers, Preston
> On 12/14/2015 07:28 AM, Preston Maness wrote:
>> Whelp, it looks like the X-based idle detection --with the 
>> XScreenSaver API?-- was removed in this commit:
>> ==================
>> bfae1032e5c1ac73f2d8d92f222293d8383a6cee
>> https://github.com/BOINC/boinc/commit/bfae1032e5c1ac73f2d8d92f222293d
> 3a6cee
>> ==================
>> The commit message indicates that /dev/input/* devices are the 
>> intended way to determine idle time on Linux now. However, it 
>> seems that X-based inputs don't update the /dev/input/* devices.
>> Or at least, anything the X server is doing isn't updating the
>> atime on those files, which is what is being utilized to
>> determine if the system is idle or not. Working in a terminal
>> updates the atime on the relevant files --correctly triggering
>> BOINC to suspend computation-- but just typing this email, or
>> wiggling the mouse around the desktop area, doesn't.
>> Granted, this code was present earlier, so I don't know if simply
>>  re-introducing it will solve anything. But that's my first plan
>> of attack. I've also looked into other varying methods of idle 
>> detection. The XSS API is the most common, but there is a more 
>> convoluted (asynchronous?) Xsync option that might also be
>> possible too. I don't know too much about X, but I'll be giving a
>> few different possibilities a go in the coming days.
>> Cheers, Preston
>> On 12/11/2015 09:44 AM, Preston Maness wrote:
>>> Howdy howdy,
>>> I think I deserve a slow clap for such a slow 
>>> response/addresssing of a bug. Indeed my response is so slow
>>> that I've since changed email address and GPG keys.
>>> Needless to say, when running BOINC 7.6.12 from testing, some 
>>> progress seems to have been made on idle detection. If I open a
>>>  terminal and begin working in it, *sometimes*, the idle
>>> detection kicks in. I can't tell whether it's working as
>>> intended or not. Regardless, keeping boinc running non-stop
>>> doesn't pose any issues thanks to the scheduling. I can happily
>>> use my machine for just about anything and not even notice that
>>> BOINC is running.
>>> I'm presently unemployed, so really, I have nothing but time
>>> and no real excuses not to give this bug another go and see if
>>> I can just determine once and for all if things are fixed/how
>>> to fix them :P
>>> It looks like the BOINC project has moved from their own git 
>>> infrastructure onto github:
>>> https://boinc.berkeley.edu/trac/wiki/SourceCodeGit
>>> https://github.com/BOINC/boinc
>>> Looking at the git log for hostinfo_unix.cpp (a la "git log 
>>> client/hostinfo_unix.cpp" from the project root), it looks like
>>>  there was a commit that included changes from Gianfranco:
>>> ==================
>>> commit 0811886cbb1d282376e2dfd017ab39e34cd7d8ea Author: David 
>>> Anderson <davea at ssl.berkeley.edu> Date:  Mon Feb 3 12:46:43
>>> 2014 -0800
>>> client: fix for idle detection on Linux (from Gianfranco)
>>> ==================
>>> and some later refactoring of the unix HOSTINFO code:
>>> ==================
>>> commit cda6bd334bf036349f471a0c4eb7c25de8098262 Author: David 
>>> Anderson <davea at ssl.berkeley.edu> Date:  Tue Nov 25 14:46:58 
>>> 2014 -0800
>>> client: get static host info items only on startup
>>> On Android, the way we were getting os_version (Linux version +
>>>  Android version) didn't work because get_host_info() was
>>> getting called before every scheduler RPC, and it overwrote the
>>> Android version part.
>>> Solution: divide host info into dynamic (disk usage, network 
>>> info) and static (everything else). Computer the static part
>>> only at startup.
>>> Also factor the Unix HOST_INFO code into multiple functions.
>>> ==================
>>> As it stands, BOINC's Event Log does show periodic "Suspending
>>>  computation - computer is in use" messages. Show I'm operating
>>> on the assumption that something is working.
>>> Cheers, Preston Maness
> D2RbjefCRb+ojSGCFRtRG8fnLVS88P9Kyj5EfwvQPzQhHIsv2aZCfvl3JkPz49A0 
> khjaKr7DxgM2DtCxkTbq6HNeYtyr2YQounyZdhEOn/vYp4SmeOVxgC/2j31WYY95 
> 3XsMZ6Pe1SpCmhab5jyRBlVUKVTUT2Ekbq7buvMHkEvLSryM3ax32K3PXC8gNbFL 
> YuVvPYkiQZUlpFrPRqjjoJTBO/MziTYSWw1U9dIXurD0jB8sBitWH7JLkSAmyAjh 
> dusx6rKFSR1XmPv0P+4D9qaKsy4lES4erxp2FUcPaX5L+D5fw7qAkTrgH+Vmbz+E 
> fCtgTiZz91KqpImlYyMjuzKPqpfMl2+O4qBoHTrXoasvFR0z8toP/gLIMibEb+OA 
> aD4MZO5IOQ+Orc1qPO+G9p6agDVmQePGk6S7jED3u/iklUI+865xYjbkAyiq4iwp 
> xVplNgaufJHD0dzRghB3IqSGI1EqEBXKQsBuJeShf2b8FdreVBwmgEWhL2uekhMv 
> 187UBr6j9ERgjWSbY6QLbXb6y4+qjpINmMfAMkMjplDyB8ozUiYf6QvRjMZdBqUG 
> dYDq8Bt26M4u1MlMUbYQbZB1A9jn1pHC0CF13l2up8GmeRQzj+1emPKpK18H/5bl 
> BfkujLktRP+FinR3iDV8 =AW/A -----END PGP SIGNATURE-----


-------------- next part --------------
A non-text attachment was scrubbed...
Name: reinstate_xss_idle_detection_linux.patch
Type: text/x-patch
Size: 6337 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-boinc-devel/attachments/20151216/e27730cf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reinstate_xss_idle_detection_linux.patch.sig
Type: application/pgp-signature
Size: 543 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-boinc-devel/attachments/20151216/e27730cf/attachment.sig>

More information about the pkg-boinc-devel mailing list