todxx / teamredminer

AMD GPU Optimized Cryptocurrency Miner
955 stars 203 forks source link

Ubuntu 20.04.2: Failed to list OpenCL platforms #343

Closed daxime closed 3 years ago

daxime commented 3 years ago

Hi, i have a issue with TeamRedMiner. He tell me "Failed to list OpenCL platforms".

I have followed this step to install ROCm on my Ubuntu 20.04.2: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html

At the end, these two commands don't work: /opt/rocm/bin/rocminfo /opt/rocm/opencl/bin/clinfo

But if i run them with sudo, both work well. I tried with Blender, without sudo he doesn't see my GPU, but with sudo it work fine. Same with XMRig.

So i tried with TeamRedMiner, but even with sudo, it say "Failed to list OpenCL platforms" ...

what can i do to solve this problem?

OS : Ubuntu 20.04.2 (fresh install and up to date) Kernel : 5.8.0-53-generic CPU : Ryzen 2600 GPU : 5500 XT (8Gb) RAM : 16Gb

torinedge commented 3 years ago

Try AMD's ROCR driver... https://amdgpu-install.readthedocs.io/en/latest/install-installing.html

daxime commented 3 years ago

Already tried. After the installation of that, Gnome don't launch any more ... Tired the "pro" install, Gnome work, but not OpenCL ...

I'll try the headless install. Not tried yet

Edit: Don't work...

The root is not longer required with these command: sudo usermod -a -G video $LOGNAME sudo usermod -a -G render $LOGNAME

Work for Blender, but still don't work for TRM ...

Edit 2: I don't know if it can help, but i tried 2-3 other mining software. LolMiner see my GPU (Navi 14 [Radeon RX 5500/5500M / Pro 5500M]), but give an error:

Build Log: Error: AMD HSA Code Object loading failed: HSA_STATUS_ERROR_INCOMPATIBLE_ARGUMENTS: The arguments passed to a functions are not compatible.
Problem in loading kernel
Active:  false (Unsupported device or driver version.) 

BMiner juste say: Failed to initialize the AMDCL platform: AMDCL: No AMD devices are available

daxime commented 3 years ago

NSFMiner work fine. I'll wait for a fix (if the issue is from TRM), and try again later.

SandboChang commented 3 years ago

I got Teamredminer to work after trying a couple hours. Somehow I never got it work by using the ROCm stack; I needed to use amdgpu-pro driver.

I followed this page: https://www.blog.albertbling.com/posts/how-to-mine-ethereum-on-linux/

When installing the Pro drivers, I had a couple errors related to dkpg unable to overwrite stuff. It will split out what they are, and you can then force it by sudo dpkg -i --force-overwrite <package location>

I needed to do this twice, but finally it still gave my the error related to amdgpu-dkms. Nonetheless I tried to run teamredminer, to my surprise it actually works.

Update: regarding the amdgpu-dkms issue, it's about the kernel, it looks like using an older one works. https://community.amd.com/t5/drivers-software/can-t-install-amdgpu-drivers-on-ubuntu-20-04-1-5-4-0-56-generic/td-p/426676

gutteronion commented 3 years ago

I know this is a bit late, but I figured that I would provide what I did to get teamredminer working. First of all, this worked for me using the open-source linux drivers, not the official AMDGPU PRO drivers.

Secondly, I did this on MANJARO. I grabbed this package from the AUR: https://aur.archlinux.org/packages/opencl-amd/

(I believe it is a .deb package to begin with, so it should be in the ubuntu/debian repos). Anyways, I found a package called "opencl-amd". This installs the official opencl files that the miner is calling for, and it works alongside the free open source AMDGPU drivers, (as well as the official AMDGPU PRO drivers, according to the Arch User Repository).

As, I have rarely used debian/Ubuntu, I do not know how to install this package. Please do your best to make informed decisions, and take careful steps using the information I provided if your are unfamiliar with linux.