Litecoin Mining on Mac OS X – GPU Mining

Litecoin Logo

My previous article on Litecoin mining I discussed how you can get started mining Litecoins, an alternative to the Bitcoin crypto-currency, using your spare CPU cycles. If you’re GPU is already mining Bitcoins, using your CPU to mine Litecoins may be an obvious choice. However, if you are “all in” on Litecoin then you can get a sizable performance increase by using your GPU to mine Litecoins. Whether that trade-off is worth-while is a decision you would need to make. Litecoin is not as mature as Bitcoin and is just as volatile. Some see it as a doomed clone, others as the next Bitcoin, poised to take off.

GPU Mining

In order to start using your GPU to mine Litecoins on OS X, you’ll need to first install cgminer or bfgminer. Please read my previous article on Bitcoin mining for step-by-step instructions and installation packages for cgminer and bfgminer. The Homebrew formulas I shared in my previous article include the configuration settings necessary to mine both Bitcoins and Litecoins. If you are compiling the applications yourself, make sure to use the –enable-scrypt parameter when running ./configure.

Armed with a copy of cgminer or bfgminer with scrypt enabled, you can now start mining Litecoins with your GPU. Now a fair warning: finding a nice set of parameters for mining Litecoins with cgminer or bfgminer is far more finicky and time consuming. With Bitcoins you can basically run either miner and just specify your pool. The miner will then tune itself and eventually reach a nice hash-rate.

This isn’t really the case with using either miner to mine Litecoins. For instance, if I use the following command line to mine Litecoins using my ATI 5770. Note that I am using the -d parameter to specify which GPU to use to simplify these examples.

cgminer --scrypt -o host:port -u username -p password -d 0

cgminer No Params

With no additional tuning my 5770 gets about 5Kh/s. My CPU alone gets around 29Kh/s. Using bfgminer with the basic command-line parameters yields similar results. As indicated in my previous article I use the –no-opencl-binaries to work around a crash in bfgminer with multiple GPU’s on OS X.

bfgminer --scrypt -o host:port -u username -p password -d 0 --no-opencl-binaries

bfgminer No Params

So how can we get better performance mining Litecoins on the GPU? The first parameter to focus on is the -I parameter, or the intensity. With Bitcoin this parameter does help, but honestly not a ton. If you aren’t using the PC, and you leave the intensity at “Desktop” (-I d), both cgminer and bfgminer will eventually reach around the same performance you’d get by specifying something like -I 9.

This is not the case with Litecoin mining. With scrypt (Litecoin’s hashing algorithm) you need to specify a high intensity, in fact higher than is suggested for Bitcoin. I’d start at around 10 and go up from there. On my system, 15-16 is about the best I can do.

So lets try cgminer with -I 13 to see what that does:

cgminer --scrypt -o host:port -u username -p password -d 0 -I 13

cgminer with I

That change alone triples the Kh/s, but from 5Kh/s to 15Kh/s honestly isn’t much to brag about. Let’s try with bfgminer:

bfgminer --scrypt -o host:port -u username -p password -d 0 --no-opencl-binaries -I 13

bfgminer with I

Similarly I get around 14Kh/s using the -I 13 parameter with bfgminer.

The next parameter to focus on is the -w parameter, which specifies a worksize in multiples of 64 up to 256. This parameter is what really makes a difference on my OS X rig:

cgminer --scrypt -o host:port -u username -p password -d 0 -I 13 -w 64

cgminer with I w

Now we’re cooking with Crisco! Using -I 13 -w 64 on my 5770 gets me from the original 5Kh/s up to 83Kh/s with cgminer. And with bfgminer?

bfgminer --scrypt -o host:port -u username -p password -d 0 --no-opencl-binaries -I 13 -w 64

bfgminer with I w

This gets us up to around 80 Kh/s with bfgminer as well. By removing the -d parameter so that both GPU’s are used and cranking up the -I parameter to 16 I can get my GPU’s up to around 230 Kh/s:

cgminer --scrypt -o host:port -u username -p password -I 16 -w 64

cgminer Two GPUs

The last parameter I want to note is –thread-concurrency. If cgminer or bfgminer are reporting hardware errors (the HW number in the output) this indicates that you need to make use of the –thread-concurrency parameter. These are not hardware failures. You can find guidelines for the value to use here:

57xx cards: 2368-4096 (3200 is common)
58xx cards: 4096-8192 (5600, 7168, and 8000 are common)
5970 cards: 4096-8192 (5632 or 8000 are common)

67xx cards: 2368-4096 (3200 is common)
68xx cards: 3008-6720 (4800 is common)
69xx cards: 4096-8192 (5600, 7168, and 8000 are common)
6990 cards: 4096-8192 (5632 or 8000 are common)

7xxx cards: 64 * bus-width-of-card-in-bits. So, for a 7950, that would be 64 * 384 = 24576. Ideal values are 21712 or 24000. Find your bus width here.

I verified that 3200 works well with a 5770 and 4800 works well with a 6870.


And that about covers it for my series of articles on mining Bitcoins and Litecoins using Mac OS X and Apple hardware. The growing landscape of crypto-currency is fascinating from many perspectives. If your interest is piqued and you are running OS X, hopefully you now have the information you need in order to get started mining this new form of currency.

UPDATE: Starting with version 3.8 cgminer no longer includes any support for GPU mining, so you will need to use version 3.7.2 of cgminer if you intend to mine using your GPU. Additionally, bfgminer now requires an additional argument in order to enable GPU mining. If you wish to use bfgminer for GPU mining you will need to add the following argument:

--S opencl:auto

29 thoughts on “Litecoin Mining on Mac OS X – GPU Mining

  1. Pingback: Litecoin Mining on Mac OS X – CPU Mining |

  2. davcamer

    Thanks for the excellent guides on starting mining on a Mac. I have been trying it out over the weekend on a couple of different laptops, one Air and one Pro. Obviously, neither of them are heavy hitters but the experimentation is quite fun.

    I found MacMiner to be better than doing homebrew installs, surprisingly. Also, I haven’t been able to get Litecoin mining working on the Pro’s GPU. It gives a cryptic OpenCL initialization error:
    Error -54: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)

  3. Bill Doody

    Error -54 can be fixed by playing with the Intensity. Start with [ -I d ] and see if it works.

  4. Deviant Kade

    Finally was able to get Cgminer to compile and install correctly for Lion..any thought to why I get about 40 Kh/s on a Radeon 5770 using the following via terminal -

    $cgminer –scrypt –worksize 128 –lookup-gap 2 –thread-concurrency 3200 –intensity 11 -o -u worker.1 -p xxxxxx

    If i go above intensity 11 my monitor will freeze up :/

      1. Deviant Kade

        Thanks for the reply! Brought the work down to 64 and it sped up a few Kh/s to about 46 at the moment on a 5770 and removing the lookup gap brings me to about 50 Kh/s. If i take the intensity past 12 the computer freezes up :/ Any other ideas why it could be going so slow? I read to add these lines in the terminal before the scrypt :
        export GPU_MAX_ALLOC_PERCENT=100
        export GPU_USE_SYNC_OBJECTS=1

        Doesn’t seem to make much of a difference sadly but hey..50 is better then my original 10.

  5. Victor Sander

    Hey, I need some help.
    after launching terminal, trying to start cgminer up, i get this error when trying to use the command line you are suggesting:
    Started cgminer 3.1.0
    Started cgminer 3.1.0
    Probing for an alive pool
    Pool 0 slow/down or URL or credentials invalid

    What am I doing wrong?

  6. Pingback: Bitcoin & Litcoin Proxy Mining on Mac OS X |

  7. Jon Stern


    Can I use this setup for Feathercoin?
    I have everything setup for Litecoin but it’s not mining properly. How do I indicate it to mine feathercoin and not litecoin.

    cgminer -k diablo –scrypt -o stratum+tcp:// -u worker.1 -p xxxxxx -I 13 -w 64

    Thank you!

  8. Jon Stern

    I am getting errors like this from my clean command line:

    cgminer –scrypt -o stratum+tcp:// -u XXXXXX -p XXXXXX

    I have tried to connect not using stratum and it works.

    [2013-09-17 17:00:05] Press any key to exit, or cgminer will try again in 15s.
    [2013-09-17 17:00:21] Failed to connect to stratum on
    [2013-09-17 17:01:20] No servers were found that could be used to get work from
    [2013-09-17 17:01:20] Please check the details from the list below of the serve
    rs you have input
    [2013-09-17 17:01:20] Most likely you have input the wrong URL, forgotten to ad
    d a port, or have not set up workers

  9. Milen

    very good series, thank you.

    I have one problem proceeding with cgminer (3.6.1.), says:
    `cgminer already installed, it`s just not linked`

    I tried to find some info on goodle but wasn`t succesful. Do you have any hint? thank you

  10. Nis Sarup

    This had me stumped for a couple of hours today. As can be seen here: cgminer has no support for scrypt since version 3.8.0.

    You can “brew edit cgminer” and change the version numbers in the link to the file on github.
    When you try to install it you will get a SHA-hash error. Just copy the “actual” hash to the hash just below the URL you just changed and try the install again. This worked for me.

  11. Kinkle (@djkinkle)

    3.8.4 cgminer not responding to LTC mining
    Having trouble trying to install previous version. This has been a very helpful forum and I feel like I was so close. Now I”m stuck. Any advice/help be greatly appreciated.

      1. Jon


        Can you help me? Sorry for the double post but I have tried everything.
        I am using a Sapphire 7950 on my Mac Pro tower and the best hashing rate I can get is 360 Kh/s mining Litecoins. I have seen that people have gotten up to 600 Kh/s with a 7950. What can I do on my computer to speed it up?

        CGMiner (3.4.3) command line:

        cgminer –scrypt -o -w 256 –intensity 20 –lookup-gap 2 –thread-concurrency 21712 –url=stratum+tcp:// –userpass=XXXXXX.1:XXXXXX

        Is it the mac versions of the 7950 that is slow? It seems I should be able to get 600 Kh/s. Thank you for your help.


        1. nwoolls Post author

          I use -g 1 –thread-concurrency 24000 for my 7950, but that is on Windows. Note that scrypt mining is notoriously difficult to tune and much more so on a Mac. I have never been able to get the same scrypt numbers on a Mac as I can in Windows.

  12. Jon Stern

    I am using a Sapphire 7950 on my Mac Pro tower and the best hashing rate I can get is 360 Kh/s mining Litecoins. I have seen that people have gotten up to 600 Kh/s with a 7950. What can I do on my computer to speed it up?

    CGMiner (3.4.3) command line:

    cgminer –scrypt -w 256 –intensity 19 -v 1 -g 1 –lookup-gap 2 –thread-concurrency 21712 -o –url=stratum+tcp:// –userpass=XXXXXX.1:XXXXXX

    Is it the stock power supply? Is it the mac versions of the 7950 that is slow? It seems I should be able to get 600 Kh/s. Thank you for your help.

  13. Will

    Getting an Error -54 whenever I try and use bfgminer. Also, it doesn’t seem to recognize my Block Erupter USB miner. Any thoughts on what could be going wrong?

  14. Mike McDonald

    I’ve been mining LTC and BTC on a Mac Pro using Asteroid. I seem to stably get 55kH/s without pushing my GPU temp over 80ºC.

    Any opinions on Asteroid? Am I sacrificing anything by using that app instead of a command line process?

  15. Mike

    I seem to be having problems with scrypt that I hope you can lend your expertise to. If I run cgminer without scrypt enabled it seems to hash along happily if slowly with the following command line:
    “cgminer -k diablo -o stratum+tcp://address -u user -p password –intensity 14 –shaders 800 –thread-concurrency 4000 –worksize 64″

    If I try to run it scrypt enabled, using this command line:
    “cgminer –scrypt -o stratum+tcp://address -u user -p password -I d –shaders 800 –thread-concurrency 4000 –worksize 64″
    I get back an error that looks like this:

    [2013-12-14 22:57:08] Error -11: Building Program (clBuildProgram)
    [2013-12-14 22:57:08] :678:10:{678:10-678:20}: error: no matchi
    ng overload found for arguments of type ‘unsigned int __attribute__((ext_vector
    _type(4))), unsigned int’
    B[i] = EndianSwap(tmp[i]);

    After that the GPUs fail to initialize, and the whole thing bogs down and goes no further.

    Thanks in advance for any help you might be able to lend.


  16. Ryan

    I’m using litecoin-qt, trying to run bfgminer against it to solo mine, but I can’t figure out where to define a pool or workers in litecoin-qt. I’ve edited the rpcuser and rpcpassword in a sample litecoin.conf file I found on the wiki, and put it under ~/Library/Application Support/Litecoin/, but that didn’t seem to work. I’m getting:

    [2014-01-08 20:28:43] Started bfgminer 3.9.0
    [2014-01-08 20:28:43] Started bfgminer 3.9.0
    [2014-01-08 20:28:44] Probing for an alive pool
    [2014-01-08 20:28:44] Pool 0 slow/down or URL or credentials invalid

    Command line is: bfgminer –scrypt -o localhost:9333 -u user -p pass –no-opencl-binaries -I 13 -w 64 -S opencl:auto

    Please help!


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>