User Tools

Site Tools


notes:linux_miners

This is an old revision of the document!


Gminer

  • :!: The x for --user is the BTC Wallet address
  • :!: Nightwane for --user is the worker name and can be changed
./miner --algo 'ethash' --server 'stratum+ssl://stratum.usa-east.nicehash.com:33353' --user 'x.Nightwane'

Nightwane

  • RTX 3060 (LHRv2)
  • CUDA
  • Sets GPU fan speed to static 80%
  • Sets GPU core clock offset to +125
  • Sets GPU memory clock offset to +1300
  • Sets GPU power limit to max 190W

Install

mkdir -p ~/'.local/bin' && gio open ~/'.local/bin'

Script

  • :!: Change x to a BTC wallet address
nano ~/'.local/bin/Nightwane.sh'
#!/usr/bin/bash

# GPU OC
sync
nvidia-settings --assign='GPUFanControlState'='1'
nvidia-settings --assign='GPUTargetFanSpeed'='80'
nvidia-settings --assign='GPUPowerMizerMode'='1'
nvidia-settings --assign='GPUGraphicsClockOffsetAllPerformanceLevels'='125'
nvidia-settings --assign='GPUMemoryTransferRateOffsetAllPerformanceLevels'='1300'
sudo nvidia-smi --power-limit='190'

# Miner
sync
'miner' --algo 'ethash' --server 'stratum+ssl://stratum.usa-east.nicehash.com:33353' --user 'x.Nightwane'

Permissions

chmod +x ~/'.local/bin/miner' ~/'.local/bin/Nightwane.sh' && sudo restorecon -F -I -R -v ~/'.local/bin' && sync

GNOME Shell

  • Use as keyboard shortcut F7
gnome-terminal -- sh -c ~/'.local/bin/Nightwane.sh'

T-Rex

  • :!: The x for --user is the BTC Wallet address
./'t-rex' --algo 'ethash' --url 'stratum+ssl://stratum.usa-east.nicehash.com:33353' --user 'x' --worker 'Nightwane'

Nightwane

  • RTX 3060 (LHRv2)
  • CUDA
  • Sets GPU fan speed to static 80%
  • Sets GPU core clock offset to +125
  • Sets GPU memory clock offset to +1300
  • Sets GPU power limit to max 190W
#!/usr/bin/bash

# GPU OC
sync
nvidia-settings --assign='GPUFanControlState'='1'
nvidia-settings --assign='GPUTargetFanSpeed'='80'
nvidia-settings --assign='GPUPowerMizerMode'='1'
nvidia-settings --assign='GPUGraphicsClockOffsetAllPerformanceLevels'='125'
nvidia-settings --assign='GPUMemoryTransferRateOffsetAllPerformanceLevels'='1300'
sudo nvidia-smi --power-limit='190'

# Miner
sync
./'t-rex' --algo 'ethash' --url 'stratum+ssl://stratum.usa-east.nicehash.com:33353' --user 'x' --worker 'Nightwane'

nsfminer

Oak

  • :!: This failed to work consistently and will be removed at some point 1)
  • RX 580
  • :!: OpenCL via AMDGPU-PRO 2) 3)
  • :!: Change x to BTC wallet address
#!/usr/bin/bash

# Miner
sync
./'nsfminer' -P 'stratum2+tcp://x.Oak@daggerhashimoto.usa.nicehash.com:3353'

AMDGPU-PRO

  • Last tested: 2022/03/16 on Fedora 35
  • :!: This failed to work 2022/03/17 on a fresh Fedora 35 install, and magically worked later. This is seemingly unreliable.

Shim

sudo dnf copr enable 'rmnscnce/amdgpu-pro-shims'
sudo dnf install 'amdgpu-pro-shims'

Download

  • :!: 21.30 is the last release from AMD with the full driver package in .xz
cd ~/'Downloads'
aria2c 'https://drivers.amd.com/drivers/linux/amdgpu-pro-21.30-1290604-rhel-8.4.tar.xz' --referer='drivers.amd.com'

Extract

cd '/var/local'
sudo tar xf ~/'Downloads/amdgpu-pro-21.30-1290604-rhel-8.4.tar.xz'
sudo mv 'amdgpu-pro-21.30-1290604-rhel-8.4' 'amdgpu'

Repo

sudo -e '/etc/yum.repos.d/amdgpu.repo'
[amdgpu]
name=AMDGPU Packages
baseurl=file:///var/local/amdgpu/
enabled=1
skip_if_unavailable=1
gpgcheck=0
cost=500
metadata_expire=300

Packages

sudo dnf update && sudo dnf install opencl-rocr-amdgpu-pro rocm-device-libs-amdgpu-pro hsa-runtime-rocr-amdgpu hsakmt-roct-amdgpu hip-rocr-amdgpu-pro comgr-amdgpu-pro opencl-orca-amdgpu-pro-icd libdrm-amdgpu-common ocl-icd-amdgpu-pro opencl-rocr-amdgpu-pro amdgpu-pro-core clinfo && sync

Finalize

sync && systemctl reboot
clinfo

Service

Install

mkdir -p ~/'.local/bin/nsfminer' && gio open ~/'.local/bin/nsfminer'

Service

  • :!: Change x to a BTC wallet address
sudo -e '/etc/systemd/system/nsfminer.service' && sudo sed -i 's/CHANGEME/'$USER'/g' '/etc/systemd/system/nsfminer.service' && sudo systemctl daemon-reload && sudo systemctl enable 'nsfminer'
[Unit]
Description=nsfminer GPU Miner
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=CHANGEME
Group=CHANGEME
WorkingDirectory=/home/CHANGEME/.local/bin/nsfminer
ExecStart='/home/CHANGEME/.local/bin/nsfminer/nsfminer' -P 'stratum2+tcp://x.Oak@daggerhashimoto.usa.nicehash.com:3353'
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Group

  • It appears for OpenCL applications in the background, they need video permissions
  • TODO: Test without this
sudo usermod --append --groups 'video' 'espionage724'

SELinux

Context

sudo restorecon -F -I -R -v ~/'.local/bin/nsfminer'

Bool

  • This appears to allow DNS resolutions
sudo setsebool -P 'nis_enabled' 'on'

Permissions

sudo setenforce 0
sudo systemctl start 'nsfminer' && sudo systemctl status 'nsfminer' -l
mkdir -p ~/'policies' && cd ~/'policies' && sudo grep 'miner' '/var/log/audit/audit.log' | sudo audit2allow -M 'miner' && sudo semodule -i 'miner.pp' && cd ~
mkdir -p ~/'policies' && cd ~/'policies' && sudo grep 'cl-0' '/var/log/audit/audit.log' | sudo audit2allow -M 'cl-0' && sudo semodule -i 'cl-0.pp' && cd ~
sudo systemctl stop 'nsfminer' && sudo setenforce 1 && sync
1)
AMD GPU compute support is awful beyond recognition on Linux
2)
ROCm does not work on this computer because it needs PCIe Atomics support
3)
Clover with nsfminer caused a complete system lock-up
/var/www/wiki/data/attic/notes/linux_miners.1647687606.txt.gz ยท Last modified: 2022/03/19 07:00 by Sean Rhone