notes:linux_miners
This is an old revision of the document!
Table of Contents
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
- Download the latest release, extract it, and place
miner
in~/.local/bin
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
- 6600 XT
- OpenCL via AMDGPU-PRO
- Change
x
to BTC wallet address
#!/usr/bin/bash # Miner sync ./'nsfminer' -P 'stratum2+tcp://x.Oak@daggerhashimoto.usa.nicehash.com:3353'
ROCm
- See ROCm for repo and installation
nsfminer
or ROCm requires Clang 13
sudo dnf install 'clang13-libs'
sudo mkdir -p '/usr/lib64/clang/13.0.1/include' && sudo ln -s '/usr/lib64/llvm13/lib/clang/13.0.1/include/opencl-c-base.h' '/usr/lib64/clang/13.0.1/include/opencl-c-base.h'
AMDGPU-PRO
- Last tested: 2022/05/05 on Fedora 35
- This is only necessary if ROCm isn't supported
Shim
- This is apparently required so that AMDGPU doesn't replace Mesa files and cause a black screen on next boot
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
- Be sure to extract
nsfminer
executable from the OpenCL package and not CUDA
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
/var/www/wiki/data/attic/notes/linux_miners.1651892001.txt.gz ยท Last modified: 2022/05/06 22:53 by Sean Rhone