Possible xhost error in boinc-client script

AgentB boinc at u4ear.com
Tue Dec 22 22:53:07 UTC 2015


Hi devs

First a quick thank you to the Debian package maintainers, i could not
use BOINC without the install and run scripts. 

Apologies for the longish email.  I could not find a forum to post in.

We have been discussing a couple of startup issues relating to GPU
recognition over at

http://boinc.berkeley.edu/dev/forum_thread.php?id=10641

There are a couple of problems running OpenCL boinc tasks on startup on
AMD GPUs

I have struggled to get the boinc-client to start in init.d (ubuntu 14.04)
starts boinc (easy) and then (the difficult part) starting OpenCL tasks

The awkward issue seems the xhost to be set correctly.

There is discussion of this issue, here in the past -
    https://bugs.launchpad.net/ubuntu/+source/boinc/+bug/1407452



In the boinc-client startup script around line 109 we see

    if [ -n "$DISPLAY" -a -x /usr/bin/xhost ]; then
       # grant the boinc client to perform GPU computing
       xhost local:boinc || echo -n "xhost error ignored, GPU computing
may not be possible"



a) xhost parameter is wrong - it probably should be

*xhost +SI:localuser:$BOINC_USER*

or less preferred

*xhost +local:*



b) In order for init.d startup, xhost will certainly need DISPLAY to be
set otherwise xhost will not be run - an error will occur.  

Some examples.... in this case i have ssh'd to muon

agentb at muon:~$ export | grep DISPLAY
agentb at muon:~$ xhost                                  #no DISPLAY in
environment - xhost errors
xhost:  unable to open display ""

agentb at muon:~$ export DISPLAY=":0"          #add DISPLAY
agentb at muon:~$ xhost
access control enabled, only authorized clients can connect
SI:localuser:agentb
SI:localuser:gdm
SI:localuser:root

agentb at muon:~$ xhost local:boinc                # line 109
non-network local connections being added to access control list
agentb at muon:~$ xhost                                  # note no boinc
added but LOCAL added.
access control enabled, only authorized clients can connect
LOCAL:
SI:localuser:agentb
SI:localuser:gdm
SI:localuser:root

agentb at muon:~$ xhost -local:                     #remove LOCAL
non-network local connections being removed from access control list

agentb at muon:~$ xhost
access control enabled, only authorized clients can connect
SI:localuser:agentb
SI:localuser:gdm
SI:localuser:root

agentb at muon:~$ xhost +SI:localuser:boinc
localuser:boinc being added to access control list

agentb at muon:~$ xhost                              #shows boinc added.
access control enabled, only authorized clients can connect
SI:localuser:boinc
SI:localuser:agentb
SI:localuser:gdm
SI:localuser:root



c) Minor -  I'm not entirely sure that "echo -n" should be used - 
better a  "log_warning_msg" ?



Sadly I have not quite solved the problem. 

I have tried changed the above lines my /etc/init.d/boinc-client startup to

if [ -n "$DISPLAY" ];  then
    export DISPLAY=":0"
 fi
 if [ -x /usr/bin/xhost ]; then
    # grant the boinc client to perform GPU computing
    xhost +SI:localuser:boinc || log_warning_msg  "xhost error ignored,
GPU computing may not be possible"
 fi

but even so xhost seems to be unwilling to add boinc.

I have also tried adding SI:localuser:boinc to /etc/X0.hosts - i don't
think "localuser" is supported in X0.hosts


However, I have a Ubuntu lightdm workaround, where i modify the
*/etc/lightdm/lightdm.conf* file to add

*[SeatDefaults]
display-setup-script=/usr/bin/xhost +SI:localuser:boinc*

This does work, but it's a hack.

Hope this helps, or if you can give me some ideas to test i'll be happy
to do so.


-- 
BR 
Mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-boinc-devel/attachments/20151222/048e230f/attachment-0001.html>


More information about the pkg-boinc-devel mailing list