I have these old Nvidia graphics cards, namely a Geforce 210 and a GT 240M sitting around doing nothing, and I wondered if I could put them to work mining Monero. The short answer is yes; the long answer is that it’s probably not worthwhile unless you have a much more powerful card like maybe a GTX 280 or something. In any case, below are the steps required to pull it off.

These instructions are assuming you’re trying to mine on a pre-Fermi series Nvidia card, such as 8xxx, 9xxx, or 2xx series. If you’re using a newer card, just follow the usual steps for mining with xmr-stak.

First, you’ll need a machine running Lubuntu 16.04 64-bit. I suppose this isn’t strictly required, but it’s what I used. Install the proprietary Nvidia graphics drivers and a handful of other packages with the following commands:

sudo apt install nvidia-340 nvidia-340-dev nvidia-opencl-icd-340 nvidia-modprobe nvidia-opencl-dev clinfo

Reboot after installing these packages.

Clone the xmr-stak repository to your local machine and checkout the v2.1.0 branch. This is the software we’ll use for mining. You can clone it (assuming you have git installed) with:

git clone https://github.com/fireice-uk/xmr-stak
cd xmr-stak
git checkout tags/v2.1.0

Next you’ll need to compile it with the following commands:

cmake . -DCUDA_ENABLE=OFF -DXMR-STAK_COMPILE=generic
make

The -DXMR-STAK_COMPILE=generic flag forces xmr-stak to use only OpenCL 1.2, since 2.0 is not supported on these old Nvidia cards.

You should be able to run the miner now by executing bin/xmr-stak. We’re not done yet though, this is just to setup your initial configuration file. After running and entering your wallet address and pool information, quit the miner. Edit the cpu.txt file and disable CPU mining. You can just replace the file contents with this if you aren’t sure:

"cpu_threads_conf" :
[
/* no cpu config */
],

Now we’re going to create an amd.txt file. This is because the miner is designed so that AMD cards run the OpenCL code, and Nvidia cards run CUDA code. These old cards aren’t supported by the CUDA version used in xmr-stak, so we’re going to force them to run the OpenCL mining code by telling the miner we have an AMD card. Put this in your amd.txt file as a baseline configuration:

"gpu_threads_conf" : [
{ "index" : 0, "intensity" : 16, "worksize" : 4, "affine_to_cpu" : 0, "strided_index" : false},
],
"platform_index" : 0,

You should be able to run bin/xmr-stak, and see some output indicating the GPU miner has started. You’ll need to tweak the GPU configuration for best performance on your card. I found that worksize of 4 and intensity 64 gave me best performance on these 1 GB cards. Congratulations, you’re mining on a decade old GPU! Now what’s the catch?

First off, it’s pretty slow. I was able to get the Geforce 210 up to about 10 H/s, and the GT 240M up to about 25 H/s. This fully occupies one CPU core as well, it should be noted. This is faster than I expected, but it’s still very slow even compared to a Core 2 Duo without AES. Maybe a 9800 GT or GTX 280 with many more shaders and a wider memory bus would be faster.

Initially I had a problem where after the lock screen came up, I would try to log back in and Xorg would hang. I got around this by just disabling the lock screen. I also added a small delay between work submissions to the GPU so that the interface wouldn’t become totally unresponsive while mining. It’s still slow to respond, but at least it’s interactive. You can see the “old-nvidia” branch on my fork here and clone it if you want this addition as well.

If you found this information helpful, consider dropping a tip my way at Monero address:
4AJ7hzT7ULL6vNM7ChoQA1KPiWCaDA5zaCJVV2YJ4hE5HYh8NUZTcrg13qjW8Mm5F5ehGUE9oxJYvZUY3Xr5bP3K6uFqzXa