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. mattkn says:

    Gents,

    I’ve gotten to the very end of this tutorial only for me to get ‘No such file or directory’ when I’m trying to launch cgminer manually ./miner_launch.sh

    So far everything has gone to plan with no obvious indication everything was about to go South. Is there an obvious fix or can someone sense something blatant that has happened? Be warned you will probably have to spoon feed it to me. I can feel N8’s anger building up already!

    Kind Regards.

    • mattkn says:

      Check fire! I’ve been a mong. Standby for more bone questions…

    • Vegim Begolli says:

      Simple. The file isn’t in your current directory.

      Type: ls -lrt

      This will give you all files in the current directory listed by date.

      Does your miner_launch.sh reside in this directory?

      And if it does, are you pointing the cgminer start line to the CORRECT directory on your machine?

    • Edwqardf says:

      mattkn,

      Try this: ./miner_launcher.sh

      you left off the “er” on launcher ( been there done that)

    • uberdag says:

      Linux is very pathway driven. Just like good ole DOS. Make sure your installing into the correct folders. If yoy stay connected the whole time instead of doing the ssh thing you get off pathway. I did this as well one time. And had to go back and edit the mining cobfig files with the correct pathways.

    • staffnsnake says:

      If you have followed cryptobadger’s directions exactly, then ./mine_litecoins.sh will start cgminer manually (not ./miner_launcher.sh), but it won’t link it to the cgm alias. To do that, first check the spelling of your miner_launcher.sh script, then in terminal type

      sudo reboot

      At this time, GO AND MAKE A COFFEE. When you are done doing that, ssh into your rig and type cgm. Then you see the miner working. You don’t need to ever type “./miner_launcher.sh” as that is a startup script.

      When you want to adjust settings, type Q to stop cgminer. Go back into

      sudo nano mine_litecoins.sh

      and adjust settings such as mem-clock or gpu-engine, remember to save before exiting nano. With each adjustment, manually run “./mine_litecoins.sh” to see the results. When you’re happy, reboot again and give it a few minutes without touching anything before checking with SSH and also log into your pool to verify that it is receiving data about 15 minutes later.

      I know you can adjust settings within cgminer for each card and then change the mine_litecoins.sh script later, but my cards are identical so I just do it in nano.

    • ezpacer says:

      Matt, did you exit cgminer directory(by typing “cd”)immediately after checking to see if it saw your GPU’s? If not, you may have done your nano files in cgminer instead of your home directory.

  2. mattkn says:

    Gents,

    I have another bone question. Can somebody please suggest why after typing “cgm” to launch cgminer remotely, I am getting “There is no screen to be attached matching cgm”

    And also when I try to launch cgminer manually after typing “./miner_launcher.sh” I am getting nothing after entering my password?

    Any words of encouragement, spoonfed of course would be greatly appreciated.

    Kind Regards,

    • Vegim says:

      Why are you typing cgm?

      Why don’t you start with the basics. Run ./cgminer -n

      What is your output?

    • Because screen won’t get attached to the alias or cgminer until the system reboots and runs the auto startup script that contains the commands in front of mine_litecoins.sh.

      • TommyJ says:

        Did you find the solution to the “no screen attached issue?”

        I’ve worked real hard to get to this point and am looking for the solution.

        This image comes up when I type ./mine_litecoins.sh

        http://imgur.com/yz4kjYN

        but ./miner_launcher does nothing.

        when I type cgm, the “no screen attached” issue still comes up.

        Please help!

  3. Patrick says:

    Hey guys!
    Trying to setup my first mining rig and ive gone through the tutorial pretty thoroughly.
    Ive skipped the headless part of the tutorial and have continued throught step 6. I cant seem to get CGminer to run even affter creating the propper nano, or by typing ./miner_launcher.sh into the terminal. Not sure if my files are in the wrong directory, because ive tried to keep everything inside of the home directory.

    WHATS WRONG!!!!

  4. xY94k6hN7T2F-LTC says:

    Fantastic guide. Thanks. Am having a problem, though and wanted to see if anyone else ran into the same.

    I am new to mining, but very experienced with computer hardware/software. Have been using linux since 2005.

    I bought two brand-new Asus Radeon R280x cards and setup the system with one card for starters. I am running Lubuntu 13.10 off a 32 GB Flash drive. The motherboard is an Asrock M3A770DE.

    The setup went smoothly, and within 2 hours I was mining at a rate of about 670/khs with some very minor tweaks . I did not overclock the card or system in any way. GPU temp was kept below 75, and I set cgminer to shut it down at 83 – was playing it very safe. It ran well with no issues for 3 days.

    Today, the internet was down for a bit, so I took the rig offline and decided to install the 2nd card. After installing the card, I noticed that on the login to lubuntu the display was formatted improperly…it seemed as though the desktop was too big for the monitor. (I am using one of the GPU’s for display and am outputting it thru an HDMI cable). After rebooting a few times and updating the ATI config the display problems resolved, though I did get a system problem report on login, which I ignored. I checked cgminer and found it saw both cards.

    Upon starting cgminer all hell broke loose. On the cgminer log screen almost every entry was “share is above target” After about 30 seconds there was a steady beeping coming from one of the GPUs inside the case. I shut cgminer and it stopped immediatley.

    I took out one card and restarted everything and found the same problem – every entry is “share is above target” and after about 30 seconds of run-time there is the steady beep. I swapped cards and have the same issue. I deleted cgminer entirley and re downloaded and installed – still the same. I tried to reinstall the ATI drivers and still no luck.

    Now, I am thinking there is some issue with the drivers when the second card was installed, and so am tempted to reinstall the whole system.

    Any suggestions?

    Thanks

    • Aurum says:

      That’s not an error just a report. Did you check with your mining pool to see what you were submitting? Do you have a high Diff set at your pool? If so, reduce it to 64 or 32.

  5. Kalavak says:

    [2014-01-04 02:09:08] CL Platform 0 vendor: Advanced Micro Devices, Inc.
    [2014-01-04 02:09:08] CL Platform 0 name: AMD Accelerated Parallel Processing
    [2014-01-04 02:09:08] CL Platform 0 version: OpenCL 1.2 AMD-APP (1214.3)
    [2014-01-04 02:09:08] Error -1: Getting Device IDs (num)
    [2014-01-04 02:09:08] clDevicesNum returned error, no GPUs usable
    [2014-01-04 02:09:08] 0 GPU devices max detected
    [2014-01-04 02:09:08] USB all: found 10 devices – listing known devices
    I’m getting this errror after I run cgminer. I do not have a 290x, and the 290x fix doesn’t work. Could someone please help.

    • stuck says:

      I cannot get past this part either.

      My email address is thibaut21 at gmail.

      Let me know your contact so if I find a fix I will email it to you

      If you get help and figure it out please email me. I greatly appreciate it.

      • l0r3zz says:

        Is X windows running on one of your “screens”, this is a requirement for cgminer to start up. If your not sure, connect a Display to the first card and check.

  6. stuck says:

    Begging for help, if anyone will walk through the problems I am having I will pay them the first 7 litecoin I get from my rig

    I would like to try and resolve via skype if possible or email

    my email address is thibaut21 at gmail.com

    Shoot me an email to work through the issue

    I think I have located the error but dont know how to fix it, it may have something to do with the libraries or linking them

    when I run aticonfig –lsa I get the following:
    * 0. 01:00.0 AMD Radeon R9 290 Series
    1. 04:00.0 AMD Radeon R9 290 Series
    2. 05:00.0 AMD Radeon R9 290 Series
    3. 06:00.0 AMD Radeon R9 290 Series

    * – Default adapter

    When I run aticonfig –adapter=all –odgt

    I get the following:

    ERROR – X needs to be running to perform AMD Overdrive(TM) commands

    So it looks like I have my hardware working but the software or drivers arent done right

    I would really really appreciate the help

  7. Eric says:

    I’ve had success in installing all the drivers,
    but when I check to see if cgminer recognizes my cards:
    ./cgminer -n
    I get bash: ./cgminer: No such file or directory
    please help, i’ve been stuck on this for days.

    • uberdag says:

      Your in the wrong folder… xubuntu is very path driven just like good ole dos

      • Eric says:

        sorry,I’m new to this.How do I get to the right folder? I figured I would be in the correct folder since I’m following the steps. what i did in terminal:

        cd Downloads

        tar xvf cgminer-3.7.2-x86_64-built.tar.bz2

        cd cgminer-3.7.2-x86_64-built

        ./cgminer -n

        Thats when I get

        bash: ./cgminer: No such file or directory

      • Eric says:

        ok got into the right folder. Now I have a new problem:
        ./cgminer: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

        Wtf do I do now?

        • Edwardf says:

          Eric,

          Go to Part 2: Linux Setup, read Step 5

          • Eric says:

            Ok,I’ve done all of step 5, but still gettting:
            ./cgminer: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

          • Edwardf says:

            Eric, Did you try bother of the fixes listed in step 5?

            Does your entry look like this or different?

            cd cgminer-3.7.2-x86_64-built
            export DISPLAY=:0
            export GPU_USE_SYNC_OBJECTS=1
            ./cgminer -n

          • Eric says:

            I tried everything in step 5. My terminal looks like this:
            etang@etang:~$ cd Downloads
            etang@etang:~/Downloads$ cd cgminer-3.7.2-x86_64-built
            etang@etang:~/Downloads/cgminer-3.7.2-x86_64-built$ export DISPLAY=:0
            etang@etang:~/Downloads/cgminer-3.7.2-x86_64-built$ export GPU_USE_SYNC_OBJECTS=1
            etang@etang:~/Downloads/cgminer-3.7.2-x86_64-built$ ./cgminer -n
            ./cgminer: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

          • Edwardf says:

            Eric,
            That is totally different from my setup so I am afraid I am not much help to you. I hope someone will pick up on this and give you some answers.

            My setup is ASRock 970EX4 with 3 Sapphire Radion HD 7950 cards. I followed the instructions exactly and after several mistakes finally got everything to work.

          • dan says:

            Read the faq

          • Eric says:

            Wow, answer was in the faqs. Thanks for pointing it out .

        • ezpacer says:

          Eric,
          Your problem may be in using the “cd downloads” directory. Try doing everything in the “etang@etang” directory (your home directory).
          Do your “cd cgminer-3.7.2-x86_64-built” command to go into your cgminer directory only to check if cgminer detects your gpu’s, Then type “cd” to exit cgminer and back into your home directory to build all files!
          Good Luck!

  8. PeerMedia says:

    I installed Xubuntu 13.04 as per the guide instructions but I find I often lose video feed to my monitor when 2+ monitors plugged in. I can SSH into the rig fine, but I need either VNC or RDC to work, kind of like what BAMT does. Does anyone know what package I need to install to get a visual XWindows type setup going on Xubuntu?

    Thank you!

  9. Anon says:

    You should add a part where you explain how to setup a static IP for the linux box. Otherwise, it will get reassigned sometimes.

  10. nico says:

    Hi Guys,

    I have an issue on step 5:

    nicola@nicola-desktop:~$ cd cgminer-2.11.4-x86_64-built
    nicola@nicola-desktop:~/cgminer-2.11.4-x86_64-built$ export DISPLAY=:0
    nicola@nicola-desktop:~/cgminer-2.11.4-x86_64-built$ export GPU_USE_SYNC_OBJECTS=1
    nicola@nicola-desktop:~/cgminer-2.11.4-x86_64-built$ ./cgminer -n
    bash: ./cgminer : fichier binaire impossible à lancer

    Do you know what’s wrong?

  11. CatLikeFelix says:

    Has anyone tried a setup using Linux Mint instead of Xubuntu? A friend says it’s much ‘lighter’ than Xubuntu and would suit running off a USB stick better. Is he talking BS?

    • Running lighter is always a great optimization technique but, because the work is being done by the GPUs and not the OS itself I don’t see a huge performance increase happening based on OS choice.

    • staffnsnake says:

      Same same. Mint cinnamon is more heavy-weight than xubuntu but the xfce distro of Mint is about as light-weight, but has more media codecs built-in, which you don’t need for mining. I have xubuntu 13.10 on my rigs and I play around with 32-bit Mint cinnamon on a two year-old Asus Eee PC as a learning aid for Linux.

  12. Ash says:

    Maybe this tut is out of date or maybe I just can’t find out what’s going wrong. I tried to follow the tut exactly and got an error when trying to install drivers:
    E: Unable to locate package fglrx-…. etc. for all packages.

    So I checked on settings for Software Sources and changed “Source code->Download from: Server for United States” to “Main Server”, which seemed to resolve my location issues, however, more errors on the way.

    Now I’m getting unmet dependencies (lib32gcc1, libc6-i386 and xorg-video-abi-12) for fglrx-updates, and when I “sudo apt-get install” those dependencies, it says: gcc-4.7-base (= 4.7.1-7ubuntu1) but 4.7.2-2ubuntu1 is to be installed.

    The tut says Xubuntu Desktop x64 v12.10 which is what I’m running so I don’t see why any of the instructions would/should conflict, but it sounds like the packages in the tut are not the correct ones for this image (distro*?) of Xubuntu. Any help would be greatly appreciated.

    • Vegim says:

      Which cards are you using? If you’re using any of the R9 series, this guide is definitely out of date for you. I don’t want to take the spotlight from here but I do want people to be informed. Check out a detailed guide I wrote here http://bit.ly/JXr52p. Getting a lot of good feedback about it.

  13. CatLikeFelix says:

    Anyone know of a good alternative to Putty (for remote access) for use on a Mac?

    Cheers.

    • KC Lust says:

      Cat,
      Just use the command window. You will then type “SSH 0.0.0.0 (using your miner’s address in place of the 0’s). Then type your miner’s login name, then the password. If you are doing it from your home network, it will be something like 192.168.0.2. If you are trying to access from across the net, you will need to forward port 22 and know your actual ip address. Cryptobadger discusses this here: http://www.cryptobadger.com/setting-up-your-new-mining-rig/.
      Scroll down to the SSH part, but use your command window from your mac instead of Putty.
      Caution: Be sure to use a strong Xubuntu password for your login. If your port is open, anyone can access your rig if they can crack your password.

      • Vegim says:

        Not the command window, open up Terminal.

        Sarch for “Terminal” in your spotlight or go to /Applications/Terminal

        Then type ssh user@192.168.0.X where 192.168.0.X is your miner’s IP address.

        • KC Lust says:

          Sorry for the mistake. I’m at work and use a mac at home, of course forgetting Terminal instead of command. Typical windows/mac screwup for me. 🙂

          • CatLikeFelix says:

            I knew what you meant 😉 cheers

            So can you do the same with Windows (from the command prompt) ?

          • Vegim says:

            Can not do the same from Windows. If you’re looking for some similar functionality, download cygwin. It is a very, very nice suite of unix based tools for Windows.

            Putty for Windows FTW 🙂

          • KC Lust says:

            No, for Windows, use puTTY. That’s what I use to access the home computer from work. Works like a charm so far, except when my router changes IP (during a reboot or such) and I have to reconfigure my ssh settings. I need to look into an online static IP setup.

            The best part (for me) is I can access and change settings from work when I see my cards are getting too hot (I live near Austin – Summmers are HELL here). I can also reboot if necessary.

  14. Umair says:

    So i followed this guide to build a mining rig with the same hardware except different graphic cards.

    I am using 2 Radeon HD 5850 cards and my configuration is:

    ./cgminer –scrypt -o http://ltc-eu.give-me-coins.com:3334 -u user.worker1 -p password -I18 -w 256 –thread-concurrency 1536 -d 0,1 -g1

    This gives me an average hashrate of 600 KHs
    but with a lot of HW errors.

    My output is:

    (5s): 600.2K (avg): 602.4Kh/s | A:16 R:0 HW:4100 WU: 2.8/m

    And I dont see any progress by my worker on the pool page.

    I have tried the following to fix the issue:

    * When i decrease the intensity to 10, i get HW =2, but a hash rate of only 120 KHs (65 Khs for each card) (The pool shows my workers activity as 120 KHs)
    * I tried changing the thread concurrency, but it seems if i put it to a higher number, cgminer crashes.

    This card should give me a stable hash of around 300 Khs.
    I am not sure what am i missing here.

    Some guidance would sure be appreciated.
    cgminer version: 3.7.2

    • uberdag says:

      Check hardware on litecoin wiki guide for setup… if I remember intensity of 13 on alot… but keep trying different levels. If 18 was bad try 17 and so on

  15. Surveyor98 says:

    HI guys,
    I’ve run into an issue that, while not critical, is nagging. The miner is running, everything is working. 1.95mH/s, so I’m good to go there. The problem I’m having is that for some reason, in my Mac, using Terminal, Ctrl-A D is not working. What’s weird is it USED to work before I reinstalled the OS (horrible GPU accident – another story).
    Symptoms are: Start Terminal, log in to the miner box. Type CGM and view my miner status. When finished, Type Ctrl-A, Ctrl-D. No response. I can’t detach the terminal. If I simply close the session, CGminer quits (although the fans on the GPU’s remain at a high speed). If I try cgm again, there is no instance of CGminer running. I have to start my ./mine_litecoins.sh again.

    So…stupid question: What’s up with this? I did notice I have a # symbol as the very first character in my mine_litecoins.sh file. Would that be a problem?

  16. Phil says:

    Xubuntu hates me.

    But first, N8c, your snark was not lost on me… keep it up! 😀

    Started messing with a Xubuntu (13.10) rig last night. fglrx hates on R9 cards. So I uninstalled to put AMDs “proprietary” stuff and started getting “OD not supported” errors when verifying the install. To top it off, I had to reflash the card when I replaced it on the Win7 Rig (new cards are still en route) because Xubuntu (for the life of me can’t figure out how) cranked the card down to 150/150MHz and 900mV specs!!

    So! After about 2 hours freezing in the basement I saw Vegim’s link specifically for R9 rigs. I’m going to re-install Xubuntu and try that one… if not, I’m getting a copy of Win8. I’ve already got 2 desktop OSs rolling around in this cranium… I don’t need a third.

  17. tnm says:

    is it possible to build two or more rigs and network them together to mine the same pool as one rig?

    • N8c says:

      No.

      You can only ever build one single rig.
      Also you can only direct one single GPU’s work to one pool at a time.

      Warning: brain.exe not found.

  18. tnm says:

    is it possible to link two rigs to mine the same pool?

    • staffnsnake says:

      I have two rigs mining the same pool. Just give them the same scripts. No need to “network” them. I used to have different pools on each rig with mutual failovers, but at the moment my original pool (ltcrabbit) has announced that it intends to minr other coins with my gear and pay me in ltc, which doesn’t sound all that legit, so now I’m on wemineltc for both.

      • tnm says:

        Thank you for the info and response, staffnsnake. This will help i’m sure. If i set it up the way you suggested will the two miners act as one. just curious.

        • Staffnsnake says:

          In so far as both rigs work on the same pool, they both work for you “as one”. It makes little difference really as you should be setting up failover pools in case one pool goes down.

  19. Robbo says:

    Hi Guys,

    I’ve got to the very last line of scrypt on stage: 8:

    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’

    Only problem is that I can’t find the line “# enable programmable completion…” to enter the text.

    Can someone either tell me what line it should come underneath so I can try it that way? Or can someone suggest what has gone wrong?

    Many Thanks.

    • Robbo says:

      Found it. This is a bit embarrassing. There might not be any more posts under the name Robbo from now on 😉

      • Edwardf says:

        Hi Robo,
        Don’t worry about it. It took me a while to realize that I had to do
        crl + V to scroll to the bottom of the file to find that line 🙂

  20. tate says:

    I’m really stumped– I followed this guide perfectly, but initially had only one card (Gigabyte 7950) running at 525Kh/s

    Now I’ve added two more cards (a Gigabyte 7970 and Asus 7970), followed the instructions, and my average across all cards is still only 525Kh/s.

    So…

    * If I disable two cards (any two), my hash rate becomes 525Kh/s
    * If I disable one card only, my hash rate across both (summed) is 525Kh/s
    * And running all three at once, I can’t get more than 525Kh/s.

    I’m stumped by this, Cryptobadger– and ideas why this is happening?

    • Edwardf says:

      tate: did you remember to do this when you added the additional cards?

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

      • tate says:

        I actually did try that, and even re-installing the open-source drivers.

        It turns out the open-source drivers weren’t recognizing the 7970s, so I installed the proprietary ones and everything’s working great now.

        I wrote a comment reply to myself about it.

    • staffnsnake says:

      Did you re-run the aticonfig initial command when you installed the new cards? It’s near the top of the Linux page of the guide, where one enters the AMD drivers.

      • tate says:

        I actually did try that, and even re-installing the open-source drivers.

        It turns out the open-source drivers weren’t recognizing the 7970s, so I installed the proprietary ones and everything’s working great now.

        I wrote a comment reply to myself about it.

    • tate says:

      So I actually did figure out what was going on though–

      Running ./cgminer -n, I discovered that only the primary GPU was being properly recognized.

      OpenCL wasn’t recognizing the non 7950 (the two 7970) GPUs at all, despite re-adding them via the commands above, or re-installing the drivers listed here.

      I discovered that there’s actually two types of drivers for the Radeons– the open source ones, listed on this page via “apt-get”, and the proprietary driver available directly from AMD / ATI.

      Turns out you may need the proprietary ones if you have 7970s; I installed those, and now everything is fixed.

      So to recap:

      0. My hash rate for 3 cards or two cards was exactly the same as one card (everything was being “averaged” to 525Kh/s

      1. Discovered that the open-source drivers here (the ones via “apt-get”) worked for the 7950, but not the 7970s

      2. I completely uninstalled the open-source drivers via this command:

      sudo apt-get remove –purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

      3. I downloaded and extracted the proprietary driver (the “release” one, not the “beta” one) here:

      http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64

      4. chmod’d and installed their driver:

      chmod 775 amd-catalyst-13.12-linux-x86.x86_64.run
      ./amd-catalyst-13.12-linux-x86.x86_64.run

      5. Rebooted, and now all cards (yet to be fully tweaked) are running between 580Kh/s to 615Kh/s each.

  21. TehJackal says:

    I’ve been using this setup on 4 rigs now, but ran into some problems.

    1. Auto Launcher is not working for some strange reason. I’m not worried about typo’s I copy pasted everything into terminal. I’ve also checked it several times.

    2. I went to check on my miners this morning to find that they have all went down because of some error. Now I am a complete n00b. I don’t know linux. I’ve tried doing some research but I don’t understand any of this stuff really to figure out what I’m looking at.

    These are the error’s im getting when I run ./mine_litecoins.sh

    [2014-01-11 12:50:54] GPU 0 failure, disabling!
    [2014-01-11 12:50:54] Thread 0 being disabled
    [2014-01-11 12:50:54] Error -5: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2014-01-11 12:50:54] GPU 2 failure, disabling!
    [2014-01-11 12:50:54] Thread 4 being disabled
    [2014-01-11 12:50:54] Error -5: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2014-01-11 12:50:54] GPU 1 failure, disabling!
    [2014-01-11 12:50:54] Thread 2 being disabled
    [2014-01-11 12:50:54] Error -5: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2014-01-11 12:50:54] GPU 2 failure, disabling!
    [2014-01-11 12:50:54] Thread 5 being disabled

    Any thoughts?

  22. zerocoin says:

    thanks for this guide.
    2 questions:
    1. considering this is a hobby and won’t give you your money back, why not go for “compromise card”, e.g.

    http://www.amazon.com/Sapphire-Radeon-PCI-Express-Graphics-11216-02-20G/dp/B00FLMKI9A
    (a R7 240) which should give around 3-400 kH/s at 1/4 or less of the price?

    2. If I already have USB block eruptors (in another setting so far) should be no problem to use them in this rig as well? Esp/even with Linux?

  23. John says:

    I’ve been searching for days for a solution to this problem, but can’t find anyone else that has had this issue.

    I can run 1 card fine, but when I try to run 2 cards (identical cards), the hashrate drops to 15 kh/s for each card and changing intensity/threads or any setting doesn’t help. I’ve also noticed that on the second card the RPM is considerably lower, the temperature never goes above 30.0 C, and the voltage is only about 0.8 (whereas the second card voltage is about 1.5).

    I thought it was a weak power supply, but I tried powering the second card with a separate PSU and the problem remained.

    My system:

    Corsair 860W PSU
    Two 7870 Cards
    4 GB System RAM

    Any ideas? Thanks!

    • John says:

      Mistyped something above regarding the voltage. It should read: (whereas the first card voltage is about 1.5).

    • tate says:

      I had a similar scenario, and discovered that it was because the open-source drivers weren’t properly discovering the GPUs.

      If you run ./cgminer -n and have any errors, this is likely the case with you too.

      I wrote a comment reply to myself elsewhere in on this page on how to install the proprietary drivers; check it out.

    • John says:

      Ok my bad. Solved the problem with a dummy plug.

      I didn’t think that was the problem because I thought “idle” would have meant it was totally shut down.

  24. Edwardf says:

    Anybody!
    I have a new problem: Beginning to set up my second rig, installed Xubuntu 12.10 with xubuntu upgrades for 12.10 only, not 13.04. When I tried to install amd drivers with:
    Sudo apt-get install fglrx-updates fglrx-amdcccle-updates fglrx-updates-dev
    The process began then toward the end it gave this error message:

    Errors were encountered while processing:
    /var/cache/apt/archives/fglrx-amdcccle-pdates_2%3a9.000_Oubuntu3_amd64_deb
    E: sub-process /usr/bin/dpkg returned eror code (1)

    Anyone had this experience and find a solution???

    • Edwardf says:

      I think I solved my own problem. I read some information from Xubuntu online help and the Xubuntu Forum. I discovered that it is possible to go into Xubuntu Menu>Settings>Software Updates to get Additional Drivers for AMD cards. Also I went online to AMD and downloaded the proprietary drivers for my HD 7950 cards and saved the file in the Xubuntu Downloads folder.
      FIRST THE FGLRX DOWNLOADS THAT WERE PARTIALLY INSTALLED MUST BE REMOVED USING THIS:
      sudo apt-get remove –purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

      After the package was removed then I used the Applications>Software Updates (or can use Setting>Software Updates) and when it tells you that all software is up to date…wait a second and a window will open. At the upper far Right Side you will see Additional Drivers. Click on it and a window will open. You can select from there.

      To be double sure I copied the extracted driver file from I had extracted into Downloads and pasted it a terminal session.

      I then completed the set up following the instructions in CrytoBadger for Linux setup exactly as I did for my first rig and “WALA” it is up and running and mining ltc. Only two cards now but will add the 3rd card tomorrow when UPS comes 🙂

    • Lele says:

      TYVM you’ve solved all my prmlbeos

  25. Al says:

    Hi there,

    I’ve gotten as far as Step 5 but am having trouble. Terminal doesn’t respond when I type EXPORT=:0 and when I try to run ./cgminer -n it says ‘cannot execute binary file’

    I’ve checked that I’m running 64bit xubuntu and it corresponds with the version, so what could be wrong?

    • staffnsnake says:

      Linux commands are case-sensitive.

      export should be lower case, if that isn’t what you did (you had it in caps in our question).

      Maybe that will help, but I’m a relative noob also.

Leave a Reply