Setting up a dedicated phoenix miner in Ubuntu :
Powers "ITS NOT MY FAULT GUY" disclaimer.... *** if shit blows up. it isn't my fault. ***
Step 1.)Load a fresh Ubuntu Natty 11.04 64-bit Desktop with the latest updates and log into system with a user that has sudo permissions.
$ sudo apt-get remove nvidia-common
$ sudo apt-get install libqtgui4
Step 2.) Load python and other development tools
$ cd ~
$ sudo apt-get install python-setuptools python-numpy subversion g++ libboost-all-dev
Step 3.) Download and install ATI Driver 11.5 for Linux 64bit.
$ cd ~
$ wget
http://www2.ati.com/drivers/linux/ati-driver-installer-11-5-x86.x86_64.run $ sudo sh ati-driver-installer-11-5-x86.x86_64.run --buildpkg Ubuntu/natty
$ sudo dpkg -i *.deb
$ sudo apt-get -f install
$ sudo aticonfig -f --initial --adapter=all
$ sudo reboot
Step 5.) Verify that the ATI Driver is setup and running
$ cd ~
$ DISPLAY=:0 sudo fglrxinfo
Step 6.) Install python-jsonrpc
$ cd ~
$ svn checkout
http://svn.json-rpc.org/trunk/python-jsonrpc$ cd python-jsonrpc/
$ sudo python setup.py install
Step 7.) Download and install AMD APP SDK 2.4 for Linux 64bit.
$ cd ~
$ wget
http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.4-lnx64.tgz $ tar xvzf AMD-APP-SDK-v2.4-lnx64.tgz
$ echo export AMDAPPSDKROOT=${HOME}/AMD-APP-SDK-v2.4-lnx64/ >> ~/.bashrc
$ echo export AMDAPPSDKSAMPLESROOT=${HOME}/AMD-APP-SDK-v2.4-lnx64/ >> ~/.bashrc
$ echo 'export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86_64:${LD_LIBRARY_PATH}' >> ~/.bashrc
$ source ~/.bashrc
$ cd /
$ sudo tar xfz $AMDAPPSDKROOT/icd-registration.tgz
Step 8.) Download, Compile and Install pyopencl-0.92
$ cd ~
$ wget
http://pypi.python.org/packages/source/p/pyopencl/pyopencl-0.92.tar.gz $ tar xzvf pyopencl-0.92.tar.gz
$ cd pyopencl-0.92
$ ./configure.py --cl-inc-dir=${AMDAPPSDKROOT}include --cl-lib-dir=${AMDAPPSDKROOT}lib/x86_64
$ make
$ sudo make install
Step 9.) Download and Install Phoenix Miner 1.48
$ wget
http://svn3.xp-dev.com/svn/phoenix-miner/files/phoenix-1.48.tar.bz2 $ tar xvf phoenix*.bz2
Step 10.) Verify that OpenCL is setup and running
$ cd ~
$ cd AMD-APP-SDK-v2.4-lnx64/bin/x86_64
$ ./clinfo
At this point you can just navigate to your phoenix folder.
and run:
Step 11.)
$ sudo bash
navigate to your phoenix folder, then
$ ./phoenix.py -u
http://mineruser0:minerpass0@pool.bitclockers.com:8332/ k poclbm DEVICE=0 VECTORS BFI_INT WORKSIZE=128 AGGRESSION=13 &
and if you have othercards:
$ ./phoenix.py -u
http://mineruser1:minerpass1@pool.bitclockers.com:8332/ k poclbm DEVICE=1 VECTORS BFI_INT WORKSIZE=128 AGGRESSION=13 &
$ ./phoenix.py -u
http://mineruser2:minerpass2@pool.bitclockers.com:8332/ k poclbm DEVICE=2 VECTORS BFI_INT WORKSIZE=128 AGGRESSION=13 &
All of the below is optional, and doesn't always. it was a pain to get working for me.
Create a startminer script using code from below. Make sure to substitute the correct home directory path, miner pool server, miner user and miner password.
cd ~
sudo touch /usr/local/bin/startminer.sh
sudo chmod 755 /usr/local/bin/startminer.sh
sudo gedit /usr/local/bin/startminer.sh
# ${1} is used as a variable for the username, password and for the gpu device number. Ex. mineruser0, minerpass0, Device=0 or mineruser1, minerpass1, Device=1
HOMEDIR=/home/user
MINERSERV=btcmine.com:8332
MINERUSER=mineruser@miner${1}
MINERPASS=minerpass${1}
export AMDAPPSDKROOT=${HOMEDIR}/AMD-APP-SDK-v2.4-lnx64/
export AMDAPPSDKSAMPLESROOT=${HOMEDIR}/AMD-APP-SDK-v2.4-lnx64/
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86_64:${LD_LIBRARY_PATH}
#Overclock GPU to 875Mhz
DISPLAY=:0 aticonfig --od-enable --adapter=all
DISPLAY=:0 aticonfig --od-setclocks=875,1000 --adapter=${1}
cd ${HOMEDIR}/phoenix-1.48
echo "Startming Miner: ${1}"
${HOMEDIR}/phoenix-1.48/phoenix.py -u http://${MINERUSER}:${MINERPASS}@${MINERSERV} -k phatk VECTORS BFI_INT AGGRESSION=12 DEVICE=${1}
Setup Headless Bitcoin Mining
*** Warning *** This will stop your computer from booting a graphical desktop and allow only text console or remote ssh access into the mining server.
If you rely on a GUI for administration you may want to rethink this.
sudo apt-get install openssh-server
sudo apt-get install screen
sudo mv /etc/init/gdm.conf /etc/init/gdm.org
sudo gedit /etc/init/startx.conf
description "Start X Server for btc mining"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 30
script
exec /usr/bin/X 2>&1
end script
sudo gedit /etc/init/btcminer_0.conf
description "Start BTC Mining"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 30
script
LOGINUSER=ChangeToMyLoginUser
#Wait 60 seconds to make sure X is started.
sleep 40
exec /usr/bin/screen -dmS gpu0 su -c '/usr/local/bin/startminer.sh 0' ${LOGINUSER}
end script
sudo gedit /etc/init/btcminer_1.conf
description "Start BTC Mining"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 30
script
LOGINUSER=ChangeToMyLoginUser
#Wait 60 seconds to make sure X is started.
sleep 45
exec /usr/bin/screen -dmS gpu1 su -c '/usr/local/bin/startminer.sh 1' ${LOGINUSER}
end script
How to access the miner server
ssh into the mining server as your normal login user.
sudo screen -r gpu0 or sudo screen -r gpu1
To disconnect from screen Control-A + Control-D.
Here's a couple useful tricks for working with your graphics cards:
To display the temperature of your cores:
aticonfig --odgt --adapter=all
To display the clock speeds of your cores:
aticonfig --odgc --adapter=all
To show or set your fan speed:
Shows fan speed
aticonfig --pplib-cmd "get fanspeed 0"
Sets fan speed to 100%
aticonfig --pplib-cmd "set fanspeed 0 100"
If you have multiple cores, you'll need to export a different display variable to access the different cores, like this:
Show fan speed on 2nd card:
export DISPLAY=:0.1; aticonfig --pplib-cmd "get fanspeed 0"
You can change the .1 to .2, .3 etc... for how many cards you have in the system.
To change your clock rates:
Set your core clock to 900MHz and your memory clock to 1000MHz on all cards. Change according to your desire.
aticonfig --od-setclocks=900,1000 --adapter=all
To set for a particular card, change --adapter=all to the adapter number you want to change.
That should take care of just about everything you need to do to mine in a Bitcoin pool.
Any time you add an additional card, don't forget to run:
$ sudo aticonfig --initial -f --adapter=all
$ sudo chmod 644 /etc/X11/xorg.conf
and they will immediately show up
Sources:
http://forum.bitcoin.org/?topic=7514.0and me.