Guide: Arch Linux - Headless Amd Opencl Setup & Cgminer From Source

Discussion in 'Proof-of-work Mining' started by Dirbaio, Jan 30, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. Dirbaio

    Dirbaio New Member

    Jan 6, 2016
    2
    5
    Male
    I was trying to setup my mining rig with Arch Linux. Unfortunately it's not quite trivial so here are some notes on how I got it to work:

    Add the unofficial catalyst and xorg117 repos. xorg117 is needed because apparently catalyst doesn't work with current xorg. Add the following to /etc/pacman.conf BEFORE the [core] section.
    Code:
    [catalyst]
    Server = http://catalyst.wirephire.com/repo/catalyst/$arch
    
    [xorg117]
    Server = http://catalyst.wirephire.com/repo/xorg117/$arch
    
    Import the repo key
    Code:
    pacman-key -r 653C3094
    pacman-key --lsign-key 653C3094
    
    Update your system, install stuff
    Code:
    pacman -Syu
    pacman -S git base-devel ncurses catalyst-hook catalyst-utils catalyst-libgl opencl-catalyst
    
    Enable catalyst hook so drivers are rebuilt on kernel upgrades
    Code:
    systemctl enable catalyst-hook
    systemctl start catalyst-hook
    
    REBOOT -- THIS IS IMPORTANT. You will get kernel crashes and clinfo hangs if you don't.

    Check OpenCL detects your GPUs:
    Code:
    clinfo
    
    you should see all your GPUs, if not something went wrong, try again.

    Install AMD ADL SDK from AUR: (if you don't want to use yaourt you can do it manually)
    Code:
    yaourt -S amd-adl-sdk
    
    Clone cgminer and build it:

    Code:
    git clone https://github.com/decred/cgminer.git
    cd cgminer
    chmod +x autogen.sh
    cp /usr/include/ADL/*.h ADL_SDK
    ./autogen.sh --enable-opencl
    
    it should say the following:
    Code:
      libcurl(GBT+getwork).: Enabled: -lcurl
      curses.TUI...........: FOUND: -lncurses
      OpenCL...............: FOUND. GPU mining support enabled
      scrypt...............: Disabled
      ADL..................: SDK found, GPU monitoring support enabled
    
    If it doesn't detect OpenCL or ADL something is wrong, you should fix it before proceeding.

    If configuring went okay, compile!
    Code:
    make
    You can now check your hashrate :)
    Code:
    ./cgminer --blake256 --benchmark
    
    From now on, follow the wiki's guide for actually getting cgminer to mine for you: https://wiki.decred.org/GPU_Mining
     
  2. Ayush

    Ayush Full Member
    Advocate (Facebook)

    Jan 9, 2016
    512
    100
    Male
    .
    .
    Is it possible to make a similar guide for Ubuntu.
     
    Reynold and rille_swe like this.
  3. Reynold

    Reynold Member

    Jan 28, 2016
    198
    70
    Male
    Programmer
    The commands are almost identical in Ubuntu:
    Code:
    cd ~/source
    git clone https://github.com/decred/cgminer.git
    cd cgminer
    ./autogen.sh --enable-opencl
    make
    make install
    
    To run your miner:
    Code:
    /usr/local/bin/cgminer --blake256 --intensity d -o http://dcr.suprnova.cc:9110 -u YourPoolUser.YourPoolWorker -p YourPoolPassword -o http://dcr.pool.mn:4722 -u YourPoolUser.YourPoolWorker -p YourPoolPassword
    
    I didn't have an AMD card on this Ubuntu machine so I skipped the SDK part.
     
  4. Ayush

    Ayush Full Member
    Advocate (Facebook)

    Jan 9, 2016
    512
    100
    Male
    .
    .
    Will it work on Intel GPU?
    Here is what I tried - I downloaded opencl files from Intel website. Got rpm files converted to deb and installed base. And headers.
    But clinfo command gives no platforms
    What to do??
     
  5. Reynold

    Reynold Member

    Jan 28, 2016
    198
    70
    Male
    Programmer
    @Ayush, Unfortunately I will not be able to verify this for you, as my Ubuntu box has an Nvidia card. Perhaps someone else can provide info.
     
    Ayush likes this.
  6. Ayush

    Ayush Full Member
    Advocate (Facebook)

    Jan 9, 2016
    512
    100
    Male
    .
    .
    The problem is opencl ...
    I don't know how to properly install it.
     

Share This Page