Bitcoin/Litecoin mining config Ubuntu 10.04 / Single Sapphire ATI Radeon 5770

Completely obsolete as of 2015... or even 2014 really.

This page is a semi-organized collection of my notes on setting up background bitcoin miner on an old'ish desktop computer. By background I mean I can have it running and still watch 1080p video fullscreen with dual monitors and have no desktop lag. This is not about achieving absolutely max performance for a dedicated GPU miner.

Using AMD APP SDK 2.8 and the Catalyst 13.1 drivers

# Resources
http://wiki.cchtml.com/index.php/Ubuntu_Lucid_Installation_Guide
http://wiki.cchtml.com/index.php/Troubleshooting#February_15.2C_2013_-_Catalyst_13.1_Install_on_Ubuntu_10.04_.28lucid.29
http://parallelplusplus.blogspot.ca/2013/01/problems-with-amd-catalyst-131-on-ubuntu.html
http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx?type=2.4.1&product=2.4.1.3.42&lang=English
# Download the driver somewhere
$ cd ~/app_installs/AMD/13
# Remove existing drivers.
$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx
# Restart the computer.
# Extract the files from the AMD installer
$ sh amd-driver-installer-catalyst-13.1-linux-x86.x86_64.run --extract amd
# Edit the lucid install file
$ gedit amd/packages/Ubuntu/dists/lucid/rules 
# In case of Ubuntu 10.04 the following line had to be appended after line 69:
 SRC_other_arch := x86_64
# and the following line had to be appended after line 151:
  -e "s|#SRCOTHERARCH#|$(SRC_other_arch)|g" \
$ cd amd/
# make sure the links are auto-updated when new gfx drivers are installed
$ sudo update-alternatives --auto gl_conf
# Build the .deb package
$ sudo ./ati-installer.sh 9.012 --buildpkg Ubuntu/lucid
$ cd ..
# Install it. This'll soft link the opencl registration and update gl_conf
$ sudo dpkg -i fglrx*.deb
$ sudo aticonfig --initial -f
# Restart the computer.

# If this error happens to you...
$ sudo /usr/lib/fglrx/bin/aticonfig
Unable to open /etc/ati/control, please reinstall the driver.
/usr/lib/fglrx/bin/aticonfig: No supported adapters detected
# Then you need to set,
$ sudo update-alternatives --auto gl_conf
# And then uninstall everything,
$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx
# Restart, and do it over. It'll work this time.
Using cgminer on Ubuntu 10.04 (lucid) w/AMD APP SDK2.8 and Catalyst 13.1
## Using Catalyst 13 and AMD APP SDK 2.8
# Download the AMD APP SDK 2.8. Extract the tar. You end up with a folder,
./AMD-APP-SDK-v2.8-RC-lnx64
# Copy this folder to /opt/ , or wherever you want it.
$ sudo cp -R AMD-APP-SDK-v2.8-RC-lnx64/ /opt/
# download cgminer
$ cd ~/app_installs/litecoin/cgminer/cgminer-2.11.4
# Download the AMD ADL SDK and upack it. I put it in, 
/opt/ADL/
#Copy the ADL *.h files to cgminer's dir
$ cp /opt/ADL/include/*.h ADL_SDK/
# configure it with paths to the libs
$ CFLAGS="-O3 -Wall -march=native -I/opt/AMD-APP-SDK-v2.8-RC-lnx64/include/" LDFLAGS="-L/opt/AMD-APP-SDK-v2.8-RC-lnx64/lib/x86_64/ -Lpdcurses" ./configure --enable-scrypt
# now compile it
$ make

# Don't try passing a bunch of configuration options the first few runs. Use cgminer optimal defaults.

# Bitcoin 2.5 Work Units per minute with actual 183 MH/s pool reported rate. Low cpu usage.
$ ./cgminer -o stratum+tcp://stratum.bitcoin.cz:3333 -u username.worker -p password --intensity 4

# Litecoin 77Kh/s, 60 WU/m , R:0 HW:0 on old 5770 w/catalyst 13 and AMD APP SDK 2.8 on Ubuntu 10.04
$ ./cgminer --scrypt -o http://newlc.ozco.in:3333 -u username.worker -p password --intensity 10

Using AMD APP SDK 2.4 and Catalyst 13.1

w/cgminer 2.11.4 on Ubuntu 10.04
## Using Catalyst 13 and AMD APP SDK 2.4
# Download the AMD APP SDK 2.4. Extract it.
$ wget http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.4-lnx64.tgz
# You end up with a folder,
./AMD-APP-SDK-v2.4-lnx64/
# Copy this folder to /opt/ , or wherever you want it.
$ sudo cp -R AMD-APP-SDK-v2.4-lnx64/ /opt/
# Download the AMD ADL SDK and upack it. I put it in, 
/opt/ADL/
#Copy the ADL *.h files to cgminer's dir
$ cp /opt/ADL/include/*.h ADL_SDK/
# download cgminer
$ cd /app_installs/litecoin/cgminer/SDK24-2.11.4
# configure it with paths to the libs
$ CFLAGS="-O3 -Wall -march=native -I/opt/AMD-APP-SDK-v2.4-lnx64/include/ -I/opt/ADL/include/" LDFLAGS="-L/opt/AMD-APP-SDK-v2.4-lnx64/lib/x86_64/ -Lpdcurses" ./configure --enable-scrypt
# now compile it
$ make

# Litecoin 77Kh/s, 72 WU/m , R:0 HW:0
$ ./cgminer --scrypt -o http://newlc.ozco.in:3333 -u username.worker -p password --intensity 10

The below section is now outdated. It uses the obsolete ATI Stream SDK 2.1 with Ubuntu lucid repository drivers.

##
## lots copied from the below guide, but updated Sept. 01 2011
## to include new json-rpclib source and information on current
## git sourced poclbm command line examples.
##
## http://foreverrising.wordpress.com/2011/04/16/bitcoin-mining-and-ubuntu-10-10-ati-radeon-5xxx/

# I used the System->Administration->Hardware Drivers, proprietary driver for ATI.
# I did not install my video driver manually.

## Setup the ATI SDK
# download http://developer.amd.com/Downloads/ati-stream-sdk-v2.1-lnx64.tgz to /opt
# it cannot be wget'd, use a browser to click through the EULA, save to /opt
cd /opt
sudo tar xfzv ati-stream-sdk-v2.1-lnx64.tgz

## Setup the ... whatever this is? Registration?
# download http://developer.amd.com/Downloads/icd-registration.tgz to /
# it cannot be wget'd, use a browser to click through the EULA, save to /
sudo tar xfzv icd-registration.tgz
# It'll make /etc/OpenCL/vendors/

## Add the appropriate env variables to the shell. Test.
export LD_LIBRARY_PATH=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:$LD_LIBRARY_PATH
cd /opt/ati-stream-sdk-v2.1-lnx64/samples/opencl/bin/x86_64
./CLInfo |grep CL_DEVICE_TYPE_GPU

## Setup and install pyOpenCl
cd /some/tmp/dir
wget http://pypi.python.org/packages/source/p/pyopencl/pyopencl-0.92.tar.gz
tar zxfv pyopencl-0.92.tar.gz
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
# if you don't have checkinstall to make .debs, then
# sudo apt-get install checkinstall
sudo checkinstall -D --install=no
sudo dpkg -i pyopencl_0.92-1_amd64.deb

## Setup and install json-rpclib
sudo apt-get install g++ libboost-all-dev subversion git-core python-numpy
# not really needed, but it's what I did because I thought I was going to
# compile the svn, but the svn server disapeared mid-July 2011, so I took
# an alternative route.
# the replacement for the svn version
# https://github.com/joshmarshall/jsonrpclib
sudo apt-get install python-setuptools
sudo easy_install jsonrpclib

## Setup and install bitcoin itself
## http://bitcointalk.org/?topic=2623.0
# https://launchpad.net/~stretch/+archive/bitcoin
sudo apt-add-repository ppa:stretch/bitcoin
sudo apt-get update
sudo apt-get install bitcoin
# please note that bitcoin client cpu usage will be high until you've
# downloaded the full block chain for that date. It'll take a couple
# hours at max.

## install poclbm bitcoin miner
# poclbm is faster and uses less cpu than phoenix miner for me.
git clone https://github.com/m0mchil/poclbm.git
# examples of options to run with a bitcoin pool, I never ran it in single mode, but
# I imagine you'd just use localhost instead.
# export the opencl library paths before starting the client
export LD_LIBRARY_PATH=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:$LD_LIBRARY_PATH
# f60, width 128, no desktop lag, 200 MH/s, Fan Speed: 44%, Temp: 73C (idle is 45C)
./poclbm.py -d 1 -v -f60 -w128 user:password@somegetworkserver.com:8332
./poclbm.py -d 1 -v -f60 -w128 1JRGrUdT6wFn1A5r6sW21dJQwtvC742cQv:x@mining.eligius.st:8337
# f60, width 256, no desktop lag, 200 MH/s, etc, etc
./poclbm.py -d 1 -f60 -v -w 256 user:password@btcguild.com:8332
# f10, some desktop lag, fastest, ~ 220 MH/s
./poclbm.py -d 1 -v -f10 -w128 user:password@pit.deepbit.net:8332

# show core temp
aticonfig --od-gettemperature
# shows fan speed
aticonfig --pplib-cmd "get fanspeed 0"
# sets fan speed to 100%
aticonfig --pplib-cmd "set fanspeed 0 100"
# show current clockspeeds
aticonfig --odgc
# overclock core to 900Mhz, memory at 1200Mhz
aticonfig --odsc=900,1200

example phoenix miner command line, desktop lag, high CPU usage, ~170 MH/s
./phoenix.py -u http://user:password@btcguild.com:8332/ -v -k phatk VECTORS BFI_INT FASTLOOP=false WORKSIZE=128 AGGRESSION=5 PLATFORM=0 DEVICE=1
# extreme desktop lag, very high CPU usage, 190 MH/s
./phoenix.py -u http://user:password@btcguild.com:8332/ -v -k phatk VECTORS BFI_INT FASTLOOP=false WORKSIZE=128 AGGRESSION=10 PLATFORM=0 DEVICE=1

Interests

Other

Good Books

Type, "/@say/Your message here." after the end of any URL on my site and hit enter to leave a comment. You can view them here. An example would be, http://superkuh.com/rtlsdr.html/@say/Your message here.

Member of The Internet Defense League

Legal Bullshit

DMCA Requests

Terms of Use:

You may not access or use the site superkuh.com if you are under 90 years of age. If you do not agree then you must leave now.

The US Dept. of Justice has determined that violating a website's terms of service is a felony under CFAA 1030(a)2(c). Under this same law I can declare that you may only use one IP address to access this site; circumvention is a felony. Absurd, isn't it?

It is my policy to regularly delete server logs. I don't log at all for the tor onion service.

bellcop.

search. (via google)

door.