How to run Litecoin mining on Windows with a GPU with CGMiner

How to run Litecoin mining on Windows with a GPU with CGMiner

 

1) Download CGMiner 3.7.2 here:

http://cryptomining-blog.com/wp-content/download/cgminer-3.7.2-windows.rar

(If that link becomes dead, please contact me and I’ll update the blog with a new reference or self hosted copy.)

It’s important that you use CGMiner version 3.7.2 as that is the last version before it stopped supporting GPU mining for LiteCoin.

 

2) Extract the Rar file for CgMiner anywhere on your Windows computer.

 

3) Setup a LiteCoin mining pool account. I have used both: give-me-coins.com and litecoinpool.org – They both worked fine and seem legit. Create an account and ensure you have at least one worker setup.

 

4) Setup OpenCL or CUDA for your computer’s GPU. I had already done this as part of a previous article where I setup my computer for Windows GPU processing. CUDA is specific to NVidia cards, and NVidia cards can also use OpenCL. Setting up OpenCL (or CUDA) is pretty specific to the exact GPU you are using, so I can’t give you specific instructions on those details.

 

5) Run CGMiner by starting CGMiner.exe. On a command line run CGMiner.exe like this:

cgminer.exe -d 0 --scrypt -o http://ltc.give-me-coins.com:3333 -u StyleMyImage.blog -p 123456 --thread-concurrency 6400 -g 1 -w 128 -I 12
  1. The –thread-concurrency should be a multiple of your GPU’s shader count. Mine is 640 shaders, hence my –thread-concurrency set to 6400
  2. The “-a scrypt” tells minerd to use the LiteCoin hashing algorithm.
  3. The “ltc.give-me-coins.com:3333” is the pool mining address for Give-Me-Coins.com
  4. The “-d 0” indicates to use the GPU device with address 0.
  5. The “-u StyleMyImage.blog -p 123456” are the user and password for your mining worker. You can add more workers, change names, and change passwords through your mining pool’s dashboard and portal controls.

An example for running cgminer.exe to litecoinpool.org would look like this:

cgminer.exe -d 0 --scrypt -o http://us.litecoinpool.org:3333 -u Mandelhoff.blog -p 123456 --thread-concurrency 6400 -g 1 -w 128 -I 12

 

That’s everything for mining Litecoin with your GPU on Windows using CGMiner. Enjoy!

LiteCoin donations welcome at address: LT3TrMdTjMYVXqKdpMPDxTVKVG3S2Dp6as

Setup Ethereum Mining on Ubuntu in Azure – Part 2

Setup Ethereum Mining on Ubuntu in Azure – Part 2

Part 2 (this article) will specifically detail how to:

  1. Install GPU drivers for your Ubuntu instance with a NVIDIA M60 or K80 GPU cards.
  2. Install and run an Ethereum miner (called ethminer) using your GPU and send your profits to your account address.

(My address is 0xB82adE3cEEE35afcF3415afE983d3E14218A41c3, and Ethereum donations can be sent there if you enjoy this article.)

First, spin up an Azure instance with Ubuntu 16. When you pick the instance size, be sure to pick either the NV6 or NC6 sizes that have a GPU attached. (You could pick the larger NV or NC Azure instances too with multiple GPUs attached if you want.)

Warning: Be sure to use Ubuntu 16 and not Ubuntu 14 as the drivers are different.

 

1) After your Ubuntu 16 Azure NC or NV instance is created, login with PuTTY and verify your GPU is available by running this command:

lspci

2) Next, run these update commands:

sudo apt-get update

sudo apt-get upgrade -y

sudo apt-get dist-upgrade -y

sudo apt-get install build-essential ubuntu-desktop -y

3) Next, disable the Nouveau kernel driver, which does not work with the NVIDIA driver. (Only use the NVIDIA driver on NV VMs.) Create a file in /etc/modprobe.dnamed nouveau.conf with the following contents:

blacklist nouveau

blacklist lbm-nouveau

4) Exit PuTTY and reboot your VM via the Azure portal.

 

5) After your VM reboots, log back in to PuTTY and run these commands: (Click “Yes” or “I agree” to the default prompts.)

wget -O NVIDIA-Linux-x86_64-367.106-grid.run https://go.microsoft.com/fwlink/?linkid=849941  

chmod +x NVIDIA-Linux-x86_64-367.106-grid.run

sudo ./NVIDIA-Linux-x86_64-367.106-grid.run

 

6) After that install finishes, copy /etc/nvidia/gridd.conf.template to a new file gridd.conf at location /etc/nvidia/

sudo cp /etc/nvidia/gridd.conf.template /etc/nvidia/gridd.conf

 

7) Add this line to this file: /etc/nvidia/gridd.conf

IgnoreSP=TRUE

8) Exit PuTTY and reboot your VM via the Azure portal.

 

9) After your VM reboots, verify the driver installs by running this command:

nvidia-smi

10) Next, we’ll install the CUDA drivers. Download and install the CUDA drivers with these commands:

CUDA_REPO_PKG=cuda-repo-ubuntu1604_8.0.61-1_amd64.deb

wget -O /tmp/${CUDA_REPO_PKG} http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} 

sudo dpkg -i /tmp/${CUDA_REPO_PKG}

rm -f /tmp/${CUDA_REPO_PKG}

sudo apt-get update

sudo apt-get install cuda-drivers

11) Give your VM one last reboot and verifiy installation with the nvidia-smi command again:

 

12) Next, download and unzip the Ethminer release with these commands:

wget https://github.com/ethereum-mining/ethminer/releases/download/v0.12.0.dev1/ethminer-0.12.0.dev1-Linux.tar.gz

tar -xvzf ethminer-0.12.0.dev1-Linux.tar.gz

 

13) That creates an ethminer folder that you’ll have to change directory into with a a cd command. After you find the ethminer executable, you can kick it off like this:

screen -S ethminer ethminer --farm-recheck 2000 -G -S us1.ethermine.org:4444 -FS eu1.ethermine.org:4444 -O 0xB82adE3cEEE35afcF3415afE983d3E14218A41c3.RigBlogPost

The above command will kick off ethminer using a mining pool at Ethermine.org, which I personally use. Ethminer console output looks like this:

Enjoy Ethereum Mining for fun and profit!