GreenRaccoon23
New member
***This guide shows how to set up sgminer (GPU miner) on 64-bit Linux when your computer has an AMD/ATI GPU or APU.*** This is targeted for Ubuntu, Xubuntu, etc. users. I can't get it to work for Linux Mint or Arch Linux. I figured out how to run sgminer on Linux Mint and Arch Linux. See the *NOTE* after step 26.
I've spent a ridiculous amount of time trying to figure all of this out, so I've made this guide ridiculously *DETAILED* to prevent any more headaches. This guide looks daunting , but it's just because I tried to cover every single base I could think of. Even if you're a Linux noob, you should be able to do this fine. :grin:
*****UPDATE*****
I've written some scripts for you guys. :grin: If you'd rather run some scripts than copy and paste every single step below, you have the option to do that now. :grin:
13 Nov-14: Updated the scripts. Only a couple minor changes, but I also made a sweet ascii image.
Here's how to copy and run them:
1- Run this as one, single command (to download the right scripts for your distribution):
2- Run the first script:
If you're running Arch Linux, you'll need to run './arch-sgminer1.in' instead.
3- The script will tell you when to run the next ones.
----------------------------------------------------------------------------------------------------
Second Option: Step-by-Step Instructions
1- Update your computer and install dependencies. Open up Terminal with ctrl+alt+t. Then copy (ctrl+c) and paste (ctrl+SHIFT+v) this:
Set Up AMD Drivers
2- Check which driver you're using. Open up Terminal with ctrl+alt+t and type this in:
3- If that command wasn't found, skip to step 6 because you're not using an fglrx driver. :smile: If that command did give you something, that's ok, but it means you need to do more work, sorry. :sad: You're going to need to switch drivers. Run this command.
4- If that worked, great. If it didn't, it should be ok too. In either case, do this next.
5- Reboot. (If you can't login to your computer after rebooting, post 3 of this thread might help.)
6- Download the AMD 14.6 Catalyst driver:
7- Install the Catalyst driver. (Don't change the *'s.)
8- The installation application will now launch. Soon, a a screen should pop up with the two options 'Install Driver 14.20...'' or 'Generate Distribution Specific Driver Package'.
11- BEFORE you reboot, run these commands.
12- Reboot.
13- Now install the APP SDK:
14- Reboot.
Install Sgminer
15- The hard part's over (yay!). Copy/git sgminer's files to your computer:
16- Sgminer needs three files from the AMD ADL SDK:
17- Compile, make, and install it.
18- Check to make sure it worked
19- If it does detect your GPU('s), continue to step 22. If it does not detect your GPU('s) run "sudo aticonfig --adapter=all --initial" and then reboot.
I've spent a ridiculous amount of time trying to figure all of this out, so I've made this guide ridiculously *DETAILED* to prevent any more headaches. This guide looks daunting , but it's just because I tried to cover every single base I could think of. Even if you're a Linux noob, you should be able to do this fine. :grin:
- Note: This won't work for every AMD GPU, but it should work for the most common ones used for mining (as of the time this thread was posted). Your computer probably won't turn into a nuclear bomb if something goes wrong, but BACK UP beforehand just in case. Be on the safe side so it's not the end of the world if something odd happens and you have to reinstall Ubuntu. (I had to reinstall Ubuntu 3 times trying to figure all this out, hence the reason why I'm making this guide.)
*****UPDATE*****
I've written some scripts for you guys. :grin: If you'd rather run some scripts than copy and paste every single step below, you have the option to do that now. :grin:
13 Nov-14: Updated the scripts. Only a couple minor changes, but I also made a sweet ascii image.
Here's how to copy and run them:
1- Run this as one, single command (to download the right scripts for your distribution):
Code:
cd ~ &&
wget "https://raw.githubusercontent.com/GreenRaccoon23/sgminer-install-scripts/master/INSTALL" &&
chmod +x INSTALL &&
./INSTALL
Code:
./sgminer1.in
3- The script will tell you when to run the next ones.
----------------------------------------------------------------------------------------------------
Second Option: Step-by-Step Instructions
1- Update your computer and install dependencies. Open up Terminal with ctrl+alt+t. Then copy (ctrl+c) and paste (ctrl+SHIFT+v) this:
Code:
sudo aptitude update
sudo aptitude upgrade -y
sudo aptitude install -yr git curl unzip automake autogen yasm autoconf dh-autoreconf build-essential pkg-config openssh-server screen libtool libcurl4-openssl-dev libtool libncurses5-dev libudev-dev xserver-xorg-core xserver-xorg-video-ati gdebi gedit execstack dh-modaliases lib32gcc1 dkms
2- Check which driver you're using. Open up Terminal with ctrl+alt+t and type this in:
Code:
fglrxinfo
Code:
sudo sh /usr/share/ati/fglrx-uninstall.sh
Code:
sudo aptitude purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx &&
sudo aptitude reinstall -y libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core &&
sudo dpkg-reconfigure xserver-xorg
6- Download the AMD 14.6 Catalyst driver:
Code:
cd ~/Downloads
curl -o driver.zip http://www2.ati.com/drivers/linux/amd-catalyst-14-9-linux-x86-x86-64.zip --referer http://support.amd.com/en-us/kb-articles/Pages/Catalyst-Linux-Installer-
Code:
unzip driver.zip
cd fglrx-14.20
chmod a+x *.run
sudo sh *.run
- If an error screen pops up instead, use this command to open up the log
Code:sudo gedit /usr/share/ati/fglrx-install.log
- Then install the packages it tells you that it needs:
Code:sudo apt-get install ...
- Then run:
Code:sudo sh ~/Downloads/fglr*/*.run
- First, choose 'Generate Distribution Specific Driver Package' and click 'Continue'.
- Next, choose 'I agree' (if you agree).
- Next, scroll down and choose 'Build package for detected OS: Ubuntu/trusty', then click 'Continue'.
- Next, it'll look like it has crashed. It actually IS running; it just takes forever. Seriously, forever--like up to 15 minutes.
- Once it's FINALLY done, click 'Exit' to close.
- ***IMPORTANT!*** Next, something will pop up. DO NOT CHOOSE 'YES.' CHOOSE 'NO'. (If you accidentally hit 'yes', it shouldn't be a big deal though. Just keep going.)
Code:
sudo gdebi *.deb
Code:
sudo aptitude update
sudo aptitude upgrade -y
sudo aticonfig --adapter=all --initial
sudo aptitude install -yr boinc-amd-opencl opencl-headers mesa-utils libglu1-mesa libgl1-mesa-glx libgl1-mesa-dri
13- Now install the APP SDK:
Code:
cd /tmp
curl -o amd-app-sdk.tgz http://blog.truepps.com/downloads/AMD/AMD-APP-SDK-v2.9-lnx64.tgz
sudo mkdir amd-app-sdk
sudo mv amd-app-sdk.tgz amd-app-sdk
cd amd-app-sdk
sudo tar -zxvf amd-app-sdk.tgz
sudo tar -zxvf AMD-APP-SDK-v2.9-RC-lnx64.tgz
cd AMD-APP-SDK-v2.9-RC-lnx64
sudo cp -pv lib/x86_64/* /usr/lib/
sudo rsync -avl include/CL/ /usr/include/CL/
cd ..
sudo tar -zxvf icd-registration.tgz
sudo rsync -avl etc/OpenCL/ /etc/OpenCL/
sudo ldconfig
sudo perl default-install_lnx_64.pl
sudo aticonfig --adapter=all --initial
Install Sgminer
15- The hard part's over (yay!). Copy/git sgminer's files to your computer:
Code:
cd ~/
git clone https://github.com/sgminer-dev/sgminer.git
Code:
cd ~/Downloads
curl -o adl_sdk.zip http://blog.truepps.com/downloads/AMD/ADL_SDK_6.0.zip
mkdir adl_sdk
mv adl_sdk.zip adl_sdk
cd adl_sdk
unzip adl_sdk.zip
cp ~/Downloads/adl_sdk/include/* ~/sgminer/ADL_SDK
Code:
cd ~/sgminer
git submodule init
git submodule update
autoreconf -i
CFLAGS="-O2 -Wall -march=native" ./configure
make
sudo make install
Code:
sgminer -n
Last edited by a moderator: