Post
Topic
Board Obsolete (buying)
Re: 50 BTC if you write a complete guide on GPU mining on Ubuntu using ATI
by
Raulo
on 11/02/2011, 18:16:52 UTC
This should be a complete tutorial. Ask if you have some problems, as I might have had a different hardware/software configuration or forgot about a required package. that I installed before.  

------
Make sure all the cards are visible

$ lspci -v

should have a line (lines) with "Display controller: ATI Technologies Inc Device"

Open terminal and write the following command

$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
# the following line added after moa comment later in the thread
$ sudo apt-get update
$ sudo apt-get install fglrx
$ sudo apt-get install fglrx-amdcccle
$ sudo apt-get install fglrx-modaliases

This should install Proprietary ATI Catalyst drivers.

Create xorg.conf by issuing:

$ sudo aticonfig --initial

If you have more than one card, do
$ sudo aticonfig --initial -f --adapter=all

Reboot to load the kernel modules.

The X should run. To check if the correct driver is installed:

$ fglrxinfo

Download ATI SDK from AMD webpage

http://developer.amd.com/gpu/AMDAPPSDK/downloads/pages/AMDAPPSDKDownloadArchive.aspx

2.1 is recommended. For 64-bit systems, it will be

http://developer.amd.com/Downloads/ati-stream-sdk-v2.1-lnx64.tgz

Unpack it to, e.g. /opt

$ cd /opt
$ sudo mv Downloadlocation/ati-stream-sdk-v2.1-lnx64.tgz /opt
$ sudo tar xfzv ati-stream-sdk-v2.1-lnx64.tgz

Download

http://developer.amd.com/Downloads/icd-registration.tgz

and unpack it into root directory.

$ cd /
$ sudo mv Downloadlocation/icd-registration.tgz /
$ tar zxfv icd-registration.tgz

You should have
 /etc/OpenCL/vendors/

with

atiocl32.icd  atiocl64.icd

Add library location  (you may want to add it to your .bashrc) (for 64-bit version)

$ export LD_LIBRARY_PATH=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:$LD_LIBRARY_PATH

And you can test openCL support:

$ cd /opt/ati-stream-sdk-v2.1-lnx64/samples/opencl/bin/x86_64

$ ./CLInfo |grep CL_DEVICE_TYPE_GPU
 
It should lits all your GPUs (in case of 5970s, two for each card).

If only one is shown, issue
$ export DISPLAY=:0

In some cases, you'll need to disable CrossFire for 5970.

$ aticonfig --list-adapters

$ aticonfig --crossfire=off --adapter=all

You may need to restart X and/or repeat aticinfig --initial step

If you have correct  ./CLInfo, you can proceed to installing miners.

Download PyOpenCL
$ wget http://pypi.python.org/packages/source/p/pyopencl/pyopencl-0.92.tar.gz

Unpack

$ tar zxfv pyopencl-0.92.tar.gz

Compile and install

Prerequisites:
$ sudo apt-get install g++  libboost-all-dev subversion git-core python-numpy

$ cd pyopencl-0.92

$ ./configure.py --cl-inc-dir=/opt/ati-stream-sdk-v2.1-lnx64/include/ --cl-lib-dir=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64
$ make
$ sudo make install

Download python-jsonrpc

$ svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc

$ cd python-jsonrpc

$ sudo python setup.py install

Download m0mchil poclbm

$ git clone git://github.com/m0mchil/poclbm poclbm
$ cd poclbm
$ chmod +x poclbm.py

Run ./poclbm.py to see if all devices are detected. If only one GPU is visible (on multi-GPU system), do

$ export DISPLAY=:0

$ ./poclbm.py  -u user --pass=pass -o host -p 8332 -d 1

And the same for other GPUs (-d 2, -d3, etc.)

If it fails during kernel compilation, try:

$ export LD_LIBRARY_PATH=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:$LD_LIBRARY_PATH

You may play with "-v", "-w" and "-f" options. See, poclbm thread

http://bitcointalk.org/index.php?topic=1334.0

Useful utilities:

$ aticonfig --odgt --adapter=all

shows GPU temperature

$ aticonfig --odgc --adapter=all

shows clock and load.

$ aticonfig --pplib-cmd "get fanspeed 0"

shows fan speed

If you have multiple cards, before checking the fan for each one, you need  for first GPU
$ export DISPLAY=:0.0; aticonfig --pplib-cmd "get fanspeed 0"
for second GPU, etc.
$ export DISPLAY=:0.1 ; aticonfig --pplib-cmd "get fanspeed 0"

edit: apt-get update added