fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

AMD GPU some cards low hashrate CentOS 7.3 #1431

Closed SveguS80 closed 6 years ago

SveguS80 commented 6 years ago

Please provide as much as possible information to reproduce the issue.

Basic information

Background and Question

Started out mining on this rig using Windows 10. After the latest windows update (early April) something happened and I have not managed to get the system to work in a stable state. So decided to give Centos another shot. So far I am VERY happy with stability. Just performance that is not up to scratch. The fact that some cards are not being "worked" to the max would that be something i can alter in XMR-STAK?, or is it more likely to be a driver issue?

I know there are no "offically known" Linux drivers for the Asus B250 MB.

AMD OpenCl infornation

  run `clinfo` and add the output here
  See attached clinfo.txt
[clinfo.txt](https://github.com/fireice-uk/xmr-stak/files/1912740/clinfo.txt)

Performace issue

psychocrypt commented 6 years ago

Do you ise any riser extender? It could also be that you have a pci-e switch on your mainboard which is not fully supported by centos. Do you tried a debian based distribution?

SveguS80 commented 6 years ago

I do use riser extenders, they worked fine for me in Windows though. I have not tested with Debian based yet. Interesting that pci-e switch might not be supported there. Which debian dist would you recommend for easy of use and stability with xmr-stak, and AMD drivers :) they are not exactly known for working well together :)

psychocrypt commented 6 years ago

I think ubuntu is supported best.

SveguS80 commented 6 years ago

Thank you! Will have to give that a go, will report back with findings.

Spudz76 commented 6 years ago

Ubuntu 16 !!! Not the latest, it's pretty unworkable also.

SveguS80 commented 6 years ago

Why unworkable? trawling the forums, that seems the most stable version with nvidia and amd drivers in combo

Spudz76 commented 6 years ago

I have not tried it and got the opposite impression from reading. I did try Debian Stretch (same basis) and none of the AMDGPU-Pro stuff would work properly Nvidia works on anything/everything. You do have to adjust kernel revision (backports) manually on most of them to get amd+nvidia working together, maybe the latest just has a working kernel by default. I run 4.13 on all of mine it seems to work best, 4.10 had worse CPU mining speeds but about equal on GPUs. They never work together as far as having both accessible via Xorg for tweak apps (nvidia-settings, overdrive control) as their drm/dri/glx libs fight each other.

SveguS80 commented 6 years ago

Latest 16.04.04 Ubuntu server with HWE runs on the 4.13 kernel so should be ok

Spudz76 commented 6 years ago

Yes, that is exactly the distro and kernel I use for best results.

Spudz76 commented 6 years ago

Also with riser extensions most of mine won't even pass POST tests unless I manually drop the PCIe speed maximums. I use gen1 unless that doesn't work and then I go gen2 if necessary to make a specific card work (Fiji / Fury Nano don't like gen1) but gen3 is right out. Linux will kick the gen-lock from BIOS/CMOS setup back up to gen3 as it boots unless you use driver module options to disable it from "helping you out". Windows probably doesn't even bother trying to override what BIOS had setup for PCIe.

SveguS80 commented 6 years ago

Spudz76:

I have not had any issues with the cards failing to work.

May I ask what combination of driver versions you have used when managing to get AMD and NVIDIA cards to coexist? Using debian with kernel 4.13?

SveguS80 commented 6 years ago

With only 1 card attached to the 1st PCIE slot. Still getting the same low Hashrate on card 0.

With all cards attached: I have various output.

Sometimes card 0 is working sometimes not.

I Stopped the Ubuntu experiment and plugged in the Centos HDD again.

And the hasrates are better on card one although not working at "normal" speed.

Result so far:

Centos seems to have an issue with the motherboard not able to switch between discreet graphics and pcie as the screen goes dead as soon as CentOS boots up. But the hashrates are better. Likely because of using AMD 17.40 drivers.

Ubuntu does produce the screen output on the monitor so the PCIE switching does not seem to be a problem. But the hashrates on several cards are unexpected.

Any ideas on where to troubleshoot this next?

ryan-ronnander commented 6 years ago

This is partially why I've moved my rigs from CentOS 7 to both Fedora and openSUSE Tumbleweed running kernel version 4.15+.

I still have a CentOS 7 machine for testing. My hashrates are slightly lower on CentOS. Memory clocks do not overclock properly compared to 4.15+ kernels.

@SveguS80 If you want to try a Fedora build, I highly suggest running the amdgpu open stack and only installing the OpenCL proprietary component. See my github repo for a how-to.

SveguS80 commented 6 years ago

Im going to put this on ice for a while, my Centos rig is running stable without overheating.

I've managed to put my nvidia cards in my desktop and run them there instead of trying to make the coexists. Thanks for all the help. I will put this as fixed for now.

@ryan-ronnander Your suggestion sounds very promising, i have not setup any Fedora builds yet and have no spare time to educate myself at the moment :) but that will be my next step!

@psychocrypt A big thanks to XMR-STAK team for a smooth build process for both amd and nvidia! And responding on the forum, the dev fee stays :)