README.GPU 17 KB

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