Installing openCL on older hardware with rusticl #3998
Replies: 23 comments 1 reply
-
|
Hello, I have recently failed to install ROCm on my windaos10 system. Can you tell me how to install it? |
Beta Was this translation helpful? Give feedback.
-
|
@xiaobo1025 Please create your own issue for your own problem: here. 🙂️ |
Beta Was this translation helpful? Give feedback.
-
|
Hi, @BarbzYHOOL the AMD Radeon HD 7870 is a GCN1 device. The ROCm driver never supported this card and AMD has no plan to support it ever. The AMD driver for this card is fglrx, more precisely “AMD Radeon Software Crimson Edition 15.12 Proprietary Linux” from the year 2015 and you need Ubuntu 14.04.2 or Ubuntu 12.04.4 (yeas, distributions from year 2014 or 2012). In other hand, AMD has no solution for you. The legacy Orca legacy driver which is newer than fglrx may list your device but I never seen it working with any GCN1 device I tried. The less-legacy Orca legacy driver (the one you get with the Your only options are the Mesa OpenCL drivers, the most complete one for AMD GCN1 devices is rusticl. Your only true hope with a GCN1 card like the AMD Radeon HD 7870 is to use rusticl. A tutorial is coming in the following comment. I made the following tutorial generic (not just for you), but I verified that your card is supported by this other driver. |
Beta Was this translation helpful? Give feedback.
-
Installing latest Mesa rusticl OpenCL driver for GCN/RDNA/CDNA AMD graphics card on Ubuntu Linux and derivativesHere is a generic tutorial to install the latest Mesa rusticl driver for all GCN and RDNA cards on Ubuntu-derivated distributions like Pop OS or Linux Mint (Ubuntu based). To adapt this tutorial to non-Ubuntu distributions, the key thing is 1. to get very recent Mesa OpenCL drivers, 2. to use the This only works for OpenCL, there is no Mesa HIP drivers. ROCm is the only HIP driver for AMD cards on Linux so if your card is not supported by ROCm you can't use HIP at all. To know if your graphics card is supported by the rusticl driver, search for your graphics card name on techpowerup website. If the page for your graphics card says the architecture of the graphics card is either GCN, RDNA or CDNA, this tutorial is for you. The TeraScale architectures are not supported yet by rusticl. First you need to install the Mesa OpenCL drivers, I recommend you to also install the Install the Oibaf PPA repository, this will provide you updated Mesa drivers and then rusticl: sudo add-apt-repository 'ppa:oibaf/graphics-drivers'
sudo apt-get update
sudo apt-get dist-upgradeThen you install the Mesa OpenCL drivers, the second command will disable the sudo apt-get install 'mesa-opencl-icd' 'clinfo'
sudo dpkg-divert --divert '/etc/OpenCL/vendors/mesa.icd.disabled' --rename '/etc/OpenCL/vendors/mesa.icd'Then before you run your application, set some environment variable, let's try with export RUSTICL_ENABLE='radeonsi'
clinfo --listThe environment variable makes sure you enable rusticl for AMD Radeon cards. The rusticl driver is still experimental and then not installed by default. If that works for you, to make this variables permanent, edit a profile file: sudo nano '/etc/profile.d/rusticl.sh'Then paste this content: export RUSTICL_ENABLE='radeonsi'And save the file. Close your session and reopen. Now, simply doing this should work: clinfo --listThis should print you something like this (with other card name): To completely revert to your previous state and uninstall everything we did, you would do: sudo rm '/etc/profile.d/rusticl.sh'
sudo dpkg-divert --rename --remove '/etc/OpenCL/vendors/mesa.icd'
sudo apt-get autoremove --purge 'mesa-opencl-icd' 'clinfo'
sudo ppa-purge 'ppa:oibaf/graphics-drivers'And you would have to close and re-open your session. I'm not an AMD employee, but this may save you a lot of time. I'm not paid to give you this help but I was passing by while dealing with some other ROCm issues and thought I could help you. I maintain some information about what driver supports what GPU here: https://gitlab.com/illwieckz/i-love-compute/ . If I saved your life you may find ways to thank me. 😉️ |
Beta Was this translation helpful? Give feedback.
-
what about trying one of the AMD driver "Linux" and try to compile it for my own distribution? it seems like they have given this option on AMD driver page And thank you very much for the tutorial, I'm gonna do this in the upcoming days. First I'll remove everything else I added. Btw why keep the "clover" thing? why not remove it all? |
Beta Was this translation helpful? Give feedback.
-
|
@illwieckz |
Beta Was this translation helpful? Give feedback.
-
|
As root: apt-mark auto opencl-headers ocl-icd-libopencl1
amdgpu-uninstall
apt-get autoremove --purge amdgpu-install
rm /etc/modprobe.d/blacklist-radeon.conf /etc/modprobe.d/blacklist-amdgpu.conf
update-initramfs -k all -uSome commands may be useless (the Before rebooting, make sure that this command reports nothing: If it report some file, delete the said file and re-run |
Beta Was this translation helpful? Give feedback.
-
|
the modprobe files were kinda empty but i removed them also those commands did not remove some of the stuff amdgpu installed like the update-initramfs command returned: and many more, and I'm on an older kernel so I feel like i'm gonna get screwed when rebooting |
Beta Was this translation helpful? Give feedback.
-
|
For the remaining packages, well, if you're sure all of them were installed by You can totally ignore the |
Beta Was this translation helpful? Give feedback.
-
|
ok it all worked. For those extra packages, I had noted them down, but since I reinstalled another amdgpu-install once, I suppose I have other useless packages installed, but I may find them back in apt log Everything works atm, in fact when I installed the previous drivers, it gave me some errors. Now I'm gonna do what you said to install the right drivers and tell you the result, thanks |
Beta Was this translation helpful? Give feedback.
-
|
Ok @illwieckz it printed one device: Now running a miner using OpenCl, I get this: Another: I guess I'm doomed |
Beta Was this translation helpful? Give feedback.
-
This is progressing! Your GPU is properly detected, but it is detected by the In my tutorial there was some instructions to disable Clover, but don't worry, keep it for now. Does the You can check for its existence this way:
Since Clover is incomplete, tt's possible that the device is ignored because it misses some important required things. Though usually Clover is enough for non-graphics applications… We still need to make rusticl work in case of rusticl is good with this one.
For this one, you're probably screwed, as the developper seems to have written a white list of drivers and doesn't care about other drivers. The purpose of OpenCL is to have a single code and to run it on any OpenCL driver. You may check if the software has an option to continue anyway, otherwise it may require patching of the software. The software is explicitly looking for a specific AMD driver or a set of specific AMD drivers (like fglrx, Orca, PAL or ROCm), and doesn't check for OpenCL compatibility, what it should do. This is very bad practice and it's the miner developer's fault. I would report that issue to the miner developer. |
Beta Was this translation helpful? Give feedback.
-
|
I didn't run the command to disable Clover because I thought the command would rename in the other sense, I didn't realize it was to disable Clover lol. I had to adapt some commands to my fish shell etc... that's why I diverged a bit. Now I ran the disabling command. No file, so "clinfo --list" gives nothing now |
Beta Was this translation helpful? Give feedback.
-
|
@illwieckz Since I disabled clover, i cannot read any video, no OpenGl lol |
Beta Was this translation helpful? Give feedback.
-
|
@illwieckz hey sorry to call you again, but I'm waiting for a last reply (just in case there is a solution) before I roll back all the changes of the last entire month, if you have any other idea to solve this or time to reply else just tell me and i'll roll back |
Beta Was this translation helpful? Give feedback.
-
|
Hmm, @BarbzYHOOL for some reasons I only got a notice for the closing, not for the mentions. 🤔️ So I'm sorry to answer this late. Disabling Clover cannot remove OpenGL at all, make sure Make sure you have removed all files doing |
Beta Was this translation helpful? Give feedback.
-
Nothing |
Beta Was this translation helpful? Give feedback.
-
|
I waited too long and now my automatic backups have been deleted so I cannot rollback and I still can try to make this work if you know what to do @illwieckz |
Beta Was this translation helpful? Give feedback.
-
|
I uninstalled everything and I still have log errors everyday after boot |
Beta Was this translation helpful? Give feedback.
-
the ubuntu rusticl tutorial posted above worked for me. I have an AMD Radeon RX 580 GPU and Ubuntu 24.04.1 (noble). Rusticl was included in noble's 'mesa-opencl-icd' package, and all I needed to do was install it and set the environment variable RUSTICL_ENABLE='radeonsi'. I realize this post may come too late to solve the original issue but I wanted to record how I got OpenCL working on AMD GPU for future readers |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @jon-gao-yang for the feedback! 👍️ Indeed with Noble no PPA should be needed (though a PPA may provide a more up-to-date features), I may update the tutorial in regard to that. 🙂️ |
Beta Was this translation helpful? Give feedback.
-
|
Hi @BarbzYHOOL, sorry for the delay. Are you still experiencing those log errors? |
Beta Was this translation helpful? Give feedback.
-
|
Converting this to a discussion, as some great advice has been given here on getting old hardware to work. As stated earlier in this thread, we don't officially support this hardware (or Pop OS for that matter), but future users with similar configurations may find this guidance useful. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Suggestion Description
Hello, I have an AMD Radeon HD 7870 and it should support opencl
I'm on POPOS 22.04 and I managed to install these:
amdgpu-install_5.4.50401-1_all.deb amdgpu-install_5.7.50702-1_all.deb amdgpu-install_5.5.50503-1_all.deb
Install with 5.7 == impossible to work, it doesn't find some packages (spent 1h on google and no one has any solution)
For both below, I had to install in top of that mesa-opencl-icd
Install with 5.4 == i didn't notice errors but it doesn't work in the end
Install with 5.5 == several errors, and it doesn't work either
"clinfo" gives me 2 platforms but always 0 devices
I cannot find any solution, everybody just say to retry reinstalling with different options, it makes no sense
I installed with --use-case=opencl (or without this) and --opencl=legacy
Operating System
pop os 22.04
GPU
Radeon HD 7870
ROCm Component
No response
Beta Was this translation helpful? Give feedback.
All reactions