Build your own Litecoin Mining Rig, part 2: Linux Setup

Linux Litecoin Mining Setup Guide
In the second installment of our DIY litecoin mining guide, we’ll look at how to install and configure Linux to properly mine with your GPUs at optimal settings. Don’t be dissuaded if you’ve never used Linux before—our step-by-step guide makes it easy.

Linux has a few advantages over Windows, including the ability to install to a USB stick (which means you don’t need a harddrive), lesser hardware requirements (you can get by just fine with less than 4GB of RAM), and simpler remote administration capabilities. Best of all, Linux is free! However, be aware that if you’d like to undervolt your GPUs to save power, Windows might be a better choice for you (update 10/2013: no longer true!).

If you missed the hardware portion of our guide, make sure to check it out first. Otherwise, read on.

Build a Litecoin Mining Rig, part 2:  Linux Setup

So you’ve decided to use Linux to run your mining rig—a fine choice! If you’re still a bit nervous because you’ve a complete Linux newbie, don’t be. Simply follow the step-by-step instructions exactly as they’re written, and you’ll be fine. Even if you’ve never done anything like this before, you should be up and running in about an hour.

Step 1: Configure BIOS settings

Before we even get to Linux, make sure your mining computer’s BIOS settings are in order. Power on your computer, and press the “delete” key a few times immediately after power on. You should end up in the BIOS configuration area. Do the following, then save & exit:

  • Change power options so that the computer automatically turns itself on whenever power is restored. The reason for this is two-fold: first, it’ll make sure that your miner automatically starts up after a power outage. Second, it makes powering the computer on much easier if you don’t happen to have a power switch connected to the motherboard.
  • Make sure that your USB stick is first in the boot-up order (you may need to have a USB stick attached).
  • Disable all components that you don’t plan to use. This will save a little bit of power, and since your miner will likely be running 24/7, it’ll add up. For me, that meant disabling onboard audio, the SATA controller, the USB 3.0 ports (I only had a 2.0 USB stick), the Firewire port, and the serial port.

Step 2: Install Xubuntu Desktop to your USB stick

Xubuntu is a lightweight version of Ubuntu, a popular Linux distribution. Most other distros should work just fine, but be aware that the GPU drivers require the presence of Xorg, which means server distros that don’t have a GUI will not work properly.

  • Download the Xubuntu Desktop x64 v12.10 installation image.
  • You’ll need to either burn the installation image onto a CD, or write the image to a second USB stick. If you use a CD, you’ll need to temporarily hook up a CD-ROM drive to your mining rig for the installation (make sure you temporarily enable your SATA controller if you disabled it in step 1!).
  • Once you have the installation media prepared, you’re ready to install Xubuntu to the blank USB stick on your miner. Make sure your blank USB stick is inserted into a USB port on your mining, and then boot into your installation media. The Xubuntu installer should appear.
  • Make sure to click the “auto-login” box towards the end of the installer; otherwise take all of the default installation options.
  • If you’re using a USB stick that is exactly 8GB, the installer may complain about the default partition sizes being too small. Create a new partition table with these settings: 5500mb for root (/), 315mb for swap, and the remaining amount for home (/home). If you’re using a USB stick larger than 8GB, you will not have to do this.
  • When the installation is complete, you should automatically boot into the Xubuntu desktop. Make sure to remove your installation media.

Step 3: Install AMD Catalyst drivers

Open a terminal session by mousing over the bottom center of the screen so that a list of icons appears. Click on “terminal” (it looks like a black box).

  • Type the following commands (press “enter” at the end of each line and wait for Linux to finish doing it’s thing):
    sudo apt-get install fglrx-updates fglrx-amdcccle-updates fglrx-updates-dev
    sudo aticonfig --lsa
    sudo aticonfig --adapter=all --initial
    sudo reboot
  • After your computer reboots, you can verify that everything worked by typing:
    sudo aticonfig --adapter=all --odgt
  • If you see all of your GPUs listed, with “hardware monitoring enabled” next to each, you’re good to go.

Important: you may need to have something plugged into each GPU to prevent the OS from idling it. You can plug 3 monitors into your 3 GPUs, but that isn’t very practical. The easiest option is to create 3 dummy plugs, and leave them attached to your GPUs. They’ll “trick” the OS into believing that a monitor is attached, which will prevent the hardware from being idled. Check out how to create your own dummy plugs.

If you ever add or remove GPUs to your rig later, you’ll need to re-run this command:   sudo aticonfig --adapter=all --initial

Step 4: Install SSH, Curl, and package updates

  • Install SSH by typing:
    sudo apt-get install openssh-server byobu

With SSH installed, you can unplug the keyboard/mouse/monitor (put dummy plugs into all GPUs, though) from your miner, and complete the rest of the installation from your desktop computer. Simply download Putty onto your desktop, run it, and enter the IP address of your mining rig. That should bring up a remote terminal session to your miner, which is more or less just like sitting at the keyboard in front of it.

If you plan to manage your mining rig remotely over the internet, you’ll need to forward port 22 on your router to your miner. Make sure that you use a strong Xubuntu password!

Setup should be quicker from this point, as now you can simply copy text from this webpage (highlight it and press control-C) and then paste it into your Putty session by simply right-clicking anywhere inside the Putty window. Neat, eh?

  • Install Curl and package updates by typing (or copying & pasting into Putty) the following commands:

    sudo apt-get install curl
    sudo apt-get update
    sudo apt-get upgrade

Step 5: Install cgminer

Cgminer is the mining software we’ll be using. If the first command doesn’t work, you’ll need to check out the cgminer website and make a note of the current release version. Substitute that in the commands below.

Update: Cgminer 3.7.2 is the last version to support scrypt—do not use any version after that! In addition, depending on which version you choose to use, you may receive an error complaining about libudev.so.1 when you try to run cgminer—you can find the fix for that here.

  • Type the following:

    wget http://ck.kolivas.org/apps/cgminer/2.11/cgminer-2.11.4-x86_64-built.tar.bz2
    tar jxvf cgminer-2.11.4-x86_64-built.tar.bz2
  • If everything was uncompressed successfully, we can delete the downloaded archive; we don’t need it anymore:
    rm *.bz2
  • Now check if cgminer detects all of your GPUs properly:
    cd cgminer-2.11.4-x86_64-built
    export DISPLAY=:0
    export GPU_USE_SYNC_OBJECTS=1
    ./cgminer -n

Step 6: Create cgminer startup script

We’re almost done—now we just need to create a few simple scripts to control cgminer.

  • If you’re still in the cgminer directory from the previous step, first return to your home directory:
    cd ..
  • Type the following to create a new file with nano, a Linux text editor:
    sudo nano mine_litecoins.sh
  • Type the following into nano (note where the places you need to substitute your own usernames!) :
    #!/bin/sh
    export DISPLAY=:0
    export GPU_MAX_ALLOC_PERCENT=100
    export GPU_USE_SYNC_OBJECTS=1
    cd /home/YOUR_XUBUNTU_USERNAME/cgminer-2.11.4-x86_64-built
    ./cgminer --scrypt -I 19 --thread-concurrency 21712 -o stratum+tcp://coinotron.com:3334 -u USERNAME -p PASSWORD
  • Save the file and quit nano, then enter the following:
    sudo chmod +x mine_litecoins.sh

Note that the cgminer settings we’re using in our mine_litecoins.sh script correspond to a good starting point for Radeon 7950 series GPUs. If you followed our hardware guide, these settings will give you good hashrates. If you’re using another type of GPU, you’ll want to use Google to find optimal cgminer settings for it.

Also note that you’ll need to create an account at one of the litecoin mining pools, and plug your username and password into the script (the -u and -p parameters). I have Coinotron in there as an example, but there are quite a few to choose from.

Step 7: Create auto-start scripts

We want cgminer to automatically start mining whenever the rig is powered on. That way, we keep mining losses to a minimum whenever a power outage occurs, and we don’t have to worry about manually starting it back up in other situations.

  • Type the following to create a new script and open it in nano:
    sudo nano miner_launcher.sh
  • Enter the following text into the editor (substitute your Xubuntu username where shown!):
    #!/bin/bash
    DEFAULT_DELAY=0
    if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
       DELAY=$DEFAULT_DELAY
    else
       DELAY=$1
    fi
    sleep $DELAY
    su YOUR_XUBUNTU_USERNAME -c "screen -dmS cgm /home/YOUR_XUBUNTU_USERNAME/mine_litecoins.sh"
  • Save and quit nano, and then type:
    sudo chmod +x miner_launcher.sh
  • Now we need to call our new script during startup; we do that by adding it to /etc/rc.local. Type the following to open /etc/rc.local in nano:
    sudo nano /etc/rc.local
  • Add the following text, right above the line that reads “exit 0” (substitute your own username!):
    /home/YOUR_XUBUNTU_USERNAME/miner_launcher.sh 30 &

Step 8: Create an alias to easily check on cgminer

We’re essentially done at this point, but you’ll probably want to manually SSH into your miner from time to time to manually check on your GPU temperatures & hashrates, etc. Creating an alias will make that easy.

  • Type:

    sudo nano .bashrc
  • Scroll to the end of the file, and then add this text above the line that reads “# enable programmable completion…”
    alias cgm='screen -x cgm'
  • Save and quit out of nano.

That’s it—you’re done! You’ll probably want to test everything now. The easiest way to do that is to close your Putty session and power down your miner. Turn it back on and the following should happen:

  1. Your miner should boot into Xubuntu. This may take about a minute, depending on the speed of your USB stick.
  2. 30 seconds after Xubuntu has loaded, cgminer will automatically start and begin mining. You’ll probably notice the fans on your GPUs spin up when this happens.
  3. You should be able to SSH into your miner at any time and type cgm to bring up the cgminer screen. To close the screen (and leave cgminer running), type control-A, then control-D.
  4. If you ever need to start cgminer manually (because you quit out of it, or kill it, etc), simply type ./miner_launcher.sh
cgminer running

If all went well, you should see something like this when checking cgminer via your “cgm” alias.

Congratulations—you have your own headless linux litecoin miner!

The next section of our guide covers setup under Windows, and then we take a look at optimizing cgminer settings for better performance.

You can leave a response, or trackback from your own site.

1,431 Responses to “Build your own Litecoin Mining Rig, part 2: Linux Setup”

  1. M2 Mike says:

    Hi Crypto,

    Here is the CGminer config I ended up using, with 2 cards at the moment but later (2-3 weeks when I get the riser cables) 4 cards per 2 rigs, later 8 cards for the pair.. and then replicate if this makes sense..

    {“pools” : [
    {
    “url” : “http://pool.ABCPool.co:8332”,
    “user” : “MYUSERNAME”,
    “pass” : “MYPASSWORD”
    }

    ],

    “intensity” : “9”,
    “gpu-engine” : “1150”,
    “gpu-fan” : “0-100”,
    “gpu-memdiff” : “-150”,
    “gpu-powertune” : “0”,
    “temp-cutoff” : “100”,
    “temp-overheat” : “90”,
    “temp-target” : “80”,
    “auto-fan” : true,
    “auto-gpu” : true,
    “api-listen” : true,
    “expiry” : “120”,
    “failover-only” : true,
    “gpu-threads” : “5”,
    “log” : “5”,
    “quiet” : false,
    “retry-pause” : “5”,
    “scan-time” : “45”,
    “temp-hysteresis” : “3”,
    “vectors” : “1”,
    “worksize” : “64”,
    “kernel” : “poclbm”
    }

    I know the Quiet = true is bad, I tweaekd that as I was trying to have normal display.. I am averaging about 680-690 per card.. Do you think I should tweak any of this?

    Here is the cut and paste of my scripts

    #!/bin/bash
    DEFAULT_DELAY=0
    if [ “x$1” = “x” -o “x$1” = “xnone”]; then
    DELAY=$DEFAULT_DELAY
    else
    DELAY=$1
    fi
    sleep $DELAY
    su mike -c “screen -dm5 cgm /home/mike/abcminer.sh”

    This is the one it doesn’t like can you see my coding issue?

    as for the .bashrc, I suspect like others, I let xbuntu patch, and maybe that is the difference we are seeing I followed your work verbatim till I had to deviate for card or btc vs ltc diffrences.. I have another rig to build this weekend so I will go through it all again..

    I am guessing the patches got me, my stupid M$ or Apple ingrained must apply patches training..

    Mike

    BTW does a .075 btc per day seem fair for 1.36 Mh/s or is ABCpool scammers I was expecting closer to .1

    Thanks again..

  2. malandante says:

    It’s not “-dm5” but “-dmS”, not “five” but capital S.

    • CryptoBadger says:

      That’s what I have there. =) Sometimes it’s hard to tell with certain fonts, which is why I highly recommend copying & pasting everything via a SSH session (after the video drivers, which require the local terminal).

      • malandante says:

        I know, just missed to hit the reply button to M2 Mike’s comment. BTW thanks for your amazing guide, Crypto!

  3. Elkay says:

    I have followed step 3 and am now unable to see ‘hardware monitoring enabled’ next to my 7900’s. Is there something I am doing wrong? Is it incredibly important? Thanks!

    • CryptoBadger says:

      Sometimes this happens if you don’t have something plugged into each GPU (either an actual monitor, or a dummy plug – see the guide for info). Complete the rest of the installation steps and see if the cards mine properly in cgminer – if they does, then no worries.

      If not, try plugging something into each GPU, and then type “sudo aticonfig –adapter=all –initial” (without the quotes), reboot, and that should fix the issue.

  4. Harm says:

    This is really weird, I’m running an almost exactly same setup; 2×7950 but getting only ~280Kh per card. My config is as per post: http://pastebin.com/7Bfr0u3J

    I’ve tried increasing the TC but one of the two cards fail with: ‘GPU 1 failure, disabling!’. The other then runs at ~560Kh.

    I must be missing something obvious.

    • Harm says:

      Perhaps good to mention were my build deviates; I have only 2GB of RAM, running Xubuntu 12.10. I do not have dummy plugs but I have 1 monitor attached (but the cards with higher TC fail random).

    • CryptoBadger says:

      You have a lot of unnecessary stuff in your config – I’d remove everything except for scrypt, intensity and thread concurrency to start troubleshooting with. Some of the settings you have won’t do anything because they’re defaults; others might actually be hurting performance.

      Plug something into the second GPU (either a 2nd monitor or a dummy plug), then run “sudo aticonfig –adapter=all –initial” (without the quotes), reboot and hopefully the second card should run properly.

      • Harm says:

        I’m starting to suspect 2GB of RAM is not enough. Might that be the issue?

        • CryptoBadger says:

          No – run “top” (without the quotes) to check how much memory your running processes are using. You’ll see that nearly all of your RAM is free.

          Start with the suggestions that I gave in your earlier comment. It sounds like one of your GPUs is idle because you have nothing plugged into it.

      • Harm says:

        The oddity is that sometimes GPU 1 fails and sometimes GPU 0. I’d expect it to consistently fail on the GPU I don’t have a monitor attached to (GPU 1). Also with some settings I do get the two GPU’s to run albeit at a meager ~280Kh.

        The command “sudo aticonfig –adapter=all –odgt” sees both cards. “top” indeed shows a memory consumption of 1GBish.

        I actually ran with only TC and intensity but I used cgminer to write a config file.
        Back home I’ll jam a resistor in the DVI port as per: http://blog.zorinaq.com/?e=11 just to be sure.

  5. Harm says:

    What is the difference between installing the AMD drivers like you are doing and the seemingly more common approach I find on the internet which is to download and install the drivers from AMD’s website.

  6. fher98 says:

    Hi dude,.. nice post help me out with a few tweaks.

    But still need your help. I cant get pasto I = 12 cuz with anything higher the temperature just goes crazy and the machine shutsdown… any ideas how to get the temp below 80, thanks.

    • CryptoBadger says:

      Are you trying to run inside an enclosed case? It really isn’t feasible to pack a few high-end GPUs into a closed space and then run them at 100% 24/7. If you are trying to run in an enclosed PC case, try opening it up and pointing a desk fan inside.

      If you run the GPUs in an open-air environment, like the plastic crate build that I recommend, you should have no trouble keeping the temps well below 80C. If I crank the GPU fans to 100%, my rigs sit around 68C with no other external cooling.

      • fher98 says:

        I see… thanks Cryto.

        I was like crazy trying to understand why the computer was hanging. I was running it inside the server room… and a friend was kind enough to reset it for me everytime i lost connection. Until i notice it was turning itself off… guess it wasnt cold enough u.u

        So Crypto, what would you recommend to cool the cards down… ?? besides de fan? 🙂

        thanks dude

        • CryptoBadger says:

          The most effective thing is to just get the GPUs outside of the case.

          If it’s absolutely necessary to run this inside an enclosed case, then cooling it effectively is going to be difficult, and likely pretty expensive. Maybe water cooling?

  7. FrodoBaggins says:

    Have followed your guide but have some issues…

    Great guide btw!

    My rig sees the devices fine:
    $ ./cgminer -n
    [2013-05-08 16:14:39] CL Platform 0 vendor: Advanced Micro Devices, Inc.
    [2013-05-08 16:14:39] CL Platform 0 name: AMD Accelerated Parallel Processing
    [2013-05-08 16:14:39] CL Platform 0 version: OpenCL 1.2 AMD-APP (1016.4)
    [2013-05-08 16:14:39] Platform 0 devices: 3
    [2013-05-08 16:14:39] 0 Tahiti
    [2013-05-08 16:14:39] 1 Tahiti
    [2013-05-08 16:14:39] 2 Tahiti
    [2013-05-08 16:14:39] GPU 0 AMD Radeon HD 7900 Series hardware monitoring enabled
    [2013-05-08 16:14:39] GPU 1 AMD Radeon HD 7900 Series hardware monitoring enabled
    [2013-05-08 16:14:39] GPU 2 AMD Radeon HD 7900 Series hardware monitoring enabled
    [2013-05-08 16:14:39] 3 GPU devices max detected
    [2013-05-08 16:14:39] USB all: found 8 devices – listing known devices
    [2013-05-08 16:14:39] No known USB devices

    cgminer version 2.11.4 – Started: [2013-05-08 16:05:50]
    ——————————————————————————–
    (5s):585.0K (avg):540.1Kh/s | A:293 R:3 HW:0 U:26.4/m WU:426.1/m
    ST: 2 SS: 0 NB: 8 LW: 73 GF: 0 RF: 0
    Connected to mine.coinpool.net diff 16 with stratum as user xxx
    Block: 2f46886016e3bdef… Diff:30.8M Started: [16:16:20] Best share: 10.6K
    ——————————————————————————–
    [P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit
    GPU 0: 91.0C 3524RPM | 362.8K/271.2Kh/s | A:144 R:2 HW:0 U:12.95/m I:19
    GPU 1: 44.0C 1988RPM | 334.0K/270.4Kh/s | A:150 R:1 HW:0 U:13.49/m I:19
    GPU 2: 31.0C 1388RPM | OFF / 0.000h/s | A: 0 R:0 HW:0 U: 0.00/m I:19
    ——————————————————————————–

    [2013-05-08 16:16:37] Accepted d9a7cfcf Diff 269/16 GPU 0
    [2013-05-08 16:16:41] Accepted 7b248dcd Diff 102/16 GPU 0

    Notice the temperature on GPU 0 and that GPU 2 is OFF. It seems to be random which one of 1 or 2 is OFF.

    This will run until GPU hits 95C and then shut down.

    I have an open test bed for the boards so there should be enough air flow.

    Hardware:
    CPU AMD FX-6300 3.5GHz 6-Core
    Motherboard ASRock 970 EXTREME4 ATX AM3+
    Memory G.Skill Ripjaws X Series 8GB (1 x 8GB) DDR3-1600
    Video Card 3x Gigabyte Radeon HD 7950 3GB
    Wireless Network Adapter Asus USB-N13 802.11b/g/n USB 2.0
    Case DIYPC Alpha-DB6 ATX Test Bench $49.78
    Power Supply Corsair 1050W ATX12V / EPS12V $187.00

    Any idea what is going on? Next steps?

    Thank you!!

    • FrodoBaggins says:

      Seems to have something to do with the –scrypt flag.

      Without it:

      GPU 0: 59.0C 2861RPM | 89.73K/90.10Kh/s | A:0 R:0 HW:0 U:0.00/m I:20
      GPU 1: 42.0C 2002RPM | 89.58K/90.42Kh/s | A:0 R:0 HW:0 U:0.00/m I:20
      GPU 2: 32.0C 1395RPM | 89.43K/90.16Kh/s | A:0 R:0 HW:0 U:0.00/m I:20

      The rates are terrible, though… 🙁

      • CryptoBadger says:

        You need the scrypt flag; that is what tells cgminer to use the proper hashing algorithm for litecoins.

        Do you have something connected to all 3 GPUs (monitor or dummy plug)?

        Are these MSI 7950s, or another brand? I’ve never seen mine get even close to 95C, even before I added risers to my first rig. If you’re using another brand and you’re overclocking them, reduce the clock speeds a bit. I notice that even at 91C, your GPU fan is still only at 3500 RPM. Mine spin up to almost 5000 RPM at full speed (yours should be at 100% speed at that temperature). Either you have a different brand with a lower speed fan, or there is possibly something wrong with your GPU fan/fan controller.

        • FrodoBaggins says:

          Changing the scrypt parameters are having a big effect. Reducing the –thread-concurrency enables the 3rd card. Performance stinks though.

          My 3 cards are GIGABYTE AMD Radeon HD 7950 3GB GDDR5. It seems like these are a little hard to get the performance out of.

          Seems like I need to do more research to find the correct combination of scrypt parameters.

          This https://bitcointalk.org/index.php?topic=178963 seems to have some good info.

          “Apparently there’s a conflict with xubuntu 12.10 and AMD catalyst 12.10 or greater”

  8. MikeLP says:

    Thanks for this article. I went out and got all the gear. I followed everything, but my one issue is that when I execute ./cgminer -n I get “error while loading shared libraries: libjansson.so.4: cannot open shared object file: No such file or directory” Also the cgminer version I downloaded was cgminer-3.1.0-x86_64-built Could be it that I am on Xubuntu 13.04 instead of 12.10? If that is the case, will 12.04 work? Thanks for your support and help so far!

    • CryptoBadger says:

      I haven’t tried Xubuntu 13.04, but I can’t imagine it causing issues.

      I also haven’t tried cgminer 3.1 on linux yet – there were a couple other people that were getting the same error as you when using it, though. Try grabbing 2.11.4 and seeing it that works.

      • quasig says:

        I had the same issue with xubuntu 13.04. I had to build cgminer from source. I loosely followed instructions here
        http://debianhelp.wordpress.com/2012/01/10/bitcoin-mining-with-ubuntu-12-04-lts-and-cgminer/

        but with an –enable-scrypt flag during compile.

        Of note, autogen.sh seemed to not find my GPUs (2 Sapphire 6870s) and said GPU mining was disabled, but they were found during compile and everything works fine.

        I only compiled from source because xubuntu 12.10 seemed to find my cards as 58**s.

        If you’re following with CryptoBadger’s suggested hardware, I’d probably just step back and use 12.10.

        • MikeLP says:

          Thanks for all the help guys! I ended up switching to 12.04 LTS and went with the cgminer version in this tutorial. Everything works now, should have just stuck to the tutorial completely. Ha. So what are you views of profitability long run. I know the value is unpredictable but like many have said, risk is low and GPU wont become obsolete in litecoin mining. I just hope I make my investment money back and just want to hear from you veterans for reassurance. Ha.

  9. Chupa says:

    Hi, im not that good with linux im stil learning everyday but i’m kinda stuck on step 5.
    Im not using putty im directly on the pc with a screen, but when i type the command’s he say that he cannot execute binary file. Mabye somebody can tell me what i do wrong :/

    ****:~$ rm *.bz2
    ****:~$ cd cgminer-2.11.4-x86_64-built
    ****:~/cgminer-2.11.4-x86_64-built$ export DISPLAY=:0
    ****:~/cgminer-2.11.4-x86_64-built$ export GPU_USE_SYNC_OBJECTS=1
    ****:~/cgminer-2.11.4-x86_64-built$ ./cgminer -n
    bash: ./cgminer: cannot execute binary file

    Thx

    • CryptoBadger says:

      Are you running 64-bit Xubuntu? Or 32-bit? I believe that is the error you’d see if you tried to execute a 64-bit binary on a 32-bit OS, but I’m not exactly a linux guru either.

      If you are running a 32-bit OS, and there is a reason that you need to, then I believe you’ll have to compile cgminer from the source code. Here is a guide that should help you do that.

      • chupa says:

        hi, indeed i had the wrong version downloaded, than i had problems because i could’ent get it to work with the latest Xubuntu. but sovled that to, now im stuck on the starting cgminer.
        When i enter:
        ****:~$ ./miner_launcher.sh
        Password:
        ****:~$

        (he asks for the password but when i enter it nothing happens, he just goes to a new line. if i restart the pc, i dont think the miner starts itself. )

        ****:~$ cgm
        There is no screen to be attached matching cgm.
        ****:~$

  10. Samara says:

    Thanks a lot for such an extensive guide!

    Basically I set everything up as you described and used the same hardware, besides the GPU, it is the Boost edition of the one in this guide stock clocked at 960mHz. (i think thats the main problem) Tried to run it on 32 bit win 8 and encountered way too many problems such as HW errors and the only TC working was 14474.

    I then tried xubuntu and after trying several driver/cgminer/sdk combinations found one that works, however while GPU0 runs at 640 kh/s other two fluctuate very often and average at 560 kh/s each. What i find is weird is that i am able to run gpu clocked at 1150, stock 1250 memory clock (any deviation reduces hash rate), with no HW errors and all cards running at around 60-65C.

    Is there any way to even out the the hash rates of other two cards?

    • CryptoBadger says:

      How long did you let cgminer run? It takes awhile for the hashrates the stabilize on the display. Give it a few hours and then check the overall averages (the 2nd hashrate number) next to each GPU.

      One of my rigs has the boost edition cards in it, so they shouldn’t cause you problems.

      • Samara says:

        Finally have it running smoothly. Thanks again!

        Here are all my settings in case someone needs it:

        Win 8 Pro x64
        AMD Catalyst 13.5 beta drivers
        AMD SDK 2.8
        AMD Hydravision
        MSI Afterburner GPU OC@1150, MemClock 1250, temp 60-66C (default user defined fan settings), Voltage is locked now for some reason.
        Cgminer 3.1.1 TC:21712, Intensity 20, every card outputs 640-660kh/s,and zero HW errors.

  11. Ayoria says:

    hey everything seems to be running smoothly but in regards to putty I cant close it via ctrl-a and ctrl-d and if I close it any other way it shuts down any cgminer processes I was working with.

  12. Ayoria says:

    aaaand nevermind I answered my own question. I simply used byobu before launching cgminer and f6 to detach before closing my terminal
    shows up again when hitting byobu on the next login 😀

  13. meechew says:

    I am using to AMD HD 5870’s

    [2013-05-11 10:59:26] Error -1: Getting Device IDs (num)
    [2013-05-11 10:59:26] clDevicesNum returned error, no GPUs usable
    [2013-05-11 10:59:26] 0 GPU devices max detected

    • CryptoBadger says:

      Did you install the catalyst drivers the way that I outlined in my guide, or a different way?

      • Alan says:

        I have my miner setup and running for 2-3 days now with the hardware described in your guide. The most I can manage is about 1050 Mh/s with 2 cards. (still waiting on risers before I hookup the 3rd). But I have hundreds of HW errors in just a day or two. I tried to copy the example settings that you use for cgminer, but I get errors even running cgminer with them. Maybe you could give me a few minutes of advice 1 on 1 for a BTC or LTC tip?

  14. Engine44 says:

    Can I use 64bit Xbuntu with the AMD Sempron 145? It is a single core processor. I thought you had to have dual core processor to run a 64bit O.S.

    Thanks

  15. BTC says:

    Hi again,

    I got two rigs running yesterday and I am getting some electricity trouble and my surge protector shuts down while the 2 rigs were mining..

    went and fixed the electricity trouble.. and now the miners are not working… 🙁

    I am getting these errors:

    [2013-05-14 10:58:03] Started cgminer 3.1.1

    [2013-05-14 10:58:04] Probing for an alive pool
    [2013-05-14 10:58:05] Maximum buffer memory device 0 supports says 1281359872
    [2013-05-14 10:58:05] Your scrypt settings come to 1572864000
    [2013-05-14 10:58:05] Error -61: clCreateBuffer (padbuffer8), decrease TC or in
    crease LG
    [2013-05-14 10:58:05] Failed to init GPU thread 0, disabling device 0
    [2013-05-14 10:58:05] Restarting the GPU from the menu will not fix this.
    [2013-05-14 10:58:05] Try restarting cgminer.
    Press enter to continue:

  16. BTC says:

    1rig with 2xHD6970 + 2xHD6950

    1rig with 4xHD7950 MSI(same as yours)

    and yes I got these:

    export GPU_MAX_ALLOC_PERCENT=100
    export GPU_USE_SYNC_OBJECTS=1

    on my mine_litecoins.sh

    strange thing is that it work before… and because of that power/electricity problem.. now it does not work anymore…

    • CryptoBadger says:

      The “Error -61: clCreateBuffer” that you’re seeing in cgminer is likely from trying to use the settings that I recommend for the 7950 on the 6xxx series. Try removing the –thread-concurrency parameter and see if the errors go away (you’ll need to Google an appropriate thread-concurrency value for the 6xxx series).

      As far as the ADL errors, when you type “sudo aticonfig –adapter=all –odgt” (without the quotes), do you see all of your GPUs listed with temperature monitoring enabled? Also, do you have something plugged into each GPU (monitor or dummy plug)?

  17. BTC says:

    yeah I figured that much on hd 6900

    but for HD 7950… I have this log:

    uncle1@uncle1-box3:~$ sudo aticonfig –adapter=all –odgt
    ERROR – X needs to be running to perform AMD Overdrive(TM) commands
    uncle1@uncle1-box3:~$ export DISPLAY=:0
    uncle1@uncle1-box3:~$ xhost +
    access control disabled, clients can connect from any host
    uncle1@uncle1-box3:~$ aticonfig –adapter=all –odgt

    Adapter 0 – AMD Radeon HD 7900 Series
    Sensor 0: Temperature – 38.00 C

    Adapter 1 – AMD Radeon HD 7900 Series
    Sensor 0: Temperature – 36.00 C

    Adapter 2 – AMD Radeon HD 7900 Series
    Sensor 0: Temperature – 36.00 C

    Adapter 3 – AMD Radeon HD 7900 Series
    Sensor 0: Temperature – 35.00 C
    uncle1@uncle1-box3:~$

    when I start cgminer:

    cgminer version 3.1.1 – Started: [2013-05-14 11:49:38]
    ——————————————————————————–

    ST: 2 SS: 0 NB: 1 LW: 8 GF: 0 RF: 0
    Connected to us.wemineltc.com diff 32 with stratum as user babyminer.uncle1
    Block: 44edfd33851fb569… Diff:39.7M Started: [11:49:38] Best share: 71
    ——————————————————————————–
    [P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit
    GPU 0: 49.0C 2257RPM | 452.6K/2.097Mh/s | A:1 R:0 HW:0 U:60.00/m I:19
    GPU 1: 36.0C 2105RPM | OFF / 0.000h/s | A:0 R:0 HW:0 U: 0.00/m I:19
    GPU 2: 36.0C 2110RPM | OFF / 0.000h/s | A:0 R:0 HW:0 U: 0.00/m I:19
    GPU 3: 35.0C 2071RPM | OFF / 0.000h/s | A:0 R:0 HW:0 U: 0.00/m I:19
    ——————————————————————————–

    [2013-05-14 11:49:35] Started cgminer 3.1.1
    [2013-05-14 11:49:37] Probing for an alive pool
    [2013-05-14 11:49:38] Network diff set to 39.7M
    [2013-05-14 11:49:38] Error -5: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2013-05-14 11:49:38] GPU 2 failure, disabling!
    [2013-05-14 11:49:38] Thread 2 being disabled
    [2013-05-14 11:49:38] Error -5: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2013-05-14 11:49:38] GPU 3 failure, disabling!
    [2013-05-14 11:49:38] Thread 3 being disabled
    [2013-05-14 11:49:38] Error -5: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2013-05-14 11:49:38] GPU 1 failure, disabling!
    [2013-05-14 11:49:38] Thread 1 being disabled
    [2013-05-14 11:49:40] Stratum from pool 0 requested work restart
    [2013-05-14 11:49:40] Accepted 23249779 Diff 71/64 GPU 0

    • CryptoBadger says:

      Others have had issues with cgminer 3.x.x – try using 2.11.4.

      If that doesn’t work, how much RAM do you have installed in the rig? And what linux distro & version are you running?

      • BTC says:

        Others have had issues with cgminer 3.x.x – try using 2.11.4.

        —- Same thing with 2.11.4

        If that doesn’t work, how much RAM do you have installed in the rig? And what linux distro & version are you running?

        The rig has 1 x 8GB RAM

        I just added another 1 x 8GB RAM

        the rig now has 16 GB RAM

        • BTC says:

          It is XUBUNTU 12.10

          • Harm says:

            I’m trying Ubuntu server 12.04. I found the whole GUI thing slow, besides I want to be able to SSH into the machine and do my thing instead of actually being there.

          • CryptoBadger says:

            Unfortunately Ubuntu server won’t work. I tried it myself before I went with Xubuntu. The linux catalyst drivers require the presence of X (the GUI) to work properly. Hopefully at some point in the future AMD modifies them so they’ll work in a pure server environment.

        • Harm says:

          I have exactly the same issue: Error -5: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)

          This occurs when running a ‘too high’ a TC. One card works (at ~560KH/s) But when running at a lower TC hash rate is only half (~280KH/s) what I’d expect. I initially had only 2GB of RAM. Installed 2 more and it still failed. Seeing you have 8 I really don’t think this is RAM related. Nor do I think the dummy plugs are the issue, first I had none, now I added them to all cards and no difference. Also I read that linux doesn’t need them.

          Next thing I’m gonna try is using the downloaded AMD drivers. Read some reports that Ubuntus drivers don’t work too well. I’m soon going to find out.

          BTW I’m using this: https://sites.google.com/site/generaltechtips/blog/BitcoinAutomata
          too save me some typing.

        • CryptoBadger says:

          8GB of RAM is more than enough, I just wanted to make sure that you weren’t trying to run with less than 1GB.

          Unfortunately I haven’t had to deal with this particular error myself, and Google hasn’t been helpful in letting me know what might potentially be causing it, other than possibly too little RAM (but you absolutely have more than enough). I’d suggest that you post your information over at the bitcointalk forum – there will likely be a few people over there that have seen the issue before and know how to resolve it. Good luck!

  18. BTC says:

    I forgot to add… ALL GPUS have dummy plugs…

  19. sderref says:

    Hi there,
    its a very nice guide. I followed the guide step by step.
    I left out the putty part( after several attempt I always got the same error message Now I got stuck. I beleive its my lack of knowledge.
    “Type:

    sudo nano .bashrc

    Scroll to the end of the file, and then add this text above the line that reads “# enable programmable completion…”

    alias cgm=’screen -x cgm’

    Save and quit out of nano.”
    When I type in the “sudo nano .bashrc” there is nothing for me…So I cant scroll down and add the “alias cgm=’screen -x cgm'”
    Did I miss something?
    How do I know cgminer is working? I didnt get that lovely window. I am sure I missed something, just I dont know where and what:D
    Best regards.
    sderref

    • CryptoBadger says:

      Make sure that you’re in your home directory before you type “sudo nano .bashrc”. You can change to your home directory by typing “cd /home/[your xubuntu username]” (without the quotes and brackets).

      The line that you’re adding to .bashrc isn’t critical, it just means you need to type a little bit less to check on cgminer. If you can’t get the .bashrc line added, then you can still check on cgminer by typing “screen -x cgm” (without the quotes).

      • sderref says:

        Hi there,
        many thanks. With this last change finished the guide(no putty). But dont see the cgminer booting in to xubuntu(the gpu fun speed sounds same, no change).
        Its a fun build with many parts from friends, but I want to see it work.
        (Parts:4gb corsair 1333, an older shappire 5850 gpu, amd sempron 145, a used(and abused) corsair hx 850 psu,sandisk 16gb flash( 8gb was not enough I always got installation error), tp link usb, and I got an msi 970a g46, and xubuntu 12.10 which was not easy to install at all.)
        Any idea why I cant see this cgminer working?
        Best regards,
        sderref

        • CryptoBadger says:

          What happens if you run your mine_litecoins.sh script manually (type “./mine_litecoins.sh” without the quotes from your home directory)?

          You will likely need to remove the thread concurrency value from mine_litecoins.sh for your 5850 to work properly. The values I gave in the guide were aimed at 7950 GPUs and will likely provide sub-optimal results with a 5xxx series card (or might not work at all). The intensity value may be too high as well (-I 19); it’s probably best to remove it too.

          • sderref says:

            Hi, yes this could be a problem. I did not pay enough attention for your build parts. I have a different gpu.
            This happens:
            “sderref@sderref-MS-7693:~$ cd /home/sderref
            sderref@sderref-MS-7693:~$ ./mine_litecoins.sh
            bash: ./mine_litecoins.sh: No such file or directory
            sderref@sderref-MS-7693:~$ ”
            How can I do these?
            “You will likely need to remove the thread concurrency value from mine_litecoins.sh for your 5850 to work properly.The intensity value may be too high as well (-I 19); it’s probably best to remove it too.”
            Regards,
            sderref

          • CryptoBadger says:

            It looks like you never created the mine_litecoins.sh script (step 6 in the guide). Please check to make sure that you’ve followed all of the steps carefully – if you skip any or make typos, things will not work properly.

  20. sderref says:

    Hello,
    many thanks to you advices.
    I went through again. Did all steps, according to your guide.
    Looked up this thread:
    https://forum.litecoin.net/index.php?topic=656.0
    I changed the currency to 1440.
    After reboot:
    sderref@sderref-MS-7693:~$ cd /home/sderref
    sderref@sderref-MS-7693:~$ ./mine_litecoins.sh
    ./mine_litecoins.sh: 5: cd: can’t cd to /home/[sderref]/cgminer-2.11.4-x86_64-built
    ./mine_litecoins.sh: 6: ./mine_litecoins.sh: ./cgminer: not found
    sderref@sderref-MS-7693:~$
    What do I miss?
    Regards,
    sderref

    • CryptoBadger says:

      There shouldn’t be any brackets around your username in your mine_litecoins.sh script. The line should read:

      cd /home/sderref/cgminer-2.11.4-x86_64-built

      NOT:

      cd /home/[sderref]/cgminer-2.11.4-x86_64-built

      I use the brackets to denote that you need to enter information specific to yourself; sorry if unclear. There are several other places in the guide where I have brackets around places you need to enter your own username and/or password – make sure you don’t actually include the brackets in those places.

  21. sderref says:

    Hi,
    this come up:
    sderref@sderref-MS-7693:~$ cd /home/sderref/cgminer-2.11.4-x86_64-built
    sderref@sderref-MS-7693:~/cgminer-2.11.4-x86_64-built$

    I think this still not good:D:D
    Regards,
    sderref

  22. Geertje123 says:

    I see the xubuntu loading screen, but then this pops up:

    “unable to find a medium containing a live file system”

    I wrote the iso file to my portable drive with the program they recommended here:
    http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

    I searched what the error meant on the internet but I only found that people using CD’s had it. What do I do?

    • CryptoBadger says:

      Are you installing from USB? If so, try moving the stick to a different USB port (eg: from a 3.0 port to a 2.0 port). Also make sure that in your BIOS, USB appears in the boot order list (put it first just to be sure).

      If you’re installing from CD, try changing your SATA mode in BIOS from IDE to AHCI, or vice versa.

  23. GEMROSE says:

    PLEASE HELP!

    I have an MSI 990FXA-GD80v2 mobo.
    Gigabyte 7970 ghz edition
    AMD Sempron 145
    8GB DDR3 RAM
    1200 watt Corsair AX1200

    I have successfully installed Xubuntu on a 16GB flash drive and it is running the OS great. However, that is it. I followed the guide “exactly” as it says and I can’t mine. I have reinstalled the OS 3 times and have started over the guide each time. It seems like everything works but cgminer will not start automatically or manually. It just says ./miner_launcher.sh: No such file or directory.

    Please help,
    GEMROSE

    • CryptoBadger says:

      If you type “ls” in your home directory, do you see miner_launcher.sh listed there? If not, you may have accidentally created your script somewhere else – make sure that you’re in your home directory (type “cd /home/[YOUR XUBUNTU USERNAME]” without the quotes & brackets), and then re-do step #7 in the guide.

      You may have done the same thing with your mine_litecoins.sh script as well – if it’s missing from your home directory you’ll need to repeat step #6, too.

      • GEMROSE says:

        I did another fresh install and I made sure I was in the home directory. Unfortunately it is doing almost the same thing. It is still not working and the mine_litecoins.sh & miner_launcher.sh are in the directory home/username. The one difference is, when I try to manually start it ./miner_launcher.sh, it asks for “Password” and I don’t remember it asking for that the last time. This is my first time doing Linux and I appreciate your help.

  24. Geertje123 says:

    I’ve installed Xubuntu now, but I don’t see a desktop. just a command prompt.
    Can I ask what program you used to write the image to your USB? Maybe the program I work with doesnt work.

  25. Glenn says:

    Cheers, Tho a rank novice, with your help I’m almost there! cgminer starts but can’t connect to a pool, and displays “pool O JSON stratum auth failed”.
    In my “nano mine_litecoins.sh”, is the line below which I lifted from the pool I joined, which I substituted for the one you gave that had coinotron in it.

    ./cgminer –scrypt -o stratum+tcp://stratum.give-me-ltc.com3334 -u [worker name] -p {my password] –shaders 1792 –intensity 10 –worksize 128 -g 1

    Thanks for your hard work helping so many of us. Will be buying you a beer soon!

    • CryptoBadger says:

      It looks like you’re missing a colon between “give-me-ltc.com” and “3334” – it should read “stratum+tcp://stratum.give-me-ltc.com:3334” (without the quotes).

Leave a Reply