Debian/Ubuntu/Mint/Derivatives - GPU recognition fixes

Message boards : GPUs : Debian/Ubuntu/Mint/Derivatives - GPU recognition fixes
Message board moderation

To post messages, you must log in.

AuthorMessage
Skip Da Shu
Avatar

Send message
Joined: 18 Mar 08
Posts: 38
United States
Message 36496 - Posted: 21 Jan 2011, 3:14:14 UTC
Last modified: 21 Jan 2011, 4:10:14 UTC

First off - IF you are running BOINC under Linux as it's installed from the Berkeley site (executed out of /home/user/BOINC/) then little if any of this will apply.

IF you are running BOINC as Debian (Ubuntu, Mint, Archlinux, other derivatives) installs it (executed out of /var/lib/boinc-client) then this should apply.


Preface, My environment:

1.All of the machines I've got a GPUs in that are doing BOINC crunching are now running Ubuntu 64b OS. I've got the versions down to a narrow range from v9.04 thru v10.04 (soon to add v10.10).
2.All of the machines are running BOINC v6.10.58 installed via Synaptic Package manager and have the BOINC-DEVs PPA repository installed along with 'Backports' as the source for this version.
3.I am using a couple of different proprietary drivers. All were originally downloaded and installed manually.
(a)Starting with (I believe) Ubuntu v10.10 the Nvidia drivers in Synaptic are probably current enough to use them but this depends on the project.
4.My Nvidia drivers are currently all v195.36.15 and except one which is v260.19.20.
5.My ATI drivers are v10.8, v10.9 and v10.10 as of now.


Optional Install of 'Backports' and the BOINC-DEV's PPA repository (recommended):

1.From the top Ubuntu menu: System → Administration → Synaptic Package Manager
2.From the top Synaptic menu: Settings → Repositories
3.Go to the tab labeled “Updates” and enable Unsupported updates (Karmic/Lucid backports).
4.Go to the tab labeled “Other Software” and click the “Add” button at the bottom of this panel.
5.Paste the appropriate line from below into the “apt line:” box that is presented
6.For v9.10 use → deb http://ppa.launchpad.net/pkg-boinc/ppa/ubuntu karmic main
7.For v10.04 use → deb http://ppa.launchpad.net/pkg-boinc/ppa/ubuntu lucid main
8.For others substitute in the appropriate release name (Maverick?).
9.Doing it this way you'll get the appropriate security key installed automajically.



Issues & Solutions:

ISSUE #1: BOINC starts before GDM can finish getting up and running. This makes the BOINC think the video card is absent. This can occur with both ATI and Nvidia cards but I first found it on Nvidia card equipped machines. If your GPU is recognized after you restart BOINC but doesn't find the card right after a reboot this is likely your problem. This can be a bit sporadic on some machines where it'll find it after one reboot but not another. If this is the only problem it'll find it every time after a restart of just BOINC.
sudo /etc/init.d/boinc-client restart

See history here: https://bugs.launchpad.net/ubuntu/+source/boinc/+bug/414244

FIX #1: My fix was to add a delay into the start-up script so that GDM/X has a chance to have drivers fully loaded. This solution inserts a 6 second delay in the boinc start-up script which allows ample time for the driver to be available on all machines tested to date.
(a)Edit the start-up script file /etc/init.d/boinc-client with sudo gedit /etc/init.d/boinc-client.
(b)Find this function code and add the line “sleep 6” where it's shown here:
start()
{
  log_begin_msg "Starting $DESC: $NAME"
  if is_running; then
    log_progress_msg "already running"
  else
    sleep 6
    start-stop-daemon --start --quiet --background --pidfile $PIDFILE \
      --make-pidfile --user $BOINC_USER --chuid $BOINC_USER \
      --chdir $BOINC_DIR --exec $BOINC_CLIENT -- $BOINC_OPTS
  fi
  log_end_msg 0

  if [ "$SCHEDULE" = "1" ]; then
    schedule
  fi
}


FIX #2: Modify the start-up sequence of the /etc/init.d/boinc-client script.
(a)I got this from gfarmerfr an ATI/Ubuntu user on the DNETC forums after telling him how I was putting the delay in. I haven't actually tried it. It worked for gfarmerfr and he knows what he's doing. I believe this was tested on v9.10. In many ways this is a better fix but I was already into the script for other reasons (adding fan speed control) so I stuck with my sleep 6 version.
(b)Execute the following two commands to move BOINC start-up to the end of start-up processing:
sudo update-rc.d -f boinc-client remove
sudo update-rc.d boinc-client defaults 99




ISSUE #2 (ATI Only): ATI Driver / X-session can not be accessed by user “boinc” results in GPU not found with Hdxxxx series cards (this may have started with v10.04 of Ubuntu).

See history here: https://bugs.launchpad.net/ubuntu/+source/boinc/+bug/587426


FIX #1 (recommended one):
(a)Do not apply this fix without first having applied one of the delay BOINC fixes above.
(b)By default the user “boinc” does not have access to the x-session and therefore the ATI driver that is installed (Proprietary v10.x driver from AMD site).
(c)After multiple attempts at fixing this, the following line added right after the sleep 6 (see issue #1) will give you a work around solution. A permanent fix will require changes in the ATI drivers.
xhost local:boinc &> /dev/null

(d)This will allow user “boinc” access to the x-session and therefore the ATI drivers.
(e)You will have to restart boinc after you've logged in from a cold start or reboot with:
sudo /etc/init.d/boinc-client restart

(f)You will have to leave the machine logged on.
(g)The credit for this fix really goes to gfarmerfr


FIX #2 (the first one I tried & tested):
(a)Edit the file /etc/default/boinc-client with sudo gedit /etc/default/boinc-client.
(b)Change the line
BOINC_USER="boinc"
to be
BOINC_USER=”root”
.
(c)This has some security risks that would not normally be tolerated on a linux system because BOINC will now be running with root privileges and a malicious task could destroy your system.
(d)I'm not sure of this (bad memory installed in the unit writing this) but I believe you will still have to restart BOINC as in steps f and g above.


FIX #3 (I don't think I ever tested this one but it should work and has been reported as such):
(a)Same as FIX #2 but instead of running BOINC as root set it to run as your user id.
(b)So (see (b) above) change it to
BOINC_USER=”skip”
instead (obviously, I hope, use your user id here not mine).
(c)Change the directory /var/lib/boinc-client and everything under it to be owned by your user id. See man chown. This should be something like:
sudo chown -R skip: /etc/var/lib/boinc-client.


ISSUE #2, FIX #1 addendum:
(a)One person reported that this will get rid of the need for a restart and to remain logged in but it didn't work for me.
(b)It did buy me one thing. A GPU WU that was in progress when a machine was restarted will start up again after the restart and seems to finish OK. I say “seems to” because I only tested this on one project. However another new GPU WU didn't start up for me, instead the application reported errors finding threads and/or devices for the WU (two different projects did this). There are some security issues around this. However here's all it is if you want to give it a try.
(c)Create or Modify /etc/gdm/custom-conf with sudo gedit /etc/gdm/custom-conf adding the following lines:
# to allow user "boinc" to connect prior to log on
[xdmcp]
Enable=true

(d)Modify /etc/init.d/boinc-client to include an additional line AFTER the sleep 9 from issue #1, fix #1 and BEFORE the
issue #2, fix #1 xhost local:boinc line so your start-up script now has the following in it:
 else
    sleep 9
    export DISPLAY=:0.0 
    xhost local:boinc &> /dev/null
    start-stop-daemon --start --quiet --background --pidfile $PIDFILE \
      --make-pidfile --user $BOINC_USER --chuid $BOINC_USER \
      --chdir $BOINC_DIR --exec $BOINC_CLIENT -- $BOINC_OPTS


Also cross-posted to: http://dcteam.guru-mountain.com/dcteam/forums/viewtopic.php?f=14&t=45.
- da shu @ HeliOS,
"A child's exposure to technology should never be predicated on an ability to afford it."
ID: 36496 · Report as offensive
Skip Da Shu
Avatar

Send message
Joined: 18 Mar 08
Posts: 38
United States
Message 37154 - Posted: 12 Mar 2011, 5:37:12 UTC
Last modified: 12 Mar 2011, 5:43:49 UTC

I see I have used sleep 6 and sleep 9 in different examples.

Sleep 6 is sufficient for nearly any machine that has a processor faster than an Intel P4 2.5GHz or a AMD XP2500+ unless you have an extremly large number of things starting up at boot. For those older machines try using sleep 9 instead of sleep 6.
ID: 37154 · Report as offensive
Skip Da Shu
Avatar

Send message
Joined: 18 Mar 08
Posts: 38
United States
Message 37155 - Posted: 12 Mar 2011, 5:43:05 UTC
Last modified: 12 Mar 2011, 5:46:26 UTC

Fixes personally confirmed to work on Ubuntu, Xubuntu, Mint, PinguyOS versions based on 9.xx and 10.xx. Also reported to work on Archlinux and Debian.

I've not been able to get GPU card crunching working onthe current #! (Crunchbang) yet. If anyone has GPU card working on #! please let me know as I'd really like to try this distro on my dedicated crunchers.

Thanx, Skip
ID: 37155 · Report as offensive
smoe

Send message
Joined: 20 Jul 09
Posts: 6
Germany
Message 37506 - Posted: 16 Apr 2011, 18:52:56 UTC

Hi Skip,

I admit to be a bit clueless about the GPU start process but I completely agree that BOINC could be the very last thing to start since it has no reverse dependencies and should not have any IMHO.

Concerning your issue #1, I educated myself more on
http://wiki.debian.org/LSBInitScripts
and will have the next upload depend on $all to determine the boot sequence. This shall have the very same effect as setting it to 99 as you suggested.

For issue #2 I have followed the advice on
https://bugs.launchpad.net/ubuntu/+source/boinc/+bug/587426
and with your initial posting as I just saw to add "xhost local:boinc" to the start routine.

This "xhost" is a bit like a raise from the dead for me. I had not used it since the advent of "ssh -X". For the time speaking, I do not see any surprising security concerns with this. We need to trust those remote applications anyway. We'll see what the community thinks about it.

So, thank you for keeping up the spirit(s) to address this nastiness. Now we only need a way to perform the initialisation of CUDA and friends without an installation of X at all.

Best,

Steffen
ID: 37506 · Report as offensive
Skip Da Shu
Avatar

Send message
Joined: 18 Mar 08
Posts: 38
United States
Message 37510 - Posted: 17 Apr 2011, 15:57:52 UTC
Last modified: 17 Apr 2011, 16:30:32 UTC

Some excellent news from Steffen(Devian boinc dev)!

From above post and also in in the boinc dev mailing list.


Hello, Skip had sent me a pointer to his summary on the BOINC forums on
the matter and I have followed your all's instructions. So, when
6.12.23+ comes out, this should also auto-detect your graphics card.
Many thanks to you all.

Steffen

- da shu @ HeliOS,
"A child's exposure to technology should never be predicated on an ability to afford it."
ID: 37510 · Report as offensive
Skip Da Shu
Avatar

Send message
Joined: 18 Mar 08
Posts: 38
United States
Message 37512 - Posted: 17 Apr 2011, 17:13:33 UTC - in response to Message 37506.  


So, thank you for keeping up the spirit(s) to address this nastiness.

No Steffen... thank YOU for being a major part of the Debian BOINC support team!

Now we only need a way to perform the initialisation of CUDA and friends without an installation of X at all.

To use my favorite saying... 'Unencumbered by any actual knowledge'...
I was under the impression that starting up of the drivers w/o X would require a not-minor change in the proprietary drivers from ATI & Nvidia.

Do you think there is any other way around this... theoretically anyway?

- da shu @ HeliOS,
"A child's exposure to technology should never be predicated on an ability to afford it."
ID: 37512 · Report as offensive
Ross Mendrik

Send message
Joined: 29 Jun 08
Posts: 4
Australia
Message 37657 - Posted: 1 May 2011, 13:25:03 UTC

Has anyone successfully run 6.12.26 -"boinc_6.12.26_x86_64-pc-linux-gnu.sh"
I have been following this thread and was happy to see the above so I could get my 5850 running on Ubuntu 64.(10.04LTS) However the boinc version above just makes the computer freeze between grub and the login. I have gone back to 6.10.58 At least that doesn't crash even tho I still dont have the ATI GPU recognised in boinc.
----------------------------------------------

Ross > Perth > Australia
ID: 37657 · Report as offensive
Kate

Send message
Joined: 7 May 11
Posts: 1
Message 37706 - Posted: 7 May 2011, 12:58:15 UTC

Thank you for this very helpful thread! Just wanted to report that your first two additions to the boinc-client script (the "sleep" line and the "xhost" line) have enabled BOINC to see the GPU on my system with the following specs:

AMD E350 APU (Fusion CPU/GPU chip)
Ubuntu 11.04
AMD driver 11.4
BOINC 6.10.59
ID: 37706 · Report as offensive
aebi

Send message
Joined: 1 Jul 11
Posts: 3
Italy
Message 38744 - Posted: 1 Jul 2011, 13:21:26 UTC - in response to Message 36496.  

First off - IF you are running BOINC under Linux ...


I'm a newby in ubuntu (2 days) and I'm not so good in english but I'm not a newby in Boinc.
First aff all thank you for your help I've sovled my problem with the "sleep" line and the "xhost" line and sorry for my terible english.
One thing is not clear for me ... if I restart the session the isn't recognized ... I've to give the command sudo /etc/init.d/boinc-client restart every time I start an Ubunt session?
ID: 38744 · Report as offensive
Skip Da Shu
Avatar

Send message
Joined: 18 Mar 08
Posts: 38
United States
Message 38820 - Posted: 7 Jul 2011, 13:55:48 UTC - in response to Message 38744.  
Last modified: 7 Jul 2011, 13:57:45 UTC

First off - IF you are running BOINC under Linux ...


I'm a newby in ubuntu (2 days) and I'm not so good in english but I'm not a newby in Boinc.
First aff all thank you for your help I've sovled my problem with the "sleep" line and the "xhost" line and sorry for my terible english.
One thing is not clear for me ... if I restart the session the isn't recognized ... I've to give the command sudo /etc/init.d/boinc-client restart every time I start an Ubunt session?


Yes, unfortunately at this point in time, if you logoff and log back in you must restart BOINC (ATI cards only). You will need to leave the user logged in/on.

PS: Your English is WAY better than my Italian(none) or Spanish(little, Tex-Mex).
- da shu @ HeliOS,
"A child's exposure to technology should never be predicated on an ability to afford it."
ID: 38820 · Report as offensive
Skip Da Shu
Avatar

Send message
Joined: 18 Mar 08
Posts: 38
United States
Message 38821 - Posted: 7 Jul 2011, 14:18:11 UTC
Last modified: 7 Jul 2011, 14:23:27 UTC

UPDATE: Desktop converted to PinguyOS (Ubuntu/Mint derivative), "server" remains Xubuntu v10.04, others all converted to #! (crunchbang) linux (Debian derivative). Above all seems to still apply. In one quick attempt in one #! machine I couldn't get dual ATI cards running and now don't have my ATI cards doing BOINC for the time being. Dual Nvidia cards worked.
ID: 38821 · Report as offensive
aebi

Send message
Joined: 1 Jul 11
Posts: 3
Italy
Message 38836 - Posted: 8 Jul 2011, 10:45:14 UTC - in response to Message 38820.  



Yes, unfortunately at this point in time, if you logoff and log back in you must restart BOINC (ATI cards only). You will need to leave the user logged in/on.

PS: Your English is WAY better than my Italian(none) or Spanish(little, Tex-Mex).

Thank you very much! or ... si prefieres muchas gracias ;-)
ID: 38836 · Report as offensive
javier

Send message
Joined: 12 Jan 10
Posts: 25
Spain
Message 44582 - Posted: 21 Jun 2012, 13:42:50 UTC

hello again,

im having this problem, but the other way roud :)

BOINC detects my GPU (nVidia GT 220) but its unable to use it.

Currently i have SETI@home CPU tasks disabled, and only GPU tasks enabled, and i cant process any GPU WU.

Im currently running boinc 7.0.24 from official repo, under Ubuntu 12.04

any idea?
ID: 44582 · Report as offensive
Skip Da Shu
Avatar

Send message
Joined: 18 Mar 08
Posts: 38
United States
Message 44597 - Posted: 22 Jun 2012, 4:06:20 UTC - in response to Message 44582.  

hello again,

im having this problem, but the other way roud :)

BOINC detects my GPU (nVidia GT 220) but its unable to use it.

Currently i have SETI@home CPU tasks disabled, and only GPU tasks enabled, and i cant process any GPU WU.

Im currently running boinc 7.0.24 from official repo, under Ubuntu 12.04

any idea?


Something to at least look at in /etc/boinc-client/cc_config.xml:

--><cc_config>
<options>
<use_all_gpus>1</use_all_gpus>
<ignore_cuda_dev>0</ignore_cuda_dev>
<max_file_xfers>8</max_file_xfers>
<max_file_xfers_per_project>5</max_file_xfers_per_project>
</options>

- da shu @ HeliOS,
"A child's exposure to technology should never be predicated on an ability to afford it."
ID: 44597 · Report as offensive
javier

Send message
Joined: 12 Jan 10
Posts: 25
Spain
Message 44629 - Posted: 26 Jun 2012, 13:03:13 UTC - in response to Message 44597.  

Hello,

This is my /etc/boinc-client/cc_config.xml content:

elhoir@elhoir-desktop:/etc/boinc-client$ cat cc_config.xml
<!--
This is a minimal configuration file cc_config.xml of the BOINC core client.
For a complete list of all available options and logging flags and their
meaning see: http://boinc.berkeley.edu/trac/wiki/ClientMessages
-->
<cc_config>
<log_flags>
<task>1</task>
<file_xfer>1</file_xfer>
<sched_ops>1</sched_ops>
</log_flags>
</cc_config>
elhoir@elhoir-desktop:/etc/boinc-client$

I have tried to insert the lines you previously asked me to add, andi had to reinstall BOINC :D
ID: 44629 · Report as offensive
Profile Gundolf Jahn

Send message
Joined: 20 Dec 07
Posts: 1069
Germany
Message 44630 - Posted: 26 Jun 2012, 17:18:08 UTC - in response to Message 44629.  

I have tried to insert the lines you previously asked me to add, and I had to reinstall BOINC

Please elaborate.

Gruß,
Gundolf
ID: 44630 · Report as offensive
skgiven
Avatar

Send message
Joined: 19 Aug 08
Posts: 87
United Kingdom
Message 49304 - Posted: 25 May 2013, 8:05:00 UTC - in response to Message 36496.  
Last modified: 25 May 2013, 8:08:44 UTC

FIX #2: Modify the start-up sequence of the /etc/init.d/boinc-client script.
(a)I got this from gfarmerfr an ATI/Ubuntu user on the DNETC forums after telling him how I was putting the delay in. I haven't actually tried it. It worked for gfarmerfr and he knows what he's doing. I believe this was tested on v9.10. In many ways this is a better fix but I was already into the script for other reasons (adding fan speed control) so I stuck with my sleep 6 version.
(b)Execute the following two commands to move BOINC start-up to the end of start-up processing:
sudo update-rc.d -f boinc-client remove
sudo update-rc.d boinc-client defaults 99

This fix worked for me with Ubuntu 13.04, Boinc 7.0.27 (x64) - Used as root wasn't owner in fix1.

I'm also using an NVidia GTX650TiBoost with 304.88 drivers (released 3weeks before the GPU).
ID: 49304 · Report as offensive
Claggy

Send message
Joined: 23 Apr 07
Posts: 1112
United Kingdom
Message 50673 - Posted: 29 Sep 2013, 20:42:07 UTC

There's another GPU recognition fix in this thread:

No usable GPUs found. AMD Radeon HD6750

Claggy
ID: 50673 · Report as offensive
Paul

Send message
Joined: 8 Dec 13
Posts: 51
United States
Message 51669 - Posted: 8 Dec 2013, 2:54:21 UTC

Yes, many thanks to Skip.

Regarding XAUTH, I wonder why the boinc-client service cannot be "properly" authenticated to the X server, i.e. w/ magic cookie. Can you just set XAUTHORITY environment for the client to your cookie file and give it read perms?

Of course, I don't understand why there isn't just a separate channel for number crunching work that doesn't require X. Maybe this is just an old problem, for CAL & CUDA only, and OpenCL is different? My nVidia system doesn't run as a service, but detects as both opencl and CUDA resource, so maybe that's why nVidia doesn't have problems as a service?
ID: 51669 · Report as offensive
Carlesa25

Send message
Joined: 24 Apr 14
Posts: 7
Spain
Message 57471 - Posted: 8 Nov 2014, 18:57:59 UTC - in response to Message 51669.  

Hi, The issue is a bit long, but simplifying ...

For NVIDIA GPUs BOINC recognizes the need to first install the "nvidia-modprobe" utility.

If someone wants to be broad theme, I will be happy. Greetings.
ID: 57471 · Report as offensive

Message boards : GPUs : Debian/Ubuntu/Mint/Derivatives - GPU recognition fixes

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.