xhost local:boinc

poppageek
poppageek
Joined: 13 Aug 10
Posts: 259
Credit: 2473733122
RAC: 0
Topic 198626

While I have a long history of Boinc not wanting to see a GPU I always found a fix. This time it is xhost local:boinc. But only from the command line. I have put it in .profile, .bashrc, /etc/init.d/boinc-client and mdm.conf, it is Linux Mint. I am sure a few other places that is all I remember.

When I boot the machine Boinc will not see the GPUs. It then errors out what was in process unless I remembered to suspend the work before I shut it down. There is the catch. I am not a young man and remember nothing. Due to heat I need to shut it down every day for 10 hours. I turn it on in the evening and loose 8 work units. I run xhost local:boinc from command line and restart Boinc and all is good.

Any other ideas on where to try it? I have search and Googled and am stumped.

Thanks.

Jari Pyyluoma
Jari Pyyluoma
Joined: 27 Feb 05
Posts: 1
Credit: 75771213
RAC: 0

xhost local:boinc

I do not know if the following will work for you.

"To automate the restart of BOINC and to do the xhost thing on boot, add this to /etc/rc.local:"

from this url: http://milkyway.cs.rpi.edu/milkyway/forum_thread.php?id=3245

Good luck!

AgentB
AgentB
Joined: 17 Mar 12
Posts: 915
Credit: 513211304
RAC: 0

RE: Any other ideas on

Quote:
Any other ideas on where to try it? I have search and Googled and am stumped.

Assuming this AMD GPU host?

AMD needs X running in order for boinc to detect the GPU.

Before we go into detail - if you just restart boinc, no xhost commands - does it solve the problem? I'll assume no but please check.

How exactly are you restarting boinc?

xhost 101

Some info about xhost.

I don't know for 100% certain the format for xhost on mint, "man xhost" will tell you - i'm 99.99% certain it is the same as ubuntu and many others - and you are running on that host some fresh mint.

a) xhost with no parameters displays a list of valid hosts or usernames who can connect to the Xserver. With parameters a plus or minus, xhost adds or removes them from the list.
b) you need to be connected to the Xserver (think a service on your host not hardware) if you want to make changes with xhost. Simply put - X needs to be in charge of the session running any xhost changes. Running xhost in a start-up script will usually fail silently (by design) (*)
c) the correct format is (i like the plus (+) - its optional to show "add")

xhost +si:localuser:boinc # (allows localuser boinc to connect without authentication) OR xhost local: #(allows ALL local users to connect without authentication - includes boinc) NOT xhost local:boinc

I don't know where xhost local:boinc came from - perhaps an old version but after i test it

xhost local:                #same as +local:
xhost
xhost -local:
xhost
xhost local:boinc                   
xhost
xhost -local:boinc
xhost
xhost +si:localuser:boinc
xhost
xhost -si:localuser:boinc
xhost

you'll see the effect.

The man page states

Quote:

local contains only one name, the empty string

OK, so the next question is - for "autostart" what do you do to crunch on bootup?

You need to
get X running,
then run xhost
BEFORE boinc does its GPU detection.

GPU detection is a one shot event, so it won't try again later.

I use a fudge really - lightdm is the default display manager on ubuntu (but that is not minty) and it has a "startup" commands (after X is started but before login).

See my post about this here

hth.

(*) this was not always the case - old versions of xhost would allow xhost changes to go anywhere which meant a superuser could connect to your Xserver very easily.

poppageek
poppageek
Joined: 13 Aug 10
Posts: 259
Credit: 2473733122
RAC: 0

Thank you Jari for the link.

Thank you Jari for the link. :-) It did not help though. :-(

AgentB
Yes that is the host.

Yes simply restarting Boinc after boot without the xhost command works.

Already had sleep 6 in /etc/init.d/boinc-client

Startup files are set to 99.

On boot if I just type xhost I get:

poppageek@PG-2x7870 ~ $ xhost
access control enabled, only authorized clients can connect
LOCAL:
SI:localuser:boinc
SI:localuser:poppageek

So at some point that started working but still was not the answer.

I have to manually restart Boinc for it to see the GPUs. Putting the service restart command in rc.local did not work.

Found this repeated 3 times in /var/log/syslog:

Quote:

Jun 1 15:51:41 PG-2x7870 kernel: [ 29.220876] S99boinc-client (1566): /proc/1892/oom_adj is deprecated, please use /proc/1892/oom_score_adj instead.

Thank you very much for suggestions!!

poppageek
poppageek
Joined: 13 Aug 10
Posts: 259
Credit: 2473733122
RAC: 0

The plot

The plot deepens....

Quote:
poppageek@PG-2x7870 /var/lib/boinc-client $ cat stderrgpudetect.txt
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
AgentB
AgentB
Joined: 17 Mar 12
Posts: 915
Credit: 513211304
RAC: 0

RE: Yes simply restarting

Quote:
Yes simply restarting Boinc after boot without the xhost command works.

How exactly are you restarting boinc-client? it needs to be sudo etc.

I'm also assuming you are running boinc from a repo, is it LocutusofBorg or Mint?

Quote:

Already had sleep 6 in /etc/init.d/boinc-client

ok you could increase that to twice that.

Quote:

Startup files are set to 99.

This is not something i recognize as normal on Debian / Ubuntu ... on ubuntu it is here.

/etc/rc2.d/S20boinc-client -> etc/init.d/boinc-client

I'm guessing you changed to S99, it's not likely to make a difference.

Quote:


On boot if I just type xhost I get:

poppageek@PG-2x7870 ~ $ xhost
access control enabled, only authorized clients can connect
LOCAL:
SI:localuser:boinc
SI:localuser:poppageek

So at some point that started working but still was not the answer.

I'm not sure i understand entirely what all the above means, but at some point you may have upgraded your boinc from the repo.

Quote:

I have to manually restart Boinc for it to see the GPUs. Putting the service restart command in rc.local did not work.

You don't need it there (rc.local)

Quote:

Found this repeated 3 times in /var/log/syslog:

Jun 1 15:51:41 PG-2x7870 kernel: [ 29.220876] S99boinc-client (1566): /proc/1892/oom_adj is deprecated, please use /proc/1892/oom_score_adj instead.

hmm the scheduling part of the boinc-client tries to set priorities but for some reason - it it can't find oom_score_adj's

this might be something to do with running in rc.local or some permissions problem. it originates here in the boinc-client script.

for BPID in ${pid} ${children}; do
      if [ -w /proc/${BPID}/oom_score_adj ]; then
        echo ${BOINC_OOM_SCORE_ADJ} > /proc/${BPID}/oom_score_adj 2>/dev/null || true
      fi
      # Fallback to old oom_adj if oom_score_adj doesn't exist
      if [ -w /proc/${BPID}/oom_adj ]; then
        echo ${BOINC_OOM_ADJ} > /proc/${BPID}/oom_adj 2>/dev/null || true
      else
        echo "Could not write to /proc/${BPID}/oom_adj"
      fi
    done

To take this further

* remove from rc.local and any user startup scripts
* set the coproc_debug flag in boincmgr GUI
* restart host and capture the event log, and post the first 20-40 lines.
* Check xhost.
* restart boinc
* post difference

good luck.

poppageek
poppageek
Joined: 13 Aug 10
Posts: 259
Credit: 2473733122
RAC: 0

First boot without restart. I

First boot without restart. I use sudo service boinc-client restart or stop then start.

Quote:
Wed 01 Jun 2016 07:47:56 PM CDT | | Starting BOINC client version 7.6.31 for x86_64-pc-linux-gnu
Wed 01 Jun 2016 07:47:56 PM CDT | | log flags: file_xfer, sched_ops, task, coproc_debug
Wed 01 Jun 2016 07:47:56 PM CDT | | Libraries: libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Wed 01 Jun 2016 07:47:56 PM CDT | | Data directory: /var/lib/boinc-client
Wed 01 Jun 2016 07:47:56 PM CDT | | [coproc] launching child process at /usr/bin/boinc
Wed 01 Jun 2016 07:47:56 PM CDT | | [coproc] relative to directory /var/lib/boinc-client
Wed 01 Jun 2016 07:47:56 PM CDT | | [coproc] with data directory /var/lib/boinc-client
Wed 01 Jun 2016 07:47:59 PM CDT | | [coproc] NVIDIA: libcuda.so: cannot open shared object file: No such file or directory
Wed 01 Jun 2016 07:47:59 PM CDT | | [coproc] calInit() returned 1
Wed 01 Jun 2016 07:47:59 PM CDT | | [coproc] Caught SIGSEGV in OpenCL detection
Wed 01 Jun 2016 07:47:59 PM CDT | | No usable GPUs found
Wed 01 Jun 2016 07:47:59 PM CDT | | app version refers to missing GPU type ATI
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Application uses missing ATI GPU
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_07831_132_1
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_07841_304_1
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_07831_124_1
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_07831_252_1
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_07831_250_1
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_007D1_90_2
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_007D1_6_2
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_007C1_44_1
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0128_025A1_20_1
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_007D1_84_2
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Missing coprocessor for task PM0133_007D1_98_2
Wed 01 Jun 2016 07:47:59 PM CDT | | Host name: PG-2x7870
Wed 01 Jun 2016 07:47:59 PM CDT | | Processor: 4 AuthenticAMD AMD Phenom(tm) II X4 810 Processor [Family 16 Model 4 Stepping 2]
Wed 01 Jun 2016 07:47:59 PM CDT | | Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save vmmcall
Wed 01 Jun 2016 07:47:59 PM CDT | | OS: Linux: 3.19.0-32-generic
Wed 01 Jun 2016 07:47:59 PM CDT | | Memory: 3.86 GB physical, 7.45 GB virtual
Wed 01 Jun 2016 07:47:59 PM CDT | | Disk: 284.05 GB total, 262.98 GB free
Wed 01 Jun 2016 07:47:59 PM CDT | | Local time is UTC -5 hours
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | Found app_config.xml
Wed 01 Jun 2016 07:47:59 PM CDT | | Config: GUI RPCs allowed from:
Wed 01 Jun 2016 07:47:59 PM CDT | | 192.168.1.119
Wed 01 Jun 2016 07:47:59 PM CDT | Einstein@Home | URL http://einstein.phys.uwm.edu/; Computer ID 12257465; resource share 100
Wed 01 Jun 2016 07:47:59 PM CDT | | General prefs: from http://www.worldcommunitygrid.org/ (last modified 11-Mar-2016 20:12:22)
Wed 01 Jun 2016 07:47:59 PM CDT | | Host location: none
Wed 01 Jun 2016 07:47:59 PM CDT | | General prefs: using your defaults
Wed 01 Jun 2016 07:47:59 PM CDT | | Reading preferences override file
Wed 01 Jun 2016 07:47:59 PM CDT | | Preferences:
Wed 01 Jun 2016 07:47:59 PM CDT | | max memory usage when active: 1976.13MB
Wed 01 Jun 2016 07:47:59 PM CDT | | max memory usage when idle: 3557.04MB
Wed 01 Jun 2016 07:47:59 PM CDT | | max disk usage: 255.65GB
Wed 01 Jun 2016 07:47:59 PM CDT | | max CPUs used: 3
Wed 01 Jun 2016 07:47:59 PM CDT | | (to change preferences, visit a project web site or select Preferences in the Manager)
Wed 01 Jun 2016 07:47:59 PM CDT | | gui_rpc_auth.cfg is empty - no GUI RPC password protection
Wed 01 Jun 2016 07:47:59 PM CDT | | Suspending computation - user request

After restart:

Quote:
Wed 01 Jun 2016 07:52:34 PM CDT | | Starting BOINC client version 7.6.31 for x86_64-pc-linux-gnu
Wed 01 Jun 2016 07:52:34 PM CDT | | log flags: file_xfer, sched_ops, task, coproc_debug
Wed 01 Jun 2016 07:52:34 PM CDT | | Libraries: libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Wed 01 Jun 2016 07:52:34 PM CDT | | Data directory: /var/lib/boinc-client
Wed 01 Jun 2016 07:52:34 PM CDT | | [coproc] launching child process at /usr/bin/boinc
Wed 01 Jun 2016 07:52:34 PM CDT | | [coproc] relative to directory /var/lib/boinc-client
Wed 01 Jun 2016 07:52:34 PM CDT | | [coproc] with data directory /var/lib/boinc-client
Wed 01 Jun 2016 07:52:36 PM CDT | | OpenCL: AMD/ATI GPU 0: AMD Radeon HD 7800 Series (driver version 1800.11 (VM), device version OpenCL 1.2 AMD-APP (1800.11), 1856MB, 1856MB available, 2688 GFLOPS peak)
Wed 01 Jun 2016 07:52:36 PM CDT | | OpenCL: AMD/ATI GPU 1: Pitcairn (driver version 1800.11 (VM), device version OpenCL 1.2 AMD-APP (1800.11), 2014MB, 2014MB available, 2688 GFLOPS peak)
Wed 01 Jun 2016 07:52:36 PM CDT | | [coproc] NVIDIA: libcuda.so: cannot open shared object file: No such file or directory
Wed 01 Jun 2016 07:52:36 PM CDT | | [coproc] clGetDeviceInfo failed to get CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD for device 0
Wed 01 Jun 2016 07:52:36 PM CDT | | [coproc] Could not match ATI OpenCL and CAL GPUs: ignoring CAL.

Wed 01 Jun 2016 07:52:36 PM CDT | | Host name: PG-2x7870
Wed 01 Jun 2016 07:52:36 PM CDT | | Processor: 4 AuthenticAMD AMD Phenom(tm) II X4 810 Processor [Family 16 Model 4 Stepping 2]
Wed 01 Jun 2016 07:52:36 PM CDT | | Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save vmmcall
Wed 01 Jun 2016 07:52:36 PM CDT | | OS: Linux: 3.19.0-32-generic
Wed 01 Jun 2016 07:52:36 PM CDT | | Memory: 3.86 GB physical, 7.45 GB virtual
Wed 01 Jun 2016 07:52:36 PM CDT | | Disk: 284.05 GB total, 262.95 GB free
Wed 01 Jun 2016 07:52:36 PM CDT | | Local time is UTC -5 hours
Wed 01 Jun 2016 07:52:36 PM CDT | Einstein@Home | Found app_config.xml
Wed 01 Jun 2016 07:52:36 PM CDT | | Config: GUI RPCs allowed from:
Wed 01 Jun 2016 07:52:36 PM CDT | | 192.168.1.119
Wed 01 Jun 2016 07:52:36 PM CDT | Einstein@Home | URL http://einstein.phys.uwm.edu/; Computer ID 12257465; resource share 100
Wed 01 Jun 2016 07:52:36 PM CDT | | General prefs: from http://www.worldcommunitygrid.org/ (last modified 11-Mar-2016 20:12:22)
Wed 01 Jun 2016 07:52:36 PM CDT | | Host location: none
Wed 01 Jun 2016 07:52:36 PM CDT | | General prefs: using your defaults
Wed 01 Jun 2016 07:52:36 PM CDT | | Reading preferences override file
Wed 01 Jun 2016 07:52:36 PM CDT | | Preferences:
Wed 01 Jun 2016 07:52:36 PM CDT | | max memory usage when active: 1976.13MB
Wed 01 Jun 2016 07:52:36 PM CDT | | max memory usage when idle: 3557.04MB
Wed 01 Jun 2016 07:52:36 PM CDT | | max disk usage: 255.65GB
Wed 01 Jun 2016 07:52:36 PM CDT | | max CPUs used: 3
Wed 01 Jun 2016 07:52:36 PM CDT | | (to change preferences, visit a project web site or select Preferences in the Manager)
Wed 01 Jun 2016 07:52:36 PM CDT | | gui_rpc_auth.cfg is empty - no GUI RPC password protection
Wed 01 Jun 2016 07:52:36 PM CDT | | Suspending computation - user request
poppageek
poppageek
Joined: 13 Aug 10
Posts: 259
Credit: 2473733122
RAC: 0

I think I will remove Boinc

I think I will remove Boinc from startup rc.d and just start it manually. It is not a big deal to do it that way and it works fine.

Thanks for all the help. I may reinstall Linux someday and see if it is any better.

Cheers!

AgentB
AgentB
Joined: 17 Mar 12
Posts: 915
Credit: 513211304
RAC: 0

RE: I think I will remove

Quote:
I think I will remove Boinc from startup rc.d and just start it manually. It is not a big deal to do it that way and it works fine.

I have just had a quick look over the logs and they look as i expect.

You mention you were running Mint. I don't know what display manager and greeter you are using, but most of them will have an option to run a command immediately after the login screen (hint X) has started.

If you use MDM then /etc/mdm/mdm.conf should have a place to add the xhost command. LightDM is what i use and i posted the details for that earlier.

It is worthwhile getting the autoboot running if you can especially if you plan on auto-starting unattended - for night crunching for example.

I did solve the stderrgpudetect.txt also i expect you may see matching errors in stdoutgpudetect.txt - but i can't think what the solution was.

I'll post back later if i remember.

poppageek
poppageek
Joined: 13 Aug 10
Posts: 259
Credit: 2473733122
RAC: 0

Thanks again AgentB. The

Thanks again AgentB. The effort you put in helping others here is awesome. :-)

I did have xhost local:boinc in mdm.conf. Made no difference.

I may let cache run dry and reinstall. I may have done something that I have forgotten about that is now causing this. This has been going on for a few weeks and I have tried many things. So who knows.

Thanks again!

AgentB
AgentB
Joined: 17 Mar 12
Posts: 915
Credit: 513211304
RAC: 0

RE: Thanks again AgentB.

Quote:
Thanks again AgentB. The effort you put in helping others here is awesome. :-)


Well we haven't fixed anything yet, so "it's for the win!"

Quote:
I did have xhost local:boinc in mdm.conf. Made no difference.


Where exactly in mdm.conf?

Quote:

I may let cache run dry and reinstall. I may have done something that I have forgotten about that is now causing this. This has been going on for a few weeks and I have tried many things.

I would guess at you had a boinc/fgrlx upgrade. I had the same errors but they stopped March 25, so i know i must have fixed something at that point.

I suspect i was playing around and - ... the last time i edited lightdm.conf was ..... March 25. So the cause of those errors is the

xhost +si:localuser:boinc


not being run in time for boinc.

Some simple things to try... set the start delay to 60 seconds, this will give you enough time to login and type the xhost command, and see if it auto-detects.

If it does, then you need to dig around MDM conf here
maybe

[greeter]
PreFetchProgram=@/usr/bin/xhost +SI:localuser:boinc@

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.