Bitcoin Forum
November 10, 2024, 08:26:24 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: CGMiner (With Scrypt) Ubuntu 12.04 Setup & Hashrate Guide/Script/Walkthrough  (Read 41943 times)
miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
April 28, 2013, 02:58:43 AM
Last edit: August 16, 2014, 02:57:02 AM by miaviator
 #1




EDIT: Credit to Viceroy https://bitcointalk.org/index.php?action=profile;u=34771 for building a better script on a more stable OS.

Please use his guide for CentOs if your not already stuck on Ubuntu:
https://bitcointalk.org/index.php?topic=170516.0

END EDIT.

I use this to deploy new miners to SSD's let me know if it helps anyone:

This is designed to be executed in blocks, each set of commands is between ######### and #######.  This assumes your username or at least homedir is miner and that you have setup networking correctly.  This is also using Ubuntu 12.04.2 Server as that's what I have lying around.  You could save time by installing xubuntu off the bat.

Code:
#CGMiner
#Install server 12.04
#configure networking for static IP and DNS
#user miner
######################
sudo -s
######################
apt-get -y remove --purge nvidia-common nvidia-current nvidia-opencl-dev nvidia-settings
apt-get -y update
apt-get -y upgrade
apt-get -y install xubuntu-desktop
reboot
######################
sudo -s
######################
apt-get -y install build-essential git-core unzip cmake automake libncurses5-dev autoconf libcurl4-openssl-dev pkg-config automake yasm
apt-get -y autoremove
exit
#####################
#I store these and transfer with SCP, you'll have to download them.
#DOWNLOAD ADL: ADL_SDK_5.0.zip
#DOWNLOAD AMD-APP-SDK AMD-APP-SDK-v2.8-lnx64.tgz
#CREDIT: http://rdmsnippets.com/2013/03/20/bitcoin-mining-with-ubuntu-12-04-tls-and-cgminer/
#APP http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/#one
#http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/#one
######################
cd
git clone git://github.com/ckolivas/cgminer.git cgminer
mkdir ADL_SDK
cd ADL_SDK
cp ~/ADL_SDK_5.0.zip .
unzip -o ADL_SDK_5.0.zip
cp include/* ~/cgminer/ADL_SDK
###################
sudo -s
###################
cd /opt
tar xf /home/miner/AMD-APP-SDK-v2.8-lnx64.tgz
cd /opt/
./Install-AMD-APP.sh
ldconfig
reboot
###################
sudo -s
###################
#Choose your standard, experimental, etc drivers
#apt-cache search fglrx will give a list
apt-get install fglrx
#Set machine to autologin to xserver
cat > /etc/lightdm/lightdm.conf << EOF
[SeatDefaults]
autologin-user=miner
autologin-user-timeout=0
user-session=xubuntu
greeter-session=lightdm-gtk-greeter
EOF
# You can use the newest AMD non-ubuntu packaged drivers as well
#http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx
#wget http://www2.ati.com/drivers/linux/amd-catalyst-13.4-linux-x86.x86_64.zip
#unzip -o amd-catalyst-13.4-linux-x86.x86_64.zip
#sh amd-catalyst-13.4-linux-x86.x86_64.run
aticonfig --adapter=all -f --initial
reboot
######################
export DISPLAY=:0
aticonfig --list-adapters
######################
#STOP HERE
#If you do not have adapters listed, you broke something.
######################
cd ~/cgminer
git pull
make clean
./autogen.sh
CFLAGS="-O2 -Wall -march=native -I /opt/AMDAPP/include/" LDFLAGS="-L/opt/AMDAPP/lib/x86_64" ./configure --enable-scrypt
make
###################
#TEST YOUR CGMINER BUILD
export DISPLAY=:0
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_MAX_HEAP_SIZE=100
/home/miner/cgminer/cgminer -n
#If this doesn't spit out your device ID's something is wrong.
###################
sudo -s
###################
#Disable the screensaver
sed 's/LOCK_SCREEN=true/LOCK_SCREEN=false/g' -i /etc/default/acpi-support
###################
#Generate a Base Config FIle
cat > mine.sh << EOF
API="--api-port 4028 --api-listen --api-allow 0/0"
POOL="-o #YOURPOOL -u YOURUSER -p YOURWORKERPASS"
GENERAL="--scrypt --no-submit-stale"
CARD="--auto-fan --temp-target 82"
WORK="--worksize 256 -I 13"
export DISPLAY=:0
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
cd /home/miner/cgminer/
screen -S miner /home/miner/cgminer/cgminer $API $POOL $GENERAL $CARD $WORK
EOF
chmod +x mine.sh
###################

#To run Miner
#./mine.sh

#To reconnect to miner
#screen -x miner

#To tweak hasrate: It's good to keep a spreadsheet of values and hashrates,
#GPU's are like diamonds, they each have their own unique flaws,
#Literally, silicone chips each perform different
#If you have 2,4,6,128 of the same GPU,
#It is good to run through tuning on each one independendently.

#Step 1
#Start running config, after running, grab the TC numbers from the xxxxx.bin file in the cgminer directory.
#Insert that to config file under work --thread-concurrency
#Start increasing and decreasing TC by a few thousand at a time,
#Find the highest hashrate

#Step 2
#set --gpu-memclock to the default card memory setting +25
#continue running and increasing memclock until you crash, then go by 5mhz
#continue till crash then go by 1mhz
#run with the final number for 10-30 minutes.
#don't worry if the hashrate goes down, just find the max memclock
#Step 3
#add --gpu-engine set it to half the memory speed from above
#add 5Mhz - 100Mhz to engine speed until hashrate drops
#once it drops begin subtracting 1mhz - 5Mhz until you find the max hashrate

#Step 4
#Run through worksize 64,128,256 to see which gives the best hashrate

#Step 5
#Increase -I from 13 to 20 in incriments of one to find the best hasrate

#Step 6
#Profit.

yeti_alchemist
Newbie
*
Offline Offline

Activity: 41
Merit: 0



View Profile
April 30, 2013, 10:51:52 PM
 #2

This looks great to me. I will be using it in the next couple days on a new setup. Thanks.
Random Bit
Member
**
Offline Offline

Activity: 70
Merit: 10


So many coins so little hash power


View Profile
May 01, 2013, 06:42:01 AM
 #3


Great write up.  I failed at 13.04 downloading 12.04 when I stumbled on this.  Thanks.
BitCoinUser123
Member
**
Offline Offline

Activity: 112
Merit: 10



View Profile
May 03, 2013, 02:30:01 AM
 #4

This is a fantastic writeup, thank you.  My only issue (bearing in mind that I have very little idea as to what I'm really doing)  is that "--scrypt" seems to be unrecognized by cgminer, even as acquired by these means.  I want to mine LTC / FTC, but at the moment I can only run cgminer (on Xubuntu 13.04 64 bit) for SHA-256 stuff.  It's my understanding that the version of cgminer acquired by following these instructions is supposed to support scrypt, but it seemingly doesn't.  I'm quite confused.

If anybody sees this and can give me any ideas as to what I might change, I'd be immensely obliged.  As it stands, I think I'm going to have to go back to Windows 7 on this mining system.

Here's hoping for some info.  Thanks in advance!

If I've been able to help out, donations are always welcome.

BTC: 1QGwEHYTdwwRU1BitLCTB5y2rdf3Sexjw7
AbiTxGroup
Sr. Member
****
Offline Offline

Activity: 447
Merit: 250


View Profile
May 03, 2013, 09:10:58 PM
 #5

Thanks for the post miaviator. 

I am running memtest on new GPU hardware atm.  If it passes, then I will run this with xubuntu desktop to see how it works.
miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
May 04, 2013, 12:09:10 AM
 #6

This is a fantastic writeup, thank you.  My only issue (bearing in mind that I have very little idea as to what I'm really doing)  is that "--scrypt" seems to be unrecognized by cgminer, even as acquired by these means.  I want to mine LTC / FTC, but at the moment I can only run cgminer (on Xubuntu 13.04 64 bit) for SHA-256 stuff.  It's my understanding that the version of cgminer acquired by following these instructions is supposed to support scrypt, but it seemingly doesn't.  I'm quite confused.

If anybody sees this and can give me any ideas as to what I might change, I'd be immensely obliged.  As it stands, I think I'm going to have to go back to Windows 7 on this mining system.

Here's hoping for some info.  Thanks in advance!

That is quite awkward.  Can you post the output of
Quote
cgminer -n

RHWN
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
May 10, 2013, 02:20:36 PM
Last edit: May 10, 2013, 02:51:15 PM by RHWN
 #7

Im right at this step:
Code:
sudo -s
###################
cd /opt
tar xf /home/miner/AMD-APP-SDK-v2.8-lnx64.tgz
cd /opt/
./Install-AMD-APP.sh
ldconfig
reboot

The exact line that the problems occur are:
Code:
tar xf /home/miner/AMD-APP-SDK-v2.8-lnx64.tgz
When i type that line in terminal i get this error:
"Cannot open: No such file or directory
tar: Error is not recoverable: exiting now"


I have downloaded the APP SDK v2.8 Inx64.tgz and have tried both letting the .tgz be located where it is placed after downloading and it also tried to make a folder named miner in the home location ( /home/miner/ )
I get the same error with both methods, so i would need some help from someone familiar with Linux (Ubuntu 12-04 > XUbuntu).


Would really appreciate if someone could help me out!
Cheers!

Edit:
Read the first post once more and found out the code should be like tar xf /home/RHWN/AMD-APP-SDK-v2.8-lnx64.tgz
but i still get the same error. Is my homedir "home" if i havent changed it?
So new to linux  Cry
RHWN
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
May 10, 2013, 05:29:36 PM
 #8

That's a strange line in there... almost like the OP stole it right out of another tutorial without crediting the author.

This is where the line that is causing problems came from:
https://bitcointalk.org/index.php?topic=170516.0

following that tutorial from the beginning causes no issues.  All compiles as expected, though it's CentOS not Ubuntu.  The reason I used CentOS is that I was not able to run multiple gpu's under any other flavors of linux.



 Shocked

Creds to you Viceroy!  Wink
miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
May 12, 2013, 02:40:55 AM
 #9

That's a strange line in there... almost like the OP stole it right out of another tutorial without crediting the author.

This is where the line that is causing problems came from:
https://bitcointalk.org/index.php?topic=170516.0

following that tutorial from the beginning causes no issues.  All compiles as expected, though it's CentOS not Ubuntu.  The reason I used CentOS is that I was not able to run multiple gpu's under any other flavors of linux.



I have never seen that thread, though it is common for two linux commands to be the same, your thread is dated prior to mine so I've credited you in the OP.  Also I like your script (and CentOS) better it's way more dynamic. 


miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
May 12, 2013, 02:46:09 AM
 #10

Im right at this step:
Code:
sudo -s
###################
cd /opt
tar xf /home/miner/AMD-APP-SDK-v2.8-lnx64.tgz
cd /opt/
./Install-AMD-APP.sh
ldconfig
reboot

The exact line that the problems occur are:
Code:
tar xf /home/miner/AMD-APP-SDK-v2.8-lnx64.tgz
When i type that line in terminal i get this error:
"Cannot open: No such file or directory
tar: Error is not recoverable: exiting now"


I have downloaded the APP SDK v2.8 Inx64.tgz and have tried both letting the .tgz be located where it is placed after downloading and it also tried to make a folder named miner in the home location ( /home/miner/ )
I get the same error with both methods, so i would need some help from someone familiar with Linux (Ubuntu 12-04 > XUbuntu).


Would really appreciate if someone could help me out!
Cheers!

Edit:
Read the first post once more and found out the code should be like tar xf /home/RHWN/AMD-APP-SDK-v2.8-lnx64.tgz
but i still get the same error. Is my homedir "home" if i havent changed it?
So new to linux  Cry

Where did you download the AMD-APP-SDK-v2.8-lnx64.tgz file to?

you can:
Code:
sudo updatedb
 locate AMD-APP-SDK

and then copy and paste the path into that command.

yeti_alchemist
Newbie
*
Offline Offline

Activity: 41
Merit: 0



View Profile
May 13, 2013, 05:18:38 AM
 #11

This looks great to me. I will be using it in the next couple days on a new setup. Thanks.

This guide helped me a lot and mellowed the learning curve. Thank you.
Grumlin
Legendary
*
Offline Offline

Activity: 2893
Merit: 1158



View Profile WWW
July 14, 2013, 07:33:57 AM
 #12

you won't believe, but I have a great hashrate on 925/800 -I 20 -w 256 -TC15232 is 400kx on each Powercolor 7870 Ghz Edition


           ▄
         ▄███
         ▀████▄
       ▄  ▀████▄
      ███▄ ▀████▄
    ▄████   ▀████▄
   ▄████      ████▄
  ▄████        ████▄
 █████          █████
▀████▄          ▄████▀
  ▀████▄▄▄▄   ▄████▀
    ▀████▀  ▄████▀
LISK
       ▄▄▄▄▄▄▄
   ▄▄▀▀       ▀▀▄▄
  █               █ ▄
 █   █▀▄ ▀█▀ ▀█▀   █ ▀▄
 █   █▀▄  █   █    █  ▀▄
  █  ▀▀   ▀   ▀   █    █
▄▀ ▄▄           ▄▀    ▄▀
 ▀▀  ▀▀▄▄▄▄▄▄▄▀▀      ▀▄
        ▀▄▄      ▄▄▀▀▄▄▀
           ▀▀▀▀▀▀

                      ▄▄▄
  ▄█▄              ▄███████▄
  ▀████▄▄         ██████▀██████▀
    ▀▀▀████▄▄     ███████████▀
    ▀██▄███████▄▄███████████
     ▄▄▄▀██████████████████
      ▀████████████████████
▀█▄▄     ▀████████████████
  ▀████████████████▀█████
    ▀████████████▀▄▄███▀
       ▀▀██████████▀▀
           ▀▀▀▀▀

    ▄█▄            ▄█▄
   █████          █████
  ███████ ▄▄▄▄▄▄ ███████
 ▄██████████████████████▄
 ████████████████████████
██████████████████████████
██████▀▀          ▀▀██████
█████▀   ▄      ▄   ▀█████
 ████   ███    ███   ████
  ████   ▀      ▀   ████
   ▀████▄▄▄▄▄▄▄▄▄▄████▀
     ▀▀████████████▀▀

               ▄▄   ▄▄
              ▄▀ ▀▀█  █
             ▄▀     ▀▀
         ▄▄▄▄█▄
     ▄█▀▀▀▀▀▀▀▀▀▀█▄
 ▄▀▄▀              ▀▄▀▄
█  █   ▄█▄    ▄█▄   █  █
 ▀█    ▀█▀    ▀█▀    █▀
  █                  █
   █   ▀▄      ▄▀   █
    ▀▄   ▀▀▀▀▀▀   ▄▀
      ▀▀▄▄▄▄▄▄▄▄▀▀






   ▄▄████████████████▄▄
 ▄█████▀▀▀██████▀▀▀█████▄
▄████▀  ▀▀▀    ▀▀▀  ▀████▄
████▀                ▀████
███▀                  ▀███
███       ▄    ▄       ███
██▀      ███  ███      ▀██
██       ▀█▀  ▀█▀       ██
██▄     ▄        ▄     ▄██
▀██▄     ▀▀▄▄▄▄▀▀     ███▀
 ▀███▄▄▄▄▄▄████▄▄▄▄▄▄███▀
   ▀▀████████████████▀▀

   ▄▄███████████████▄▄
 ▄█████████████████████▄
▄██████████████▀▀███████▄
████████████▀▀    ███████
█████████▀▀   ▄   ███████
██████▀▀     █    ███████
████▀       █     ███████
█████▄▄   ▄█      ███████
████████ ██▄      ███████
▀████████ ▀▄███▄▄███████▀
 ▀█████████████████████▀
   ▀▀███████████████▀▀

   ▄▄████████████████████▄▄
 ▄██████████████████████████▄
▄████████████████████████████▄
██████████ ▀▀█████████████████
██████████     ▀▀█████████████
██████████         ▀▀█████████
██████████         ▄▄█████████
██████████     ▄▄█████████████
██████████ ▄▄█████████████████
▀████████████████████████████▀
 ▀██████████████████████████▀
   ▀▀████████████████████▀▀


  ▄▄███████████████▄▄
 █████████████████████
███████████████████████
███████████▀    ███████
██████████  ▄██████████
██████████  ███████████
████████      ▄████████
██████████  ███████████
██████████  ███████████
██████████  ███████████
 █████████████████████
  ▀▀███████████████▀▀
simpic
Hero Member
*****
Offline Offline

Activity: 1255
Merit: 811


View Profile
October 29, 2013, 02:07:16 PM
 #13

Hello,
how to do the same with an HP laptop with Intel GMA as graphic video card?

When i launch cgminer i get this error:
Code:
./cgminer: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

digitalindustry
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1000


‘Try to be nice’


View Profile WWW
October 29, 2013, 02:16:47 PM
 #14

Hello,
how to do the same with an HP laptop with Intel GMA as graphic video card?

When i launch cgminer i get this error:
Code:
./cgminer: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

Hi you need to apt-get install  the missing libdev1

Then you need to symbolic link libudev.so.0 to 1

Search google for more info .

If you dont find the specific lines post again .

- Twitter @Kolin_Quark
simpic
Hero Member
*****
Offline Offline

Activity: 1255
Merit: 811


View Profile
October 29, 2013, 03:02:42 PM
 #15

Can't find libudev.so.1 libraries.
I also tried with "libudev.so" and "libudev".

Do you have a link to any tutorial/guide?

simpic
Hero Member
*****
Offline Offline

Activity: 1255
Merit: 811


View Profile
October 30, 2013, 06:39:27 PM
 #16

Hello?
Can you please help me?

digitalindustry
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1000


‘Try to be nice’


View Profile WWW
October 31, 2013, 05:16:18 AM
 #17

Hello?
Can you please help me?

Hi try starting here.

sudo su

apt-get install libudev1



If that is effective it installed libudev1

Then go to your /lib/i386.... etc

And ls to see your contents .


Most often /lib/i386-linux-gnu/

Then ln -s the two .

You upgraded, you dont have libudev.so.1 and cgminer is looking for 0.

ln -s libudev.so.1 libudev.so.0


Hope that helps , if you grievously break something feel free to blame me !


- Twitter @Kolin_Quark
simpic
Hero Member
*****
Offline Offline

Activity: 1255
Merit: 811


View Profile
October 31, 2013, 02:27:42 PM
 #18

Hi try starting here.

sudo su

apt-get install libudev1

As i said before it can't find this package.

digitalindustry
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1000


‘Try to be nice’


View Profile WWW
October 31, 2013, 04:26:39 PM
 #19

Hi try starting here.

sudo su

apt-get install libudev1

As i said before it can't find this package.

aaaaaand the error was..?

http://packages.ubuntu.com/search?keywords=libudev1&searchon=names

also this is likely becasue it was maybe taken from the repository.

try :

apt-get update

also what returns when you :

apt-get install libudev-dev

also you have net access right ?

also what is your version etc - specs etc

try this and tell me what it returns :


sudo su

apt-get install openssh-server openssh-blacklist libcurl4-openssl-dev libncurses5-dev pkg-config automake autogen yasm curl git libtool aptitude libudev-dev


these are basically what you need - its listed above also -  but parts of above have dependencies - if you are getting errors or they are not installing then that's an issue.

- Twitter @Kolin_Quark
simpic
Hero Member
*****
Offline Offline

Activity: 1255
Merit: 811


View Profile
October 31, 2013, 07:05:39 PM
 #20

As i said before it can't find this package.

aaaaaand the error was..?
It is not in english, anyway it means that it could not find the package.



Quote
http://packages.ubuntu.com/search?keywords=libudev1&searchon=names

also this is likely becasue it was maybe taken from the repository.

try :

apt-get update

also what returns when you :

apt-get install libudev-dev
It says that the package is already installed.



Quote
also you have net access right ?
Obviously.



Quote
also what is your version etc - specs etc
Laptop HP 630 with Ubuntu 12.04 LTS



Quote
try this and tell me what it returns :


sudo su

apt-get install openssh-server openssh-blacklist libcurl4-openssl-dev libncurses5-dev pkg-config automake autogen yasm curl git libtool aptitude libudev-dev


these are basically what you need - its listed above also -  but parts of above have dependencies - if you are getting errors or they are not installing then that's an issue.
Done.
(0 updated, 20 installed, 1 to be removed e 0 not updated)

Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!