Post
Topic
Board Mining (Altcoins)
Re: tdxminer lyra2z/XZC Miner for AMD GPUs on Linux
by
zmago
on 10/08/2018, 20:33:29 UTC
Here is my experience.

Running: Fresh Ubuntu 16.04.4 install
GPUs: 6x Sapphire Nitro+ RX 580 8gb

hashrate per card: 3,7 mh/s
rig hashrate: 22,4 - 22,5 mh/s

drivers: amdgpu-pro with rocm
custom fan speed of 70%

my installation:

Graphic drivers:
Code:
sudo apt update
sudo apt dist-upgrade
sudo reboot
wget https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.40-492261.tar.xz
tar -Jxvf amdgpu-pro-17.40-492261.tar.xz
cd amdgpu-pro-17.40-492261
./amdgpu-pro-install –y
sudo reboot
groups
sudo usermod -a -G video $LOGNAME
sudo apt install -y rocm-amdgpu-pro
env LLVM_BIN=/opt/amdgpu-pro/bin /opt/amdgpu-pro/bin/clinfo
echo 'export LLVM_BIN=/opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.sh
echo 'setenv LLVM_BIN /opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.csh

Fancontrol

Code:
sudo apt-get install lm-sensors
sudo apt-get install fancontrol
sudo pwmconfig
#do the test follow instructions at the end of test fans will spin at 100% don't worry. we will disable that
sudo /etc/init.d/fancontrol stop

My script for manual fan control little above 70% [0 - fans stop spinning and 255 fans spinn at 100%]

Copy this code
Code:
sudo /bin/su -c "echo 1 > /sys/class/drm/card0/device/hwmon/hwmon1/pwm1_enable"
sudo /bin/su -c "echo 1 > /sys/class/drm/card1/device/hwmon/hwmon2/pwm1_enable"
sudo /bin/su -c "echo 1 > /sys/class/drm/card2/device/hwmon/hwmon3/pwm1_enable"
sudo /bin/su -c "echo 1 > /sys/class/drm/card3/device/hwmon/hwmon4/pwm1_enable"
sudo /bin/su -c "echo 1 > /sys/class/drm/card4/device/hwmon/hwmon5/pwm1_enable"
sudo /bin/su -c "echo 1 > /sys/class/drm/card5/device/hwmon/hwmon6/pwm1_enable"
sudo /bin/su -c "echo 200 > /sys/class/drm/card0/device/hwmon/hwmon1/pwm1"
sudo /bin/su -c "echo 200 > /sys/class/drm/card1/device/hwmon/hwmon2/pwm1"
sudo /bin/su -c "echo 200 > /sys/class/drm/card2/device/hwmon/hwmon3/pwm1"
sudo /bin/su -c "echo 200 > /sys/class/drm/card3/device/hwmon/hwmon4/pwm1"
sudo /bin/su -c "echo 200 > /sys/class/drm/card4/device/hwmon/hwmon5/pwm1"
sudo /bin/su -c "echo 200 > /sys/class/drm/card5/device/hwmon/hwmon6/pwm1"

and create file that will auto run at user logon.

Code:
cd Desktop
nano fanspeed.sh
#now paste inside the above code
ctrl+x
confirm with y and enter
chmod +x fanspeed.sh

For one GPU card so you can compare what to delete or change if you have less or more then 6 GPUs
Code:
sudo /bin/su -c "echo 1 > /sys/class/drm/card0/device/hwmon/hwmon1/pwm1_enable"
sudo /bin/su -c "echo 200 > /sys/class/drm/card0/device/hwmon/hwmon1/pwm1"

Now search your your system for startup applications and open it.
Add new startup first imput name and second imput point to file fanspeed.sh at your Desktop

If your fans don't start to speen there is most likely permissions problem
You can try disable password request for sudo.
You can do this with "sudo visudo" and go to the end of line and type: USERNAME  ALL=(ALL) NOPASSWD:ALL
Please note this is huge security risk, just do this for test.

Miner
Code:
wget https://github.com/todxx/tdxminer/releases/download/v0.2.2.2/tdxminer-v0.2.2.2.tgz
tar -xvfz tdxminer-v0.2.2.2.tgz
cd tdxminer-v0.2.2.2
sudo mv tdxminer /home/USERNAME/
cd /home/USERNAME/
nano mine.sh
#inside of this file set your mining settings pool, wallet [ltc wallet will be example], c=LTC (because we use ltc wallet, if you will use bitcoin wallet you will change LTC to BTC)
#for example:
./tdxminer -a stratum+tcp://lyra2z.eu.mine.zpool.ca:4553 -u your_LTC_wallet -p c=LTC
ctrl+x
confirm with Y and enter
chmod +x mine.sh

Auto startup script on ubuntu logon
Code:
sudo apt-get install screen
cd
nano autostartup.sh
#inside paste code autostartup code bellow this
ctrl+x
confirm with Y and enter
chmod +x autostartup.sh

Autostartup.sh code:
Code:
#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
DELAY=$DEFAULT_DELAY
else
DELAY=$1
fi
sleep $DELAY
cd /home/USERNAME/
su USERNAME -c "screen -dmS lyra2z ./mine.sh"

Edit rc.local to start autostartup.sh
Code:
sudo nano /etc/rc.local
#Find the line which reads "exit 0" and  and type above that line
/home/USERNAME/autostartup.sh 15 &
ctrl+x
confirm with Y and enter

At this point you can restart your rig.
Soon after you will logon to system you will hear fans.
Give it a minute and check terminal for screen with "screen -list"
Attach to screen with: screen -x lyra2z
Detach and keep running with: ctrl+a+d

Hope this guide will be helpful.