UPDATE 7/7/13: If you want to use Catalyst drivers version 12.8 you will find that X won’t start (error msg: /usr/lib/xorg/modules/drivers/fglrx_drv.so: undefined symbol: noXFree86DRIExtension) if you installed CentOS 6.4. Catalyst > 12.8 will work fine. To fix that, you can downgrade to the Xorg version that ships with CentOS 6.3:

yum --disablerepo=\* --enablerepo=C6.3\* downgrade xorg\*
(You may also need to do: yum remove xorg-x11-drv-modesetting)

Do this before you install Catalyst!
UPDATE END.

Here’s my how-to for cgminer / AMD Radeon drivers under CentOS 6.4,
32bit in this example. You can basically copy & paste every line and
you should end up with a working mining rig.

Install required packages:

yum install wget system-config-firewall-tui openssh-clients
kernel-devel-2.6.32-358.el6.i686 libcurl-devel ncurses-devel
compat-libstdc++-33 screen xterm
yum groupinstall "X Window System" "Development tools"

Download and extract cgminer 3.7.2 – later versions don’t support GPU mining:

cd /root
wget http://ck.kolivas.org/apps/cgminer/3.7/cgminer-3.7.2.tar.bz2
tar xjvf cgminer-3.7.2.tar.bz2

Download AMD APP and ADL SDKs for cgminer compilation from:

AMD APP SDK: http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads
AMD ADL SDK: http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk

Install AMD APP SDK:

cd /opt
tar xvzf /root/AMD-APP-SDK-v2.8-lnx32.tgz
cd /
tar xvzf /opt/icd-registration.tgz
cd /opt
tar xvzf AMD-APP-SDK-v2.8-RC-lnx32.tgz
ln -s /opt/AMD-APP-SDK-v2.8-RC-lnx32/include/CL /usr/include
ln -s /opt/AMD-APP-SDK-v2.8-RC-lnx32/lib/x86/* /usr/lib/

Install AMD ADL SDK:

cd /root
mkdir ADL
mv ADL_SDK_5.0.zip ADL
cd ADL
unzip ADL_SDK_5.0.zip
cp include/*.h /root/cgminer-3.7.2/ADL_SDK

Build cgminer for Litecoin (with scrypt support):

cd /root/cgminer-3.7.2
CFLAGS="-O2 -Wall -march=native
-I/opt/AMD-APP-SDK-v2.8-RC-lnx32/include"
LDFLAGS="-L/opt/AMD-APP-SDK-v2.8-RC-lnx32/lib/x86" ./configure
--enable-scrypt
make
make install
(if you want to run the cgminer binary from everywhere)

Install fglrx AMD graphics card drivers:

AMD Catalyst driver (fglrx) from: http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx

(e.g.

cd /root
wget http://www2.ati.com/drivers/linux/amd-catalyst-13.4-linux-x86.x86_64.zip

)

unzip amd-catalyst-13.4-linux-x86.x86_64.zip
chmod 700 amd-catalyst-13.4-linux-x86.x86_64.run
./amd-catalyst-13.4-linux-x86.x86_64.run --buildpkg RedHat/RHEL6
rpm -Uvh fglrx_p_i_c-12.104-1.i386.rpm

reboot

amdconfig --adapter=all --initial

If your mining rig is headless you can start X in a screen session:

screen
xinit

Detach screen session: CTRL+A+D

Create cgminer.sh and put this into the file:

export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export DISPLAY=:0


cgminer --scrypt ...your parameters go here...

Make it executable:

chmod 700 cgminer.sh

Configure cgminer parameters as needed and start mining (./cgminer.sh). Done!

This entry was posted in tech and tagged bitcoin, centos, linux, litecoin on May 15, 2013.

Post navigation

← JunOS: Finding SNMP object identifiers for your Juniper device
Quick copy & paste how-to: Install KVM on CentOS →

20 thoughts on “How to: cgminer (Bitcoin, Litecoin etc.) + AMD Radeon driver install on CentOS”

    1. spineless November 27, 2013 at 19:37

      I am getting an error when I install cgminer. I downloaed the
      drivers and the GCminer and was about to start installing GCminer. I
      entered the command ./autogen.sh and I get the following error:


      configure.ac:39: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
      autoreconf: /usr/bin/autoconf failed with exit status: 1
      Configuring...
      ./autogen.sh: line 10: /root/cgminer/configure: No such file or directory

      Not sure where to start with this one. Any ideas?

      Reply
      1. univ Post authorNovember 27, 2013 at 20:16

        Hi! Wow, your comment is the 2nd legitimate comment ever in my
        blog. :-) Anyway, it seems like not all development tools required for
        compiling from source were installed. Are you sure you executed the “yum
        install …” line? In particular: yum install “Development tools”
        Let me know if this helps or not.

        Reply
    2. homer December 5, 2013 at 16:22

      Wow! a blogger who is arrogant to its readers!
      Wanna be the third:

      Q: What happened to CPU and GPU mining?
      A: Their efficiency makes them irrelevant in the bitcoin mining world today
      and the author has no interest in supporting alternative coins that are better
      mined by these devices.

      So, how could the Radeon Driver make sense?

      Felix

      Reply
      1. univ Post authorDecember 5, 2013 at 19:27

        I think you misunderstood my comment. His comment was the 2nd legitimate comment ever, all other comments were spam so far.

        Reply
    3. homer December 5, 2013 at 16:27

      Serious: cgminer after 3.7.2 does not contain gpu mining any more, so do not check out cgminer from git, use http://ck.kolivas.org/apps/cgminer/3.7/cgminer-3.7.2.tar.bz2

      Reply
      1. univ Post authorDecember 5, 2013 at 19:37

        Thanks for the heads-up. I adjusted the instructions.

        Reply
    4. Pingback: Help with a Gigabyte GV-R928XOC-3GD REV2 | COINREGIME.COM

    5. Portos January 18, 2014 at 09:11

      Ops! Fulfilled your instructions, but starting ./cgminer -n reports:

      FATAL: Module fglrx not found.
      Error! Fail to load fglrx kernel module! Maybe you can switch to root user to load kernel module directly
      FATAL: Module fglrx not found.
      Error! Fail to load fglrx kernel module! Maybe you can switch to root user to load kernel module directly
      [2014-01-18 08:05:22] CL Platform 0 vendor: Advanced Micro Devices, Inc.
      [2014-01-18 08:05:22] CL Platform 0 name: AMD Accelerated Parallel Processing
      [2014-01-18 08:05:22] CL Platform 0 version: OpenCL 1.2 AMD-APP (1214.3)
      [2014-01-18 08:05:22] Error -1: Getting Device IDs (num)
      [2014-01-18 08:05:22] clDevicesNum returned error, no GPUs usable
      [2014-01-18 08:05:22] 0 GPU devices max detected

      Why?

      Reply
      1. univ Post authorJanuary 18, 2014 at 09:43

        Hm, for some reason the kernel driver fglrx is not being loaded. As root, try

        modprobe fglrx

        and afterwards run

        amdconfig –lsa

        to see if your GPUs are found then.

        Reply
    6. Portos January 20, 2014 at 12:55

      Alas, nothing:

      # modprobe fglrx
      # amdconfig –lsa
      # amdconfig: No supported adapters detected

      Reply
      1. univ Post authorJanuary 24, 2014 at 11:53

        Hmm. It could be that either fglrx gets not properly loaded, or
        that fglrx is fine by itself and your GPUs are really not found. Are you
        100% sure the GPUs are working in this box? If you have only GPU and
        that’s the one where you have hooked up your monitor to, then that’s a
        yes. :) I would boot the box, and then check “dmesg” to see what the
        output was when fglrx tried to load. Did it even try to load?

        Reply
      2. univ Post authorJanuary 24, 2014 at 11:55

        PS: The fact that “modprobe fglrx” didn’t produce any output is
        good. Looks like it was loaded then. But make sure it is really there by
        running “lsmod” or “lsmod | grep fglrx”.

        Reply
    7. Vital January 24, 2014 at 05:17

      hi. i have this:
      [root@p4-36 cgminer-3.7.2]# CFLAGS=”-O2 -Wall -march=native
      -I/AMD-APP-SDK-v2.8-RC-lnx32/include”
      LDFLAGS=”-L/AMD-APP-SDK-v2.8-RC-lnx32/lib/x86″ ./configure
      –enable-scrypt
      checking build system type… x86_64-unknown-linux-gnu
      checking host system type… x86_64-unknown-linux-gnu
      checking target system type… x86_64-unknown-linux-gnu
      checking for a BSD-compatible install… /usr/bin/install -c
      checking whether build environment is sane… yes
      checking for a thread-safe mkdir -p… /bin/mkdir -p
      checking for gawk… gawk
      checking whether make sets $(MAKE)… yes
      checking whether make supports nested variables… yes
      checking for style of include used by make… GNU
      checking for gcc… gcc
      checking whether the C compiler works… no
      configure: error: in `/root/cgminer-3.7.2′:
      configure: error: C compiler cannot create executables
      See `config.log’ for more details

      before and after this, evrth was good.

      as a result – I cant run cgminer:
      [root@p4-36 cgminer-3.9.0]# ./cgminer.sh
      ./cgminer.sh: line 5: cgminer: command not found

      any suggestions?

      Reply
      1. univ Post authorJanuary 24, 2014 at 12:05

        Strange. “checking whether the C compiler works… no” means gcc is
        there but not working properly. Did you follow my installation
        instructions about the required packages and were all packages
        successfully installed? Double-check whether they were all installed!
        Make sure yum install “Development tools” finishes without problems.

        Is this CentOS 32bit? (Show output of “uname -a” and “cat /etc/issue”)

        Did you really extract the AMD APP SDK in / instead of /opt?

        I noticed when you tried to execute cgminer.sh you are in a directory
        called cgminer-3.9.0 instead of before cgminer-3.7.2. cgminer-3.9.0
        does not support GPU mining, so throw it away.

        Reply
    8. Alex Barringer October 24, 2014 at 18:36

      For those of you that claim that CGMiner doesn’t support graphics
      boards, you’d be full of it. Anything beyond 3.7.2 and it’s forks don’t
      have GPU support, they have ASIC and FPGA support.

      The CPU mining support was dropped in the CGMiner 3.5 series.

      If you can’t get your graphics cards to be recognized by CGMiner,
      that’s not the fault of the blog owner, you’re not reading the
      instructions carefully and obviously not browsing the CGMiner (README)
      file, if you did, you’d realize your error. Make sure that when you
      install the APP SDK that you reboot your computer, there is a specific
      reason why you should do this.

      in order for you to be able to get it to work with say, ATI based
      cards. You first have to make sure you have a GP-GPU and not an older
      card that doesn’t support OpenCL, otherwise it won’t work.

      You need to install the AMD FGLRX entire package (not just the
      driver, you need Catalyst, too), I’m using the 14.9 stable driver
      currently, then install AMD APP SDK. I don’t recommend using the Release
      Candidates (RCs), they’re really buggy, you can use the verion 2.9 but
      make sure you download the ADL 7.0 SDK they’re paired together for a
      reason.

      When all is said and done and you have all the prerequisites out of
      the way and get all the dependencies downloaded and installed.

      You can use this command line to get the graphics boards to be recognized:

      ./configure –enable-scrypt –enable-opencl

      Those two are required for you to do graphics board mining, even if
      you’re not doing S-Crypt mining and just doing SHA256D, you still need
      to declare S-Crypt to be enabled, otherwise you can’t do mining on the
      cards.

      It’s in the “README”! Do read it, next time!

      You can get the CGMiner 3.7.2 here:

      http://ck.kolivas.org/apps/cgminer/old/3.7/

      Alternately, you can get Kalroth’s version fork of 3.7.2 here:

      https://github.com/Kalroth/cgminer-3.7.2-kalroth

      You must have GIT installed to use the GITHUB version of this.

      Please read the README.md on that site before you go ahead and try to
      use it, it will save a lot of headaches. Do read up on how to use GIT
      correctly, too.

      Note: If you get massive hardware errors and then receive no accepted
      shares on either version of CGMiner or if doing S-Crypt only and use
      SGMiner (a fork of CGMiner) you are more than likely using the wrong
      graphics driver for the ADL and APP SDKs (meaning too old).

      I line up the following installations:

      1. ATI FGLRX full installation including Catalyst, version 14.9
      2. AMD APP SDK version 2.9 (not the RC version)
      3. AMD ADL SDK version 7.0

      This is what I use on Ubuntu and on CentOS and have no trouble at all using CGMiner or CGMiner-Kalroth.

      Many of the problems I see people have with this software is because they don’t read the instructions!

      Note: CGMiner 3.8.x and beyond DO NOT support graphics mining anymore, up to 3.7.2 does.

      Also, don’t install AMD APP SDK directly as root, that’s dangerous, use “sudo” instead.

      There is a script in the installation for the SDK called, “Install-APP-SDK.sh”, I highly suggest you use it.

      sudo ./Install-APP-SDK.sh

      By default, it will install in the /opt directory, which is what you
      want, anyhow. After you install it, reboot your computer normally, it’s
      actually a requirement for the installation to be completed, do this
      before you attempt to compile CGMiner.

      Reply
    9. Alex Barringer October 24, 2014 at 18:42

      I should also point out that when you use CGMiner for the first
      time, don’t overclock anything, leave your card the way it is and double
      check your setting for the mining site you’re using. If you have your
      Intensity up too high you can also receive massive hardware errors and
      no accepted shares, same thing can occur when your GP-GPU overheats
      and/or your dedicated memory on the card (which usually has no heatsinks
      on them (design problem).

      Reply
    10. J October 28, 2014 at 20:46

      I have a question, If I am not running a GUI on my CentOS system,
      and I have 2 x sapphire toxic r9 270x cards does one still need the
      radeon drivers? Are they only for X of are they needed for cgminer also?

      Reply
      1. J October 28, 2014 at 21:17

        Seems like the post from ‘Alex Barringer’ is pretty helpful.

        Reply
        1. univ Post authorOctober 28, 2014 at 21:20

          Agreed. :)

          Reply
      2. univ Post authorOctober 28, 2014 at 21:18

        Yes, you still need the Radeon drivers. They are needed for cgminer also.

         

How to: cgminer (Bitcoin, Litecoin etc.) + AMD Radeon driver install on CentOS的更多相关文章

  1. nVidia GPGPU vs AMD Radeon HD Graphics执行模式对比

    大家做高性能计算的朋友,想必对CPU的执行模式已经非常熟悉了吧.当代高级些的CPU一般采用超标量流水线,使得毗邻几条相互独立的指令能够并行执行——这称为指令集并行(ILP,Instruction-Le ...

  2. win10 出现 No AMD graphics driver is installed or the AMD driver is not functioning properly .....

    原因:win10的自动更新的功能没有关闭,更新有时候会出现显卡驱动更新不及时出现的问题. 解决方法一:使用 驱动人生(或者等等....) 进行升级驱动. 解决方法二:手动升级. 1.打开设备管理器 2 ...

  3. (二)ubuntu下安装Amd RX470驱动

    0X:ADM官方下载驱动 https://www.amd.com/en/support 查看本机驱动命令 lspci | grep -i vga 选择自己的驱动 下载对应的版本 现在最新的是:amdg ...

  4. Ubuntu下使用AMD APP编写OpenCL程序

    对于Ubuntu或其近亲(Lubuntu.Kubuntu.Mint等)编写OpenCL程序也不会太难.由于本例用的是AMD APP SDK,因此需要AMD的GPU以及相关驱动.首先,去AMD官网下载G ...

  5. Ryzen 4000'Vermeer' CPU和Radeon RX'Big Navi'图形卡

    Ryzen 4000'Vermeer' CPU和Radeon RX'Big Navi'图形卡 来自中国媒体的多篇报道表明,AMD都准备在2020年第四季度初推出其下一代Ryzen 4000'Zen 3 ...

  6. 解决 AMD 笔记本不插电源时屏幕偏暗的问题

    办法:关掉显卡设置里的 Vari-Bright 选项 最近换了锐龙版的笔记本,用着还不错,就是不插电源时看屏幕亮度不太适应,整体偏暗,有点费眼,差点就觉得 AMD 不 Yes 了.然后网上一顿找,发现 ...

  7. 从源码开始运行Bitcoin Core

    安装Ubuntu 环境:虚拟机 网络连接:桥接 系统版本:16.04 源:ali 安装编译环境(依赖库) sudo apt-get update sudo apt-get install build- ...

  8. Bitcoin源代码编译安装详解

    一.安装准备 安装环境:虚拟机Ubuntu 16.04 内存:2G 错误1:如果这里内存分配为1G,则会产生如下错误: g++ : internal compiler error: Killed (p ...

  9. 莱特币ltc在linux下的多种挖矿方案详解

    莱特币ltc在linux下的多种挖矿方案详解 4.0.1 Nvidia显卡Linux驱动Nvidia全部驱动:http://www.nvidia.cn/Download/index.aspx?lang ...

随机推荐

  1. C#实现微信公众号群发消息(突破破解一天只能发一次的限制)

    总体思路:1.首先必须要在微信公众平台上申请一个公众号. 2.然后进行模拟登陆.(由于我对http传输原理和编程不是特别懂,在模拟登陆的地方,不是特别清楚,希望有大神指教) 3.模拟登陆后会获得一个t ...

  2. [HDU 1963] Investment

    Investment Time Limit:10000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu   Descrip ...

  3. OpenXml操作Word的一些操作总结.无word组件生成word.

    OpenXml相对于用MS提供的COM组件来生成WORD,有如下优势: 1.相对于MS 的COM组件,因为版本带来的不兼容问题,及各种会生成WORD半途会崩溃的问题. 2.对比填满一张30多页的WOR ...

  4. asp.net 使用 MongoDB 初体验

    首先:驱动 如果asp.net 想使用MongoDB,.net没有自带的链接类.得用第三方或官方的链接类. 当然有很多种驱动,我就不一一介绍了. 今天我就介绍一个我比较常用的驱动-----MongoD ...

  5. Cocos2d-x获取随机数

    计算机是无法产生真正的随机数的,都是伪随机.获取随机数的方式和算法多种多样,这里只给出一种方法,基于最新的C++11. 1 2 3 4 5 #include <random> std::u ...

  6. 使用Visual Studio 2013 从头构建Web表单

    在这篇文章中,我将采取VS 2013中特定的模板,也就是没有身份验证的Web表单模板,并说明如何构建这个项目从头开始.在本教程的最后,你会最终有一个模板,内容几乎是一样的使用Web表单模板没有认证(文 ...

  7. 【Java基础】Java中的持久属性集Properties

    Properties 类的介绍 Properties 类表示了一个持久的属性集.Properties 可保存在流中或从流中加载.属性列表中每个键及其对应值都是一个字符串.一个属性列表可包含另一个属性列 ...

  8. HW5.16

    public class Solution { public static void main(String[] args) { for(int i = 2000; i <= 2010; i++ ...

  9. wave文件(*.wav)格式、PCM数据格式, goldwave 可以播放pcm raw audio

    1. 音频简介 经常见到这样的描述: 44100HZ 16bit stereo 或者 22050HZ 8bit mono 等等. 44100HZ 16bit stereo: 每秒钟有 44100 次采 ...

  10. Dllimport函数時无法在Dll中找到的入口点

    今天開發客戶提供的一個dll時出現無法找到入口點問題,由於客戶也不能明確說明dll,所以一時不知道如何下手,經查詢後找到可通過vs自帶的dumpbin.exe查看. Dumpbin.exe位于 VS的 ...