14

I'd like to start mining Bitcoins on a CPU for testing purposes. I've downloaded CGMiner, compiled it and created a config file without any problems, however starting it results in an error message:

All devices disabled, cannot mine!

What do I need to do in order for CGMiner to consider my CPU a device?

1
  • You could try an older release of cgminer. Mining bitcoin by CPU is a waste of energy literally.
    – Sun
    Commented Aug 30, 2017 at 18:43

2 Answers 2

14

When building the source use:

./configure --enable-cpumining && make

At the end of the configure stage you will see a list of what has been enabled, like this:

------------------------------------------------------------------------
cgminer 2.9.6
------------------------------------------------------------------------


Configuration Options Summary:

  curses.TUI...........: FOUND: -lncurses
  OpenCL...............: NOT FOUND. GPU mining support DISABLED
  scrypt...............: Disabled (needs OpenCL)
  ADL..................: SDK NOT found, GPU monitoring support DISABLED

  BitForce.FPGAs.......: Disabled
  Icarus.FPGAs.........: Disabled
  ModMiner.FPGAs.......: Disabled
  Ztex.FPGAs...........: Disabled

  CPU Mining...........: Enabled
  ASM.(for CPU mining).: true

Compilation............: make (or gmake)
  CPPFLAGS.............: 
  CFLAGS...............: -g -O2
  LDFLAGS..............:  -lpthread 
  LDADD................:  -lcurl   compat/jansson/libjansson.a -lpthread     -lm  

Installation...........: make install (as root if needed, with 'su' or 'sudo')
  prefix...............: /usr/local

You can get a list of supported options with ./configure --help (standard behavior for configure)

5
  • 2
    Thanks! One more question though: where can I find such information? The README isn't very helpful.
    – drakide
    Commented Apr 13, 2013 at 14:32
  • This no longer seems to work in 3.1.1
    – Goddard
    Commented Jun 6, 2013 at 0:50
  • 6
    BFGMiner still supports CPU mining, FWIW. Commented Jun 19, 2013 at 18:06
  • @Luke-Jr Even with the new getblocktemplate protocol?
    – Geremia
    Commented Jun 13, 2015 at 1:34
  • 1
    Sure, hardware is mostly abstract from protocol, especially in that direction. Commented Jun 14, 2015 at 2:04
16

CPU mining is no longer supported. See CGMiner FAQ:

Q: What happened to CPU mining?

A: Being increasingly irrelevant for most users, and a maintenance issue, it is no longer under active development and will not be supported. No binary builds supporting CPU mining will be released. Virtually all remaining users of CPU mining are as back ends for illegal botnets. The main reason cgminer is being inappopriately tagged as a virus by antivirus software is due to the trojans packaging a CPU mining capable version of it. There is no longer ANY CPU mining code in cgminer. If you are mining bitcoin with CPU today, you are spending 1000x more in electricity costs than you are earning in bitcoin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.