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

CLInfo reports error, AMD GPU on Ubuntu #1662

Open RichGit101 opened 6 years ago

RichGit101 commented 6 years ago

Requesting help to fix this issue with CLInfo. In brief, GPU mining is not working, CPU mining is working smoothly, traced back to compile logs.No errors reported in Make but CLInfo reports error.

Basic information

Compile issues

All were successful. could complete compile and run. Could join pool. But only CPU and not GPU mining works.

run cmake -LA . in the build folder and add the output here worked

Issue with the execution

AMD OpenCl issue

$ clinfo Number of platforms 1 Platform Name Clover Platform Vendor Mesa Platform Version OpenCL 1.1 Mesa 18.0.0-rc5 Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd Platform Extensions function suffix MESA

Platform Name Clover Number of devices 0

NULL platform behavior clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) No platform clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) No platform clCreateContext(NULL, ...) [default] No platform clCreateContext(NULL, ...) [other] clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No platform

Stability issue

JerichoJones commented 6 years ago

I don't think MESA works. You need the legacy driver I believe.

RichGit101 commented 6 years ago

Please elaborate, JJ

Spudz76 commented 6 years ago

Uninstall everything mesa, reinstall AMDGPU-Pro. Platform needs to say AMD-APP not Clover. apt purge mesa-opencl-icd

Ubuntu desktop tends to come with Clover preinstalled, Server doesn't. Betting you've installed Desktop version of Ubuntu 18? We probably should add to docs about removing clover this is the second recent occurrence of this from the same vector (install Desktop -> AMDGPU-Pro doesn't override Clover)

The buggy part is that there should be two platforms, Clover and then AMD-APP side by side, or that's how older versions seemed to work. Then you could leave Clover there and just set platform:1 or such to avoid it and use the AMD one. But you've got only the single platform just like the other issue, so it must be new bugs.

Also unless you've got Vega use the legacy opencl option for the AMDGPU-Pro installer (no rocm).

lilyanatia commented 6 years ago

you don't need to uninstall mesa. xmr-stak will only try (and fail) to use mesa if it doesn't detect the AMDGPU-Pro platform.

Spudz76 commented 6 years ago

Something in the installer skips the amdgpu-pro-igd if another is already available, though, apparently.

Agree it "used to" just have the dual platforms and worked fine by ignoring the Clover one. But not anymore for some reason (Ubuntu 18).