README.GPU 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. EXECUTIVE SUMMARY ON GPU USAGE (SEE ALSO README.scrypt FOR SCRYPT MINING):
  2. Single pool, regular desktop:
  3. bfgminer -o http://pool:port -u username -p password
  4. By default if you have configured your system properly, BFGMiner will mine on
  5. ALL GPUs, but in "dynamic" mode which is designed to keep your system usable
  6. and sacrifice some mining performance.
  7. Single pool, dedicated miner:
  8. bfgminer -o http://pool:port -u username -p password -I 9
  9. Single pool, first card regular desktop, 3 other dedicated cards:
  10. bfgminer -o http://pool:port -u username -p password -I d,9,9,9
  11. Multiple pool, dedicated miner:
  12. bfgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password -I 9
  13. Add overclocking settings, GPU and fan control for all cards:
  14. bfgminer -o http://pool:port -u username -p password -I 9 --auto-fan --auto-gpu --gpu-engine 750-950 --gpu-memclock 300
  15. Add overclocking settings, GPU and fan control with different engine settings for 4 cards:
  16. bfgminer -o http://pool:port -u username -p password -I 9 --auto-fan --auto-gpu --gpu-engine 750-950,945,700-930,960 --gpu-memclock 300
  17. READ WARNINGS AND DOCUMENTATION BELOW ABOUT OVERCLOCKING
  18. To configure multiple displays on linux you need to configure your Xorg cleanly
  19. to use them all:
  20. sudo aticonfig --adapter=all -f --initial
  21. On Linux you virtually always need to export your display settings before
  22. starting to get all the cards recognised and/or temperature+clocking working:
  23. export DISPLAY=:0
  24. ---
  25. SETUP FOR GPU SUPPORT:
  26. To setup GPU mining support:
  27. Install AMD APP sdk, ideal version (see FAQ!) - put it into a system location.
  28. Download the correct version for either 32 bit or 64 bit from here:
  29. http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/
  30. The best version for Radeon 5xxx and 6xxx is v2.5, while 7xxx cards need v2.6 or
  31. later, 2.7 seems the best.
  32. For versions 2.4 or earlier you will need to manually install them:
  33. This will give you a file with a name like:
  34. AMD-APP-SDK-v2.4-lnx64.tgz (64-bit)
  35. or
  36. AMD-APP-SDK-v2.4-lnx32.tgz (32-bit)
  37. Then:
  38. sudo -i
  39. cd /opt
  40. tar xf /path/to/AMD-APP-SDK-v2.4-lnx##.tgz
  41. cd /
  42. tar xf /opt/AMD-APP-SDK-v2.4-lnx##/icd-registration.tgz
  43. ln -s /opt/AMD-APP-SDK-v2.4-lnx##/include/CL /usr/include
  44. ln -s /opt/AMD-APP-SDK-v2.4-lnx##/lib/x86_64/* /usr/lib/
  45. ldconfig
  46. Where ## is 32 or 64, depending on the bitness of the SDK you downloaded.
  47. If you are on 32 bit, x86_64 in the 2nd last line should be x86
  48. ---
  49. INTENSITY INFORMATION:
  50. Intensity correlates with the size of work being submitted at any one time to
  51. a GPU. The higher the number the larger the size of work. Generally speaking
  52. finding an optimal value rather than the highest value is the correct approach
  53. as hash rate rises up to a point with higher intensities but above that, the
  54. device may be very slow to return responses, or produce errors.
  55. NOTE: Running intensities above 9 with current hardware is likely to only
  56. diminish return performance even if the hash rate might appear better. A good
  57. starting baseline intensity to try on dedicated miners is 9. 11 is the upper
  58. limit for intensity while Bitcoin mining, if the GPU_USE_SYNC_OBJECTS variable
  59. is set (see FAQ). The upper limit for SHA256d mining is 14 and 20 for scrypt.
  60. ---
  61. OVERCLOCKING WARNING AND INFORMATION
  62. AS WITH ALL OVERCLOCKING TOOLS YOU ARE ENTIRELY RESPONSIBLE FOR ANY HARM YOU
  63. MAY CAUSE TO YOUR HARDWARE. OVERCLOCKING CAN INVALIDATE WARRANTIES, DAMAGE
  64. HARDWARE AND EVEN CAUSE FIRES. THE AUTHOR ASSUMES NO RESPONSIBILITY FOR ANY
  65. DAMAGE YOU MAY CAUSE OR UNPLANNED CHILDREN THAT MAY OCCUR AS A RESULT.
  66. The GPU monitoring, clocking and fanspeed control incorporated into BFGMiner
  67. comes through use of the ATI Display Library. As such, it only supports ATI
  68. GPUs. Even if ADL support is successfully built into BFGMiner, unless the card
  69. and driver supports it, no GPU monitoring/settings will be available.
  70. BFGMiner supports initial setting of GPU engine clock speed, memory clock
  71. speed, voltage, fanspeed, and the undocumented powertune feature of 69x0+ GPUs.
  72. The setting passed to BFGMiner is used by all GPUs unless separate values are
  73. specified. All settings can all be changed within the menu on the fly on a
  74. per-GPU basis.
  75. For example:
  76. --gpu-engine 950 --gpu-memclock 825
  77. will try to set all GPU engine clocks to 950 and all memory clocks to 825,
  78. while:
  79. --gpu-engine 950,945,930,960 --gpu-memclock 300
  80. will try to set the engine clock of card 0 to 950, 1 to 945, 2 to 930, 3 to
  81. 960 and all memory clocks to 300.
  82. You can substitute 0 to leave the engine clock of a card at its default.
  83. For example, to keep the 2nd GPU to its default clocks:
  84. --gpu-engine 950,0,930,960 --gpu-memclock 300,0,300,300
  85. AUTO MODES:
  86. There are two "auto" modes in BFGMiner, --auto-fan and --auto-gpu. These can be
  87. used independently of each other and are complementary. Both auto modes are
  88. designed to safely change settings while trying to maintain a target
  89. temperature. By default this is set to 75 degrees C but can be changed with:
  90. --temp-target
  91. e.g.
  92. --temp-target 80
  93. Sets all cards' target temperature to 80 degrees.
  94. --temp-target 75,85
  95. Sets card 0 target temperature to 75, and card 1 to 85 degrees.
  96. AUTO FAN:
  97. e.g.
  98. --auto-fan (implies 85% upper limit)
  99. --gpu-fan 25-85,65 --auto-fan
  100. Fan control in auto fan works off the theory that the minimum possible fan
  101. required to maintain an optimal temperature will use less power, make less
  102. noise, and prolong the life of the fan. In auto-fan mode, the fan speed is
  103. limited to 85% if the temperature is below "overheat" intentionally, as higher
  104. fanspeeds on GPUs do not produce signficantly more cooling, yet significantly
  105. shorten the lifespan of the fans. If temperature reaches the overheat value,
  106. fanspeed will still be increased to 100%. The overheat value is set to 85
  107. degrees by default and can be changed with:
  108. --temp-overheat
  109. e.g.
  110. --temp-overheat 75,85
  111. Sets card 0 overheat threshold to 75 degrees and card 1 to 85.
  112. AUTO GPU:
  113. e.g.
  114. --auto-gpu --gpu-engine 750-950
  115. --auto-gpu --gpu-engine 750-950,945,700-930,960
  116. GPU control in auto gpu tries to maintain as high a clock speed as possible
  117. while not reaching overheat temperatures. As a lower clock speed limit, the
  118. auto-gpu mode checks the GPU card's "normal" clock speed and will not go below
  119. this unless you have manually set a lower speed in the range. Also, unless a
  120. higher clock speed was specified at startup, it will not raise the clockspeed.
  121. If the temperature climbs, fanspeed is adjusted and optimised before GPU engin
  122. e clockspeed is adjusted. If fan speed control is not available or already
  123. optimal, then GPU clock speed is only decreased if it goes over the target
  124. temperature by the hysteresis amount, which is set to 3 by default and can be
  125. changed with:
  126. --temp-hysteresis
  127. If the temperature drops below the target temperature, and engine clock speed
  128. is not at the highest level set at startup, BFGMiner will raise the clock speed.
  129. If at any time you manually set an even higher clock speed successfully in
  130. BFGMiner, it will record this value and use it as its new upper limit (and the
  131. same for low clock speeds and lower limits). If the temperature goes over the
  132. cutoff limit (95 degrees by default), BFGMiner will completely disable the GPU
  133. from mining and it will not be re-enabled unless manually done so. The cutoff
  134. temperature can be changed with:
  135. --temp-cutoff
  136. e.g.
  137. --temp-cutoff 95,105
  138. Sets card 0 cutoff temperature to 95 and card 1 to 105.
  139. --gpu-memdiff -125
  140. This setting will modify the memory speed whenever the GPU clock speed is
  141. modified by --auto-gpu. In this example, it will set the memory speed to be 125
  142. MHz lower than the GPU speed. This is useful for some cards like the 6970 which
  143. normally don't allow a bigger clock speed difference. The 6970 is known to only
  144. allow -125, while the 7970 only allows -150.
  145. CHANGING SETTINGS:
  146. When setting values, it is important to realise that even though the driver
  147. may report the value was changed successfully, and the new card power profile
  148. information contains the values you set it to, that the card itself may
  149. refuse to use those settings. As the performance profile changes dynamically,
  150. querying the "current" value on the card can be wrong as well. So when changing
  151. values in BFGMiner, after a pause of 1 second, it will report to you the current
  152. values where you should check that your change has taken. An example is that
  153. 6970 reference cards will accept low memory values but refuse to actually run
  154. those lower memory values unless they're within 125 of the engine clock speed.
  155. In that scenario, they usually set their real speed back to their default.
  156. BFGMiner reports the so-called "safe" range of whatever it is you are modifying
  157. when you ask to modify it on the fly. However, you can change settings to values
  158. outside this range. Despite this, the card can easily refuse to accept your
  159. changes, or worse, to accept your changes and then silently ignore them. So
  160. there is absolutely to know how far to/from where/to it can set things safely or
  161. otherwise, and there is nothing stopping you from at least trying to set them
  162. outside this range. Being very conscious of these possible failures is why
  163. BFGMiner will report back the current values for you to examine how exactly the
  164. card has responded. Even within the reported range of accepted values by the
  165. card, it is very easy to crash just about any card, so it cannot use those
  166. values to determine what range to set. You have to provide something meaningful
  167. manually for BFGMiner to work with through experimentation.
  168. STARTUP / SHUTDOWN:
  169. When BFGMiner starts up, it tries to read off the current profile information
  170. for clock and fan speeds and stores these values. When quitting BFGMiner, it
  171. will then try to restore the original values. Changing settings outside of
  172. BFGMiner while it's running may be reset to the startup BFGMiner values when
  173. BFGMiner shuts down because of this.
  174. ---
  175. GPU DEVICE ISSUES and use of --gpu-map
  176. GPUs mine with OpenCL software via the GPU device driver. This means you need
  177. to have both an OpenCL SDK installed, and the GPU device driver RUNNING (i.e.
  178. Xorg up and running configured for all devices that will mine on linux etc.)
  179. Meanwhile, the hardware monitoring that BFGMiner offers for AMD devices relies
  180. on the ATI Display Library (ADL) software to work. OpenCL DOES NOT TALK TO THE
  181. ADL. There is no 100% reliable way to know that OpenCL devices are identical
  182. to the ADL devices, as neither give off the same information. BFGMiner does its
  183. best to correlate these devices based on the order that OpenCL and ADL numbers
  184. them. It is possible that this will fail for the following reasons:
  185. 1. The device order is listed differently by OpenCL and ADL (rare), even if the
  186. number of devices is the same.
  187. 2. There are more OpenCL devices than ADL. OpenCL stupidly sees one GPU as two
  188. devices if you have two monitors connected to the one GPU.
  189. 3. There are more ADL devices than OpenCL. ADL devices include any ATI GPUs,
  190. including ones that can't mine, like some older R4xxx cards.
  191. To cope with this, the ADVANCED option for --gpu-map is provided with BFGMiner.
  192. DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. The default will work the
  193. vast majority of the time unless you know you have a problem already.
  194. To get useful information, start BFGMiner with just the -n option. You will get
  195. output that looks like this:
  196. [2012-04-25 13:17:34] CL Platform 0 vendor: Advanced Micro Devices, Inc.
  197. [2012-04-25 13:17:34] CL Platform 0 name: AMD Accelerated Parallel Processing
  198. [2012-04-25 13:17:34] CL Platform 0 version: OpenCL 1.1 AMD-APP (844.4)
  199. [2012-04-25 13:17:34] Platform 0 devices: 3
  200. [2012-04-25 13:17:34] 0 Tahiti
  201. [2012-04-25 13:17:34] 1 Tahiti
  202. [2012-04-25 13:17:34] 2 Cayman
  203. [2012-04-25 13:17:34] GPU 0 AMD Radeon HD 7900 Series hardware monitoring enabled
  204. [2012-04-25 13:17:34] GPU 1 AMD Radeon HD 7900 Series hardware monitoring enabled
  205. [2012-04-25 13:17:34] GPU 2 AMD Radeon HD 6900 Series hardware monitoring enabled
  206. [2012-04-25 13:17:34] 3 GPU devices max detected
  207. Note the number of devices here match, and the order is the same. If devices 1
  208. and 2 were different between Tahiti and Cayman, you could run BFGMiner with:
  209. --gpu-map 2:1,1:2
  210. And it would swap the monitoring it received from ADL device 1 and put it to
  211. OpenCL device 2 and vice versa.
  212. If you have 2 monitors connected to the first device it would look like this:
  213. [2012-04-25 13:17:34] Platform 0 devices: 4
  214. [2012-04-25 13:17:34] 0 Tahiti
  215. [2012-04-25 13:17:34] 1 Tahiti
  216. [2012-04-25 13:17:34] 2 Tahiti
  217. [2012-04-25 13:17:34] 3 Cayman
  218. [2012-04-25 13:17:34] GPU 0 AMD Radeon HD 7900 Series hardware monitoring enabled
  219. [2012-04-25 13:17:34] GPU 1 AMD Radeon HD 7900 Series hardware monitoring enabled
  220. [2012-04-25 13:17:34] GPU 2 AMD Radeon HD 6900 Series hardware monitoring enabled
  221. To work around this, you would use:
  222. -d 0 -d 2 -d 3 --gpu-map 2:1,3:2
  223. If you have an older card as well as the rest it would look like this:
  224. [2012-04-25 13:17:34] Platform 0 devices: 3
  225. [2012-04-25 13:17:34] 0 Tahiti
  226. [2012-04-25 13:17:34] 1 Tahiti
  227. [2012-04-25 13:17:34] 2 Cayman
  228. [2012-04-25 13:17:34] GPU 0 AMD Radeon HD 4500 Series hardware monitoring enabled
  229. [2012-04-25 13:17:34] GPU 1 AMD Radeon HD 7900 Series hardware monitoring enabled
  230. [2012-04-25 13:17:34] GPU 2 AMD Radeon HD 7900 Series hardware monitoring enabled
  231. [2012-04-25 13:17:34] GPU 3 AMD Radeon HD 6900 Series hardware monitoring enabled
  232. To work around this you would use:
  233. --gpu-map 0:1,1:2,2:3
  234. ---
  235. GPU FAQ:
  236. Q: Can I change the intensity settings individually for each GPU?
  237. A: Yes, pass a list separated by commas such as -I d,4,9,9
  238. Q: The CPU usage is high.
  239. A: The ATI drivers after 11.6 have a bug that makes them consume 100% of one
  240. CPU core unnecessarily so downgrade to 11.6. Binding BFGMiner to one CPU core on
  241. windows can minimise it to 100% (instead of more than one core). Driver version
  242. 11.11 on linux and 11.12 on windows appear to have fixed this issue. Note that
  243. later drivers may have an apparent return of high CPU usage. Try
  244. 'export GPU_USE_SYNC_OBJECTS=1' on Linux before starting BFGMiner. You can also
  245. set this variable in windows via a batch file or on the command line before
  246. starting BFGMiner with 'setx GPU_USE_SYNC_OBJECTS 1'
  247. Q: My GPU hangs and I have to reboot it to get it going again?
  248. A: The more aggressively the mining software uses your GPU, the less overclock
  249. you will be able to run. You are more likely to hit your limits with BFGMiner
  250. and you will find you may need to overclock your GPU less aggressively. The
  251. software cannot be responsible and make your GPU hang directly. If you simply
  252. cannot get it to ever stop hanging, try decreasing the intensity, and if even
  253. that fails, try changing to the poclbm kernel with -k poclbm, though you will
  254. sacrifice performance. BFGMiner is designed to try and safely restart GPUs as
  255. much as possible, but NOT if that restart might actually crash the rest of the
  256. GPUs mining, or even the machine. It tries to restart them with a separate
  257. thread and if that separate thread dies, it gives up trying to restart any more
  258. GPUs.
  259. Q: Can you change the autofan/autogpu to change speeds in a different manner?
  260. A: The defaults are sane and safe. I'm not interested in changing them further.
  261. The starting fan speed is set to 50% in auto-fan mode as a safety precaution.
  262. Q: I upgraded BFGMiner version and my hashrate suddenly dropped!
  263. A: No, you upgraded your SDK version unwittingly between upgrades of BFGMiner
  264. and that caused your hashrate to drop. See the next question.
  265. Q: I upgraded my ATI driver/SDK/BFGMiner and my hashrate suddenly dropped!
  266. A: The hashrate performance in BFGMiner is tied to the version of the ATI SDK
  267. that is installed only for the very first time BFGMiner is run. This generates
  268. binaries that are used by the GPU every time after that. Any upgrades to the
  269. SDK after that time will have no effect on the binaries. However, if you
  270. install a fresh version of BFGMiner, and have since upgraded your SDK, new
  271. binaries will be built. It is known that the 2.6 ATI SDK has a huge hashrate
  272. penalty on generating new binaries. It is recommended to not use this SDK at
  273. this time unless you are using an ATI 7xxx card that needs it.
  274. Q: Which ATI SDK is the best for BFGMiner?
  275. A: At the moment, versions 2.4 and 2.5 work the best for 5xxx and 6xxx GPUs. If
  276. you are need to use the 2.6+ SDK (7xxx and later), the phatk kernel will perform
  277. poorly, while the diablo or my custom modified poclbm kernel are optimised for
  278. it.
  279. Q: I have multiple SDKs installed, can I choose which one it uses?
  280. A: Run bfgminer with the -n option and it will list all the platforms currently
  281. installed. Then you can tell BFGMiner which platform to use with --gpu-platform.
  282. Q: BFGMiner reports no devices or only one device on startup on Linux although
  283. I have multiple devices and drivers+SDK installed properly?
  284. A: Try "export DISPLAY=:0" before running BFGMiner.
  285. Q: Should I use crossfire/SLI?
  286. A: It does not benefit mining at all and depending on the GPU may actually
  287. worsen performance.