See my scripts in https://gitlab.com/illwieckz/i-love-compute
There is a script for Ubuntu to install last known working drivers:
- AMD OpenCL Orca for GCN1, GCN2, GCN3, GCN4? GPUs
- AMD OpenCL PAL for GCN5 GPUs
- AMD ROCm (documentation says 3 chips only are supported, said to not be for graphical applications)
- Mesa Clover (may be faster on some tasks like LuxRender but incomplete for others like Darktable)
- Old AMD OpenCL APP for CPUs (useful to distribute OpenCL tasks to both GPUs with previous drivers and CPUs with this one)
It's possible to install only one of them, a selection of them, or all of them. Though, some may brings bugs while other works, so maybe you'll want to only install the one that works.
You'll know more about the situation of AMD OpenCL drivers there:
https://rebuild.sh/post/2022-01-25-OpenCL_on_Linux_state_of_AMD_drivers_is_now_worse_than_it_was_bac...