Monday, September 26, 2011

Finally, cgminer install tutorial

I think that cgminer is the most advanced miner to date.  It doesn't push the hardware as far as I would like (it doesn't use 100% of the GPU) but it can manage multiple pool and use the longpoll from the fastest pool, so you will have a better mining uptime with this miner than with the other! I never experienced any "queue empty, miner is idle" with this miner.  Today the bitcoin value is 5$ so you need to get every hash as possible! The little drawback is that I was not yet successfull to make cgminer to use 99% of each gpu.

But, cgminer can set the fan, the clock and even overclock your GPU.  This is very nice!

So let's begin!

1. To manage your gpu fanspeed and clocking, you will need the ADL SDK (AMD Display Library)

2. Install missing softwares
$ sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm libtool

3. get the latest cgminer sourcecode :
$ git clone git:// cgminer

4. enable ADL (control of the inner functions of the gpu like clocking, voltage, fan speed...)
$ mkdir ADL_SDK
$ cd ADL_SDK
$ mv ../ .
$ unzip
$ cp include/* ../cgminer/ADL_SDK

5. Compilation
$ cd cgminer

$ ./
$ CFLAGS="-O2 -Wall -march=native -I /opt/AMDAPP/include/" LDFLAGS="-L/opt/AMDAPP/lib/x86_64" ./configure

if you get the following error :
/usr/bin/ld: cgminer-adl.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/ so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/ could not read symbols: Invalid operation

remove the ADL directory, you must disable ADL.

! be sure the GPU and ADL are enabled !

$ make

6. Testing (to see the number of gpu the software sees)
$ export DISPLAY=:0   #(use this command only if you have more than one card)
$ ./cgminer -n

If the number does not represent the number of gpu you own, there is a problem, you should have miss a step.  Or the git repository could be broken.  Try an older tag here :

7. be up to date!
$ stop the miner
$ cd ~/cgminer
$ git pull
and then recompile (follow the step 5)

There is a lot of commands for this software.  The best way to learn is to read the documentation from the git repository, it is one of the best documentation I've read!

Monday, September 12, 2011

the server hang very often. SSH server ok, but no screen

On one of my rig, I experienced failure and a lot of hang.

Everytime, running top on the computer showed me that xorg was taking 100% cpu.

After seeking on the web, I've found a workaround :-) and it fixed the case :

edit the file /etc/X11/xorg.conf

$ sudo /etc/X11/xorg.conf

in the section device of all of your adapters add the line :

Option "UseEvents" "on"
this solved my problem :-)

update : this helped my system to be more reliable, but hanged each two to three days. 
update:  as the 1st of december 2011, my three rigs have 15, 15, 35 days of uptime (one is ups backed).  The problem was the cpu clocking... I would advice to start low and increase until you get unreliability, then decrease to get reliability!

Saturday, September 3, 2011

tried a new miner (cgminer) one word to describe, WOW!

Today, I tried another miner, I liked the phoenix-miner, but this miner is way better!  This miner test different algorithms to see which is better for your hardware, the miner supports multiple card (in the same instance!) is able to wake up an hanged thread, uses multi pool ( round robin, %, fail over ) ...  the only thing I can say is WOW!  The software is written in C and asm and does not need python-pyopencl ! Good new!

The miner is built from the same guy that did the linux scheduler.  cgminer is my new main miner!

Today, following an ubuntu update, one of my mining rig died (xorg hanged 10 times) I will do some manipulation tomorrow to correct this.  I don't know if I will have to reinstall ubuntu (probably not but I don't know!)  Keep that in mind if you plan to start mining...  You will encounter bugs, and each bugs mean downtime and less bitcoin in your wallet!

Tomorrow I will write a small tutorial to install cgminer from the git directory.

Stay tuned :-)