README.GPU 16 KB

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