ethereum-mining / ethminer

Ethereum miner with OpenCL, CUDA and stratum support
GNU General Public License v3.0
5.97k stars 2.28k forks source link

Only able to mine on first GPU. Attempts on others cause ethminer to hang. #2110

Open kevindckr opened 3 years ago

kevindckr commented 3 years ago

Description: I have a 7x5700XT system. After setting up the hardware and software, building ethminer, and attempting to start mining I found that only the first (based on reported PCI ID) GPU will mine. All other attempts to mine on other GPU's results in 0 reported hashrate and causes ethminer to hang on KeyboardInterrupt.

To reproduce the behavior (How I setup the system exactly as I can described it):

  1. On a system with a single GPU installed...
  2. Clean installation of Ubuntu 20.04.1 LTS
  3. "Downgrade" to kernel 5.4.0-54 to enable amdgpu-pro driver install in Step 3. (amdgpu-pro installed kept failing trying to DKMS 5.8.0 module) 2.1. System comes with both kernel 5.8.0(-34) and 5.4.0. Edit grub to boot into 5.4.0 ("1>2") 2.2 Use Synaptic to mark linux-generic-hwe-20.04, linux-modules-6.8.0-34-generic, linux-modules-extra-5.8.0-34-generic for complete removal. Apply. 2.3 Update grub again ("0"), reboot.
  4. Install amdgpu-pro driver 20.45 (Build 1188099) for Ubuntu 20.04.1 LTS 3.1. Download and extract. Run ./amdgpu-pro-install --opencl=legacy,rocr to only install OpenCL support 3.2 Add self to video and render group sudo usermod -a -G video $LOGNAME sudo usermod -a -G render $LOGNAME 3.3. Update grub and initramfs. I specifically used the command [sudo update-grub && sudo update-grub2 && sudo update-grub-legacy-ec2 && sudo update-initramfs -u -k all] and reboot
  5. Download and build ethminer 4.1.
    git submodule update --init --recursive
    mkdir build
    cd build
    cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF -DDEVBUILD=ON
    cmake --build .
    sudo make install
  6. Edit grub to enable access to AMD sysfs files. GRUB_CMDLINE_LINUX="amdgpu.ppfeaturemask=0xffffffff". Reboot.
  7. Install the other 6 GPUS.
  8. Attempt to run and ethminer test on any but the first installed GPU ethminer -Z 111100 -v 511 --HWMON 2 --cl-nobin --cl-devices 1. This results in 0 hash rate reported and hangs on interrupt.

Expected behavior: For all GPUs to mine..

Screenshots: ethminer working in simulation mode on first (0'th) GPU: image

ethminer working in simulation mode on first GPU (minus --cl-nobin): image

ethminer hanging on exit from simulation mode on second GPU: image

ethminer not working for any GPUs, including first (minus --cl-devices)(also hangs on intrerupt): image

ethminer --list-devices image

Start of clinfo image

First four GPUs in lshw image

Environment:

Additional Context: When editing the sysfs files (ex /sys/class/drm/card<#>/device) to attempt to set fan speeds all GPUs will report their hwmon/pwm1 was set to the desired value. Though on the hardware itself, only the GPU in question will actually spin up its fans. This may lead me to believe this is not an ethminer issue...?

jean-m-cyr commented 3 years ago

Try the master branch at https://github.com/miscellaneousbits/ethminer.git. Might help?

gvillo commented 3 years ago

Try the master branch at https://github.com/miscellaneousbits/ethminer.git. Might help?

@jean-m-cyr What happened with nsfminer? I would like to contribute and I noticed today that is gone :(

jean-m-cyr commented 3 years ago

I had to withdraw it temporarily to manage the github accounting. The project has moved to https://github.com/no-fee-ethereum-mining/nsfminer.git