Hey,
I’m going to show you one way, how to install the OpenCL drivers / headers only.
In a relatively simple way.
After some back and forth, to get OpenCL on my Pop!OS computer running,
I’ve learned some pitfalls to be solved.
Disclaimer
The installation routine shown: does not correspond to the AMD procedure.
It bypasses some of the security / compatibility checks.
I do not accept any liability or guarantee for damage to: the system, hardware and/or software.
Use at your own risk.
With that said and out of the way, let’s begin.
Sources:
Radeon™ Software for Linux® Installation > Table of Content | readthedocs.io
Installing All Open / Pro Variant | readthedocs.io
opencl-optional-component | readthedocs.io
Informations about ROCm/ROCr readthedocs.ioApplication-specific limitations of ROCm and Blender | developer.blender
ROCm Compatible Hardware | GitHub
Further instructions for installing ROCm | rocmdocs.amd
Table of content:
Scenario#1
Installation & Troubleshooting | Steps: 9
You don’t have tried / installed AMD drivers: (OPENCL ONLY)Scenario#2
Uninstall Properly | Steps: 3
You have tried installing the AMD Drivers but somethings went wrong.Scenario#3
Your system is un-bootable. | Steps: 3
Recover your System.
Compatibility:
Tested Hardware:
AMD RX580Incompatible Hardware > for this Method:
- RX 5000/6000 Series | These models may also be compatible with the latest drivers. Let me know if you succeeded.
- Integrated Motherboard Graphics
- Server Graphics
- R5, R7 Series
- HD Series
- ATi Series / Legacy Graphics
Tested OS´s/Platforms: | by Contributor:
Pop!OS 20.04 LTS
Pop!OS 20.10 | Blenderis, Aisyk
Feren OS 2021.04Tested Driver Versions: | by Contributor:
(Radeon Software for Linux Driver for Ubuntu)
18.04 → Revision: 20.30
18.04.5 → Revision: 20.40 | Blenderis
20.04.1 → Revision: 20.45 / 20.50 | Incompatible with <=> OS 20.04 and Blender dualhammers
20.04.2 → Revision: 21.10 | BlenderisTested on Blender: | by Contributor:
-Compatible with old drivers
2.82a | Blenderis
2.83.5 | Blenderis, Aisyk
2.90 Alpha
2.91.0 Alpha
No crashes or graphics errors in Cycles:
on latest driver version: (20.04.2 → Revision: 21.10)
Downloaded as archive/s from → Daily builds | builder.blender.org
2.92 Beta | Blenderis
2.93.0 Beta
3.0.0 AlphaThanks to all Contributors.
Guide
Scenario#1
You don’t have installed AMD drivers: (OpenCL ONLY)1. Go to AMD Driver support
Download the Driver Tarball for your GPU → for Ubuntu Distributions.
OR
1.1 Get the Latest universal package | AMD.com (Radeon™ Software for Linux® version 21.10 for Ubuntu)
Please check the compatibility of your graphics card in the section: (Compatibility with the AMD Radeon ™ product family)2. Extract the Tarball and open the new Folder
(amdgpu-pro-20.10-1048554-ubuntu-18.04) in my case.3. Edit the (amdgpu-install file) for compatibility
Double-click on the amdgpu-install
- A text editor should open
Search for Ubuntu
(Ctrl f)
-add| pop
to the case list
- Once the new case has been added, press(Ctrl + s)
to save the file and close the text editor.Note: This step is the key which will add the operating system as a compatible distribution.
4. Right-click on an empty space. In the same folder where the file “amdgpu-install” is located->
- Right Click →
“Open in Terminal"
Now you should have a terminal window with a path pointer, to your downloaded Driver Folder.5. In the Terminal
Now the fun begins, including the installation process.OS 20.04~20.10:
Driver Version:
20.04.2 → Revision: 21.10
AMD GPU
./amdgpu-install --no-dkms --opencl=legacy,pal
AMD GPU-Pro | mainly for PRO GPU variants.
./amdgpu-pro-install --no-dkms --opencl=pal,legacy
Old Driver Version/s:
18.04 → Revision: 20.30,
18.04.5 → Revision: 20.40
AMD GPU
./amdgpu-install --no-dkms --opencl=legacy,pal --headless
AMD GPU-Pro | mainly for PRO GPU variants.
./amdgpu-pro-install --no-dkms --opencl=pal,legacy --headless
- AMD GPU ROCm/ROCr | not fully supported by Blender
./amdgpu-install --no-dkms --opencl=rocm --headless
If a warning message like “Build Error 1” or similar is displayed, do not restart your system!
Follow Scenario 2 below, properly uninstall the AMD GPU drivers and start the installation process again.Some explanation for the --Flags
Choose the right OpenCL: header package for your hardware and application.
If you are not sure, please refer to the links below.
Old and semi-old GPU’s
--opencl=legacy,pal
Vega10 or newer GPU´s
--opencl=rocm
ROCm overview:
Informations about ROCm/ROCr
Application-specific limitations of ROCm and Blender | developer.blender
ROCm Compatible Hardware | GitHub
Further instructions for installing ROCm | rocmdocs.amd–headless should assure
-no Display driver
-no DKMS Firmware
-no Vulkan and/or OpenGL librarys get installed.
(You don’t need them, since Pop!OS uses Mesa Drivers.)
- –no-dkms
This flag prevents a kernel rebuild and the installation of:
amdgpu-pro-firmware and other DKMS packages.
Note: POP!OS is incompatible with these drivers.
DKMS Rebuilding leads to errors.
This can/will result in a non-bootable OS.6. Installation
As you can see there are some dependencies required for the installation.
As long as the package names do not contain references such as →
DKMS, Firmware, Vulkan or OpenGL.
You are ready to go. Press Y and confirm.7. Check your installation in the terminal by typing:
clinfo
If the installation was successful:
it should answer: number of devices: 1 or
(If you have more than one OpenCL compatible device it should output something >0.)8. Reboot your System
9. Check Blender
If the result looks like the picture above:
Congratulations, you have just successfully installed AMD proprietary OpenCL on Linux!
TROUBLESHOOTING
If not: Blender and / or Clinfo do not show me compatible OpenCL devices:
It may be helpful or even necessary to install the following package manually:
sudo apt install opencl-headers ocl-icd-libopencl1
Thanks to AisykFlat pack versions of Blender do not work properly with OpenCL.
Thanks to Aisyk, BlenderisIt can be helpful to test one of the daily builds.
They contain some hotfixes for new hardware and solve version problems.
It is possible that the OpenCL hardware detection and / or other bugs have already been fixed with this version.Note: sometimes you need to reinstall Blender or move it to another Place.
(If Downloaded from Blender.org as Archive.)If Blender fails to start, artifacts appear in eevvee or the Cycles kernel build is unsuccessful.
Check whether you are using the following drivers: : 20.04.1 / Revision: 20.45 or 20.04.1 / 20.04.2 Revision: 20.50
If this is the case: These versions are neither compatible with Blender nor with operating system versions <=> 20.04.PPA’s
When using PPAs like: “oibaf” or similar sources for Mesa driver packages.
Make sure to uninstall them before installing OpenCL.
As this can lead to conflicts or other problems.
they can be reinstalled after a successful OpenCL installation.When you come across this message:
"ERROR: using --no-dkms with a pro install is invalid. Did you want to run the following instead amdgpu-install --no-dkms"
You can try this Procedure thanks to: pzona
OR
Use the non-PRO installer, if your GPU is not a Pro variant.
Scenario#2
Uninstall correctly:
You tried to install AMD drivers but an error occurred.
OR
You can no longer perform a proper uninstall, but your operating system is bootable1. go to your downloaded amd driver folder and open a terminal->
like in step 4 @ Scenario#1 and type:
./amdgpu-pro-install --uninstall
./amdgpu-install --uninstall
If you have already executed:
amdgpu-uninstall
ORamdgpu-pro-uninstall
Result could be:- “The amdgpu driver is already installed or was not uninstalled correctly. Please fully uninstall the driver before proceeding with installation You can try running this install script with the --uninstall option to clean up the previous installation.”
1. Not a problem, just open a Terminal and Type:
OS 18.04~20.04:
sudo apt install amdgpu-dkms libdrm-amdgpu-amdgpu1
Thanks to Blenderis
This will refresh the Dependency list. Especially the amdgpu-pro-pin.OS 18.04
sudo apt install amdgpu-dkms libdrm-amdgpu-amdgpu1 libdrm-amdgpu1libdrm2-amdgpu
4. Folow Step 1 @ Scenario#2
3. Reboot your System
Beginn with step 1 @ Scenario#1
Scenario#3
Your system is un-bootable.Note: this steps will solve a un-bootable OS. (if you have access to the Terminal.)
1. Press/Try(ALT F2)
2. In Terminal Type:
cd Downloads/amdgpu-pro-xx.xx-xxxx-ubuntu-xx.xx
(Note: i assume your downloaded Driver Package is in the Downloads Folder. If not change it according to your path.)
Please replace the “x” with the numbers of your Driver folder name.
you can typels
to list the entities.Once your Path matches the place where your downloaded Driver folder lies.
Type:
./amdgpu-pro-install --uninstall
./amdgpu-install --uninstall
3. Reboot your System
(Note: once your system is bootable again)
Beginn with step 1 @ Scenario#1
Happy Linux rendering
-Tpal
Was it helpful / successful for you?
If not, please let me know your:
-OS/Linux version + (kernel version optional)
-GPU series / model
-Driver edition + revsion number
Error message/s (logs, images optional)If you were successful with:
-Driver version
-GPU model / series
-Kernel / Linux version
I´ve marked as incompatible.
Please let me know. Also what steps it will take, to make it work.
This will help keep this guide updated.
Thanks in regard.
- Yes
- No