How To Mine Zcash with Nvidia GPUssteemCreated with Sketch.

in bitcoin •  7 years ago  (edited)

IMG_4049.PNG
Since cryptocurrencies have risen exponentially in the past few months people want in. One of the best ways to make money with currencies like Ethereum and Bitcoin is to 'mine' them. When you mine a cryptocurrency you are running a program on your computer to use your computers computing power on the network. Whenever your computer solves a piece of the puzzle, a block in the blockchain, your miner is rewarded. There are two main ways to mine:

  1. Rent out miners. I will not be covering this topic today.
  2. Use your computer as a miner.



I will go through start to finish on how to set up a Zcash miner on Ubuntu. This is because if you are mining with an Nvidia Graphics card the windows drivers are a little wonky so you will be limiting your hashrate. For me I have 2 GTX 980ti's in my gaming computer. When I mine Ethereum on windows I get around 5 Mh/s and when I mine on Ubuntu I get 40 Mh/s. For those of you with gaming computers this can be a nice passive source of income while you aren't playing games. Also AMD GPUs tend to be better at mining Ethereum, but Nvidia GPUs are better at mining Zcash. So if you have an Nvidia GPU I would suggest to mine Zcash. I do. If you have AMD GPU's I would suggest looking at this guide here.

Step 1: Make room on your PC

If you want to dual-boot and not just clean install you will need this step. Right click on the windows start menu, on the bottom left and select 'Disk Management'. Select your main HDD or SSD that you want to dual boot from, right click on it and press 'Shrink'. I suggest using at least 32gb just to be safe.

Step 2: Install Ubuntu 14.04

You can either dual boot your computer or run a clean install. To do this you will need a USB drive. Download the Linux Live application.
Linux Live
And you will need to download the Ubuntu 14.04 iso.
Ubuntu 14.04 iso
Once you have these downloaded open up Linux Live, select your usb you want to use and select the Ubuntu 14.04 iso you just downloaded. Then press the lightning button. Once it is done reboot your PC, and boot into the BIOS. You can usually do this by pressing F2 or F12 when the computer is booting up. Once you are here select 'Boot Menu' and select your USB drive. From here it is pretty self explanatory.

Step 3: Get a Zcash Wallet

Sign up here
Once you've made this Wallet get your public address so your miner will know where to point to.
Here is some additional info though I don't know if it is necessary.

Step 4: Download Nvidia Cuda

Cuda Download

Step 5: Download and Install dependencies

Now I will say I know how to use Linux and I have built quite a few computers with this OS, but this is just a list of dependencies that if I run all of them I don't have any problems. Some of them might not be needed, but they won't hurt. You will want to open your terminal by pressing 'Ctrl+Alt+T', and copy and paste these lines into the terminal and press enter. To paste into the terminal you can not just press 'Ctrl+V' you need to press 'Ctrl+Shift+V'. And if for some reason you need to kill a process that is running in your terminal you need to press 'Ctrl+C'. So here are all the dependencies, this is easily the longest part of the tutorial.

First we will need to set up a root password. To do this:
sudo passwd root
Then type your desired password.
Now to sign in as root:
su
Now to install all the dependencies:

sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse
sudo apt-get update
sudo apt install ocl-icd-opencl-dev
sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential
sudo apt-get install automake libtool make gcc
sudo apt-get install libjansson-dev
sudo apt-get update
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get upgrade

sudo apt-get purge nvidia-*
sudo apt-get purge nvidia-cuda*
sudo update-initramfs -u
sudo apt-get install libopenblas-dev liblapack-dev
sudo apt-get install linux-image-generic linux-image-extra-virtual
sudo apt-get install linux-source linux-headers-generic
sudo apt-get install nvidia-common nvidia-prime nvidia-settings
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-375

sudo apt-get install libglu1-mesa libxi-dev libxmu-dev -y
sudo apt-get — yes install build-essential
sudo apt-get install python-pip python-dev -y
sudo apt-get install python-numpy python-scipy -y
sudo apt-get install libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev
sudo apt-get install apt-file && apt-file update

Now install Cuda.
Find the place you installed Cuda and navigate to it. To do this it is easiest to download it and drag it into your home folder. To do this press the file cabinet at the top left of the screen. It should open up to the desired folder. You should see icons like Desktop, Documents, Downloads, etc. Now just drag your Cuda download here.
Go back to the command prompt and put in these lines substituting your Cuda version as necessary.

sudo apt-get install build-essential
sudo chmod +x cuda_8.0.61_375.26_linux.run
./cuda_8.0.61_375.26_linux.run --driver --silent
./cuda_8.0.61_375.26_linux.run --toolkit --silent
./cuda_8.0.61_375.26_linux.run --samples --silent

Now we just have a few more dependencies to install.

sudo apt-get update

Step 6: Download Zcash Miner for Linux

Zcash Miner

To do this we don't want to be a super user so in the terminal type

exit

And now we can extract the tarball.

tar -xzf ZcashMinerFileName.tar.gz

Step 7: Go through the readme file

Step 8: Edit the start file

Go in to your extracted Zcash file and find the 'start.sh' file. If it doesn't have one make one. Select it, right click on it and click 'Edit'. Once you are here you will need to delete the contents in it and paste this with your addresses and press save.

sudo ./miner --server us1-zcash.flypool.org --user t1R4jPCmBof2tGBjPPEvG19Lsno5erhAkUw.rig01 --pass x --port 3333 --cuda_devices 0 1 2 3

Step 8: Start your miner

To see all the directories in your current location type 'ls'. I personally like to change the name of my zcash directory in the home folder to 'zcash' just so it's shorter. You can do this by selecting the directory you want to rename and pressing 'F2'. Now we will need to change directories to the zcash directory. So type in the terminal

cd zcash

Now we need make the 'start.sh' file executable, to do this type:
chmod +x start.sh

Now me personally I am a little superstittious when it comes to running things and I for some reason like to run my mining programs a super user. This will be a little redundant, but this is just how I do it.

su
Type in your password
sudo ./start.sh

Congratulations!! You are now mining Zcash!

If you have any questions feel free to ask me. I'll help out as much as I can.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I think nowadays altcoin mining become faded. Since mining is not a good solution for scaling up the altcoin. The altcoin is going to change from POW to POs. And there are more and more ICO with fixed amount of tokens. So the future of mining is not so optimistic...

Funny how all your comments have exactly 16 upvotes all from the same people. Someone has 16 accounts :)

How much can be earned depending on hash rate? DO you have to use Ubuntu. I have windows 10 and two GPUs on an Aorus X7 Pro which comes with an Nvidia graphics card. I was trying to mine ETH and I found it to be very taxing on my computer and due to the fact I had Windows 10, there was a bottleneck issue where it mines at a slower hash rate than it would if I used Windows 7. Does the same apply to Zcash? Does this sound familiar?

I am new in here folk. I am just starting mining with a i7, gtx 780ti, 16g. I am no able to set my computer like this it reply:
Driver: installation failed
Toolkit: installation skipped
samples: installation skipped
I am not skilled to solve it yet.
anobody could help me with it? tks

I think the Nvidia bottle neck applies to anything you mine on Windows. It has to do with the recent Nvidia drivers. That's why I suggest ubuntu. Now I'm not for sure on Windows 7 because I only use Windows 10 and Ubuntu. If you find something out let me know!

The reason I mentioned Windows 7 is because I found that the hashrate goes from 4mhz to 24 mhz when you use Windows 7 or downgrade the Nvidia driver version.

Yeah, see I tried to downgrade my drivers, but I still had a really low hashrate. That's why I just dual boot into ubuntu. I feel like I have heard of Windows 7 being fine though.

zcash incresed a lot miners should be earninga lot with that.

Great post! I've been mining Zclassic for the past week and have been getting great results as well! I'll dedicate my next mining rig to Zcash for their great resilience in the industry.
Please upvote,reply,resteem and follow @victorvazco , thanks, you're awesome!

How many Zcash would one expect to mine in a day? with GeForce GTX 950

Since it's older it isn't as fast, but you'd be making around $1.50 a day.

Can I point the miner to my Zcash deposit address on my Poloniex account instead of using the ZCash wallet you've linked?

You could, but I wouldn't really recommend that. You can't point to it if the address starts with z though

Good post, I'm using NiceHash mining Zcash with my nVIDIA 1060 - I get 254 Sols ~ 3.6 $ / day.

Yeah, nicehash can be pretty profitable!

Interesting blog. I was about to post a similair post. Buy and hold for the upcoming 3 years and the blockchain market will find it's way. I was researching a way to do better investment analysis on the current cryptos. I was wondering if anyone of you uses: https://www.coincheckup.com Since I use this site I make so much less basic investment mistakes.

I really like using EthOS over simple mining cause you can actually somewhat use LXDE as an operating system. The problem with EthOS is the limited number of mining programs you can run and the limited amount of packages you can install (instead of apt-get you have to use apt-get-ubuntu and about 90% of packages won't download or install, and if they do you might have broken EthOS.)

I think I'm ready to start building a rig operating system from a stock OS. I'll be using lubuntu (my pers fav). MIning rigs make the best home computers I have my smallest rig ( 5 x 1070 Founder edition) in my living room. I hope I get everything running smoothly so I can go ham on packages and running nodes.

Hi.. Need some help.. I have [HP Pavilion Notebook 15-ab055tx](https://support.hp.com/my-en/document/c04 731184) with NVIDIA GeForce 940M (2 GB DDR3L dedicated) Graphics...Do you think it's possible mining Zcash In this laptop..