Cgminer: Difference between revisions

From lurkmore wiki
Jump to navigationJump to search
No edit summary
m 24 revisions imported
 
(14 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{lowercase}}'''cgminer''' is [[cryptocoin]] mining software developed by Con Kolivas. It is the recommended software for mining cryptocoins such as [[Bitcoin]] and [[Litecoin]].
__NOTOC__{{lowercase}}'''cgminer''' is [[cryptocoin]] mining software developed by Con Kolivas. It was the recommended software for mining cryptocoins such as [[Bitcoin]] and [[Litecoin]], though the developer dropped support for [[scrypt]] and GPU mining, and it is no longer recommended for anything other than Bitcoin mining. The source code of older versions are available to compile, therefore it can still be used for Linux-based GPU mining of scrypt coins. Windows users must either compile the source into a binary or find an unofficial download.


Version 3.7.2 is the last version of cgminer to support GPU or scrypt mining.
Version 3.7.2 is the last version of cgminer to support video card (GPU) or scrypt mining; the <code>--scrypt</code> flag has been removed from later versions.


''For [[scrypt]] and GPU mining, the recommended version of cgminer is 3.1.1. For the newer Rx series video cards, 3.7.2 might work better.'' For older video cards, version 3.1.1 has no scrypt or GPU mining bugs, and there are no important changes between that version and the later ones. Newer cards might need version 3.7.2 in order to work more effectively (or at all) with the latest SDK/drivers.
''For [[scrypt]] and GPU mining, the recommended version of cgminer is 3.1.1. For the newer Rx series video cards, 3.7.2 might work better.'' For older video cards, version 3.1.1 has no scrypt or GPU mining bugs, and there are no important changes between that version and the later ones. Newer cards might need version 3.7.2 in order to work more effectively (or at all) with the latest SDK/drivers.
It is ''highly suggested'' that you create a [[cgminer.conf|config file for cgminer]]; it can resolve many issues and make editing your settings very easy. Running cgminer, and troubleshooting it, is made much simpler by using a config file.
=== Mining in MH/s with one video card ===
You're either using the wrong version of cgminer or missing the <code>--scrypt</code> flag; read the second paragraph of this page.
=== clCreateBuffer, decrease TC or increase LG ===
Errors about '''clCreateBuffer''' and needing to decrease your TC are usually found in Windows and can be resolved by running <code>setx GPU_MAX_ALLOC_PERCENT 100</code> in the Windows command prompt (<code>winkey+r > cmd</code>). The same issue might appear in Linux if <code>export GPU_MAX_ALLOC_PERCENT=100</code> wasn't added to <code>/etc/profile</code> ([[Debian Linux cryptocoin mining rig setup guide#Install AMD APP SDK|Debian, again]])
Of course, if the above doesn't work, you might have your thread concurrency set way too high! Try starting with something lower, like 8192, and trying something higher if that works.


=== Devices not found error ===
=== Devices not found error ===
This is an error usually found on Linux systems. The error may be cause by many reasons (including failed hardware) but one of the main reasons is the addition of a new video card without reinitializing the configuration files. To do so, run <code>aticonfig --adapter=all --initialize</code> and reboot. This command may not work the first time, to resolve this, delete the current file (/etc/X11/xorg.conf on Debian) and run the command again.
This is an error usually found on Linux systems. The error may be cause by many reasons (including failed hardware) but one of the main reasons is the addition of a new video card without reinitializing the configuration files. To do so, run <code>aticonfig --adapter=all --initialize</code> and reboot. This command may not work the first time, to resolve this, delete the current file (/etc/X11/xorg.conf on Debian) and run the command again.


== Not enough memory, chance your TC ==
=== Mining with video cards that need different gpu-threads ===
Errors about not having enough memory and needing to change your TC are usually found in Windows and can be resolved by running <code>setx GPU_MAX_ALLOC_PERCENT 100</code> in the Windows command prompt (<code>winkey+r > cmd</code>). The same issue might appear in Linux if <code>export GPU_MAX_ALLOC_PERCENT=100</code> wasn't added to <code>/etc/profile</code> ([[Debian Linux cryptocoin mining rig setup guide#Install AMD APP SDK|Debian, again]])
Due to the way cgminer was written, the gpu-threads value is a global variable. What this means is that you can only set it once, unlike other settings, and therefore setting it in this way: <code>"gpu-threads" : "2,1,1,1"</code> will only use either 2 or 1 for all of the video cards.
 
The solution to this problem is to run two config files, and each file will use a flag to disable the video cards from the other config file. In the same example of 2,1,1,1, you'd disable gpus 1, 2, and 3 in the first config file and gpu 0 in the second.
 
A simpler solution is to use [[sgminer]] instead of cgminer. sgminer fixes that issue, along with many others.


== Related articles ==
== Related articles ==
* [[cgminer.conf]]
* [[cgminer.conf]]
* [[cgminer 3.1.1 README|cgminer README]]
* [[sgminer]]
* [[Debian Linux cryptocoin mining rig setup guide]]
* [[Debian Linux cryptocoin mining rig setup guide]]
* [[Mining hardware comparison]]
* [[Mining hardware comparison]]


== External links ==
== External links ==
* [http://ck.kolivas.org/apps/cgminer/3.1/ cgminer 3.1.1]
* [https://github.com/ckolivas/cgminer/tree/3.7 cgminer GitHub source code repository]


[[Category:Cryptocurrency]][[Category:Software]]
[[Category:Cryptocurrency]][[Category:Software]]

Latest revision as of 23:16, 31 March 2022

cgminer is cryptocoin mining software developed by Con Kolivas. It was the recommended software for mining cryptocoins such as Bitcoin and Litecoin, though the developer dropped support for scrypt and GPU mining, and it is no longer recommended for anything other than Bitcoin mining. The source code of older versions are available to compile, therefore it can still be used for Linux-based GPU mining of scrypt coins. Windows users must either compile the source into a binary or find an unofficial download.

Version 3.7.2 is the last version of cgminer to support video card (GPU) or scrypt mining; the --scrypt flag has been removed from later versions.

For scrypt and GPU mining, the recommended version of cgminer is 3.1.1. For the newer Rx series video cards, 3.7.2 might work better. For older video cards, version 3.1.1 has no scrypt or GPU mining bugs, and there are no important changes between that version and the later ones. Newer cards might need version 3.7.2 in order to work more effectively (or at all) with the latest SDK/drivers.

It is highly suggested that you create a config file for cgminer; it can resolve many issues and make editing your settings very easy. Running cgminer, and troubleshooting it, is made much simpler by using a config file.

Mining in MH/s with one video card

You're either using the wrong version of cgminer or missing the --scrypt flag; read the second paragraph of this page.

clCreateBuffer, decrease TC or increase LG

Errors about clCreateBuffer and needing to decrease your TC are usually found in Windows and can be resolved by running setx GPU_MAX_ALLOC_PERCENT 100 in the Windows command prompt (winkey+r > cmd). The same issue might appear in Linux if export GPU_MAX_ALLOC_PERCENT=100 wasn't added to /etc/profile (Debian, again)

Of course, if the above doesn't work, you might have your thread concurrency set way too high! Try starting with something lower, like 8192, and trying something higher if that works.

Devices not found error

This is an error usually found on Linux systems. The error may be cause by many reasons (including failed hardware) but one of the main reasons is the addition of a new video card without reinitializing the configuration files. To do so, run aticonfig --adapter=all --initialize and reboot. This command may not work the first time, to resolve this, delete the current file (/etc/X11/xorg.conf on Debian) and run the command again.

Mining with video cards that need different gpu-threads

Due to the way cgminer was written, the gpu-threads value is a global variable. What this means is that you can only set it once, unlike other settings, and therefore setting it in this way: "gpu-threads" : "2,1,1,1" will only use either 2 or 1 for all of the video cards.

The solution to this problem is to run two config files, and each file will use a flag to disable the video cards from the other config file. In the same example of 2,1,1,1, you'd disable gpus 1, 2, and 3 in the first config file and gpu 0 in the second.

A simpler solution is to use sgminer instead of cgminer. sgminer fixes that issue, along with many others.

Related articles

External links