[SOLVED] Slackware64 current (15.0) OpenCL added to stock Mesa amdgpu - call for testing
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed 20.40, but even since a recent earlier version, suddenly my ethereum and feathercoin miners do nothing when they start (and just stay doing nothing for days) and BOINC may not be detecting my GPUs anymore. I'm wondering if a Slackware-current or SBo update messed something up. I use KDE5 and uninstalled multilib, rebuilt amdgpu-opencl. I'm still using the 5.4.n kernels because 5.10.n didn't work with ZFS.
can't say what's up with 5.4 - left that behind. amdgpu-opencl just copies in the needed opencl libs and bins for amdgpu driver and "shouldn't" overwrite or get overridden on updates. Mesa etc does need to be in one piece. Just updated today and all seems well in BOINC land.
linux 5.10.5 #1 SMP Wed Jan 6 15:24:42 CST 2021 x86_64 AMD Ryzen 9 3900X 12-Core Processor AuthenticAMD GNU/Linux
I still can't get the included clinfo to work, but Oblomov's clinfo still works. I also haven't had a chance to look into the icd loader header mention in post #44 above.
Last edited by kingbeowulf; 01-07-2021 at 10:11 PM.
Reason: spelling
can't say what's up with 5.4 - left that behind. amdgpu-opencl just copies in the needed opencl libs and bins for amdgpu driver and "shouldn't" overwrite or get overridden on updates. Mesa etc does need to be in one piece. Just updated today and all seems well in BOINC land.[...]
I think mesa and everything else 'is in one piece,' but what's the rest? 100 packages?
dchemlik, you mean the 100 or so packages in AMDGPU-PRO driver? That beast includes amdgpu and amdgpu kernel modules, various support libs, vulkan, clinfo (not working here) and OpenCL. Like the Nvidia blob, it basically replaces Mesa. I just strip out the OpenCL bits for Polaris, Vega and Navi GPUs.
ah...the 3 packages should be xorg-server (or -xnest, -xephyr, etc if you use the alts), mesa, and xf86-video-amdgpu, then icd paths in /etc/ should be
I'm unsure why you'd need X/display software to run OpenCL itself; aren't some installations 'headless?'
Will there be a place to download the entire current SlackBuild files in a tarball instead of having to go through the thread and do a bunch of patches?
I'm unsure why you'd need X/display software to run OpenCL itself; aren't some installations 'headless?'
Will there be a place to download the entire current SlackBuild files in a tarball instead of having to go through the thread and do a bunch of patches?
AFAIK, OpenCL (in this case) needs amdgpu which needs some bits from Mesa. Not quite sure what you can pull out for headless since I run a full install regardless.
Quote:
Will there be a place to download the entire current SlackBuild files in a tarball instead of having to go through the thread and do a bunch of patches?
Eventually this will be on Slackbuilds.org. In the meantime, my web site is back up so you can find everything here: https://www.linuxgalaxy.org/files/sb...amdgpu-opencl/ No bundled tarball yet but I'll get around to that soonish.
@laitcg Thanks! I was going to skip 20.45 since it just adds RX 6800 / RDNA2 support, which few here can (1) afford or (2) find.
@kingbeofulf The only reason I patched it was I could not find the source file you used and I needed to get my server caught up with -current, etc... you probably know the drill... Again, Thank you for the script!
So I ran all the recent Slackware Current upgrades and built a new Kernel, also installed your latest OpenCL package, can't help but notice a 20% peformance decrease afterwards, I also notice that what previously identified as "AMD RAVEN" is now identified as "AMD POLARIS" in games... I wonder what it could be due to...
EDIT
So apparently it seems to have something to do with the system correctly switching to my discrete graphics, why does it result in a performance loss though is a mystery I yet have to solve...
I'm still getting no computation on most later (20.n) versions... and 20.45 (not fully tested by everyone yet) won't even detect the card. How would I roll back to earlier vesions like 19.n? (I recall 19.30 worked well but don't recall if I needed one that new or if it still worked for a few versions... was there a 19.10 or 19.20? I just have a Radeon RX Vega 64 so don't need something super-new...) I also hope all newer versions will be added because I plan to eventually get an RX 6900 XT if back in stock (not by scalpers) long enough in coming months.
Ah fudge. Now I wish I had kept the older revisions, but that was before a made a local git branch for current. The 20.x series works pretty well here on the RX590 (Polaris) and RX5700XT (Navi). I wouldn't expect your Vega 64 to have any issues. Now, the RX590 does lock up on occasion, but I think that is because this particular brand has always been a bit jittery (overheating?).
@dchmelik, I don't think you need to roll all the way back to 19.x. You can try the 20.10 version listed at the beginning. bassmadrigal post #19 has the wget or you can grab from
However, as the kernel, Mesa and amdgpu in Current drift closer to release, I suspect the AMD Ubuntu opencl builds may get glitchy.
That said, the 20.40 on LinuxGalaxy, or the 20.45 for that matter, are a bit different for Unbuntu 18 vs 20:
amdgpu-pro-20.40-1147286 for Ubuntu 20.04.01
amdgpu-pro-20.40-1147287 for Ubuntu 18.04.5 HWE
You can try 20.40-1147287 to see if that works better.
I rolled back to 19.50, which is actually in the original post, and I know this version worked but maybe no 20.n worked. Now I'm still getting no computation done, or errors, in all miners, for example nsgminer and lolMiner say the below (PhoenixMiner just hangs, not starting work, but lets me ^C to quit... I could test on ethminer but PhoenixMiner is better w/AMD.)
Code:
id in OpenCL
input.cl:176:25: error: implicit declaration of function 'amd_bitalign' is invalid in OpenCL
input.cl:259:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier
input.cl:264:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier
[01:13:16] Failed to init GPU thread 0, disabling device 0
[01:13:16] Restarting the GPU from the menu will not fix this.
[01:13:16] Try to restart the miner.
Code:
ERROR: Kernel compile error for device 0(Radeon RX Vega (VEGA10, DRM 3.35.0, 5.4.84, LLVM 11.1.0)
lolMiner will try next kernel in list (if there is any)
Warning: Your device with id 0 is currently not supported by lolMiner or by the specific algorithm you selected.
I had been successfully running GPU for BOINC, PhoenixMiner and maybe nsgminer w/drivers 19.50 on Slackware-current last year to earlier this year (and maybe would've at least tested lolMiner but it's for a pool using a version without temperature controls) so something went wrong since then. I suspect a bug/incompatibility with some Slackware-current drivers/libraries/kernels (only in recent months) but I have no clues which. I'd guess BOINC still won't do GPU tasks for me anymore either (just haven't got to test that yet, but the first half or three-quarters of my testing so far resulted in nothing/errors.) I'd guess Slackware-current and the drivers by AMD will improve as time goes on and by the time of Slackware 15.0 maybe things will be working better. I had been running these on older Linux 5.4.n kernels, now have newer ones, and briefly tested many 5.10.n with which I found zfs-on-linux doesn't work yet. Maybe when it does things will have improved.
Anyway, thanks for making this great SlackBuild... it let me change back to Slackware (in cooler weather when I can GPU compute, otherwise I'd use FreeBSD Unix) on desktop (I still have Slackware & *BSD laptop) almost a year ago (rather than one of those four horrible systemd/GNU/Linux AMD supports)... I got a lot of good usage out of it, from BOINC/gridcoin to ethereum mining. Unless the errors above might cause someone to suggest something I guess what I do now is wait for Slackware 15.0 and/or future drivers/kernels...
From those errors it looks like the miner is latching onto the OpenCL Clover platform in Mesa, and not the OpenCl from amdgpu-pro.
Code:
Platform Name Clover
Number of devices 1
Device Name AMD Radeon RX 5700 XT (NAVI10, DRM 3.40.0, 5.10.17, LLVM 11.1.0)
Device Vendor AMD
Device Vendor ID 0x1002
Device Version OpenCL 1.1 Mesa 20.3.4
Driver Version 20.3.4
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
versus
Code:
Platform Name AMD Accelerated Parallel Processing
Number of devices 1
Device Name gfx1010
Device Vendor Advanced Micro Devices, Inc.
Device Vendor ID 0x1002
Device Version OpenCL 2.0 AMD-APP (3180.7)
Driver Version 3180.7 (PAL,LC)
Device OpenCL C Version OpenCL C 2.0
Device Type GPU
Device Board Name (AMD) AMD Radeon RX 5700 XT
(Device version may differ for Vega).
What happens when you move '/etc/OpenCL/vendors/mesa.icd' somewhere else?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.