If you are considering trying cpu mining, for example, monero on xmrig, here's some tips. Artix works perfectly fine.
1. You generally want to run "headless", just using a loaner monitor and keyboard for easy set up. Then you disconnect them.
2. Add "openssh" and "screen" packages.
pacman -S screen openssh openssh-openrc
3. Install xmrig and generate the config.json file. Plenty of documentation and all you need at https://xmrig.com. You can try a binary or build it from source. Xmrig has a nice wizard to generate the config file at https://xmrig.com/wizard
4. Add ssh to the openrc default level so it starts on boot up:
rc-update add sshd default
Go ahead and start it now:
rc-service sshd start
A good way to troubleshoot is to make sure you have the openrc script:
rc-update show -v
5. Shutoff and disconnect the monitor and keyboard. Don't shutdown the miner.
6. From you computer, open a terminal and ssh to your miner and "su":
ssh [email protected] #use correct IP address
su
"actual root password"
7. Create new screen session. Note the first time it prints some messages you can ignore:
screen -S miner
8. At this point you get a blank terminal. You are now in a screen session. Start xmrig
xmrig -c /path-to-config/config.json
It should start displaying status messages and such. Detach when you are sure it's up and running:
"ctrl-a", then "d"
9. Verify that the session is still active:
screen -ls
It should be listed.
Close ssh session
exit
exit
exit # (if you want to close the terminal on your computer)
Other:
Shutdown xmrig but keep miner running:
ssh to monitor as before and "su" as before
screen -r miner #reattach to session
#(You should see the miner displaying status messages)
"ctrl-c"
#If you want to kill the screen session, type "exit". If you want to keep it:
"ctrl-a" then "d"
exit
exit
Stop the mining, and power off the miner:
Repeat stopping xmrig, and detach. Then
openrc-shutdown -p 1 #(Miners run hot, so I give it a minute to cool down)
Check on the miner
ssh to miner and "su" as before.
screen -r miner
"ctrl-a" and "d" #when you are done
screen -ls #make sure the session is still active
exit
exit