OpenCL not working with RX 6700 XT
Card: RX 6700 XT
Ubuntu version: 20.04.2 LTS
Amdgpu version: 21.10
Problem: Running clinfo
or sudo clinfo
returns 1 platform, 0 devices. This problem is the same as the one mentioned here.
Installation method:
- Download and extract file from https://drivers.amd.com/drivers/linux/amdgpu-pro-21.10-1247438-ubuntu-20.04.tar.xz
- Run:
./amdgpu-pro-install -y --opencl=rocr --headless
(also tried--opencl=legacy,rocr
) - Add user to
render
andvideo
group - Reboot
-
clinfo
orsudo clinfo
returns this
I have also tested:
-
The regular amdgpu (
./amdgpu-install
), no luck. -
EDIT: Also tried this:
./amdgpu-install -y --opencl=rocr --no-dkms
, has this error when installing -
EDIT: Tried downgrading kernel then installing with and without
--headless
option -
At one point I added
mesa-opencl-icd
and clinfo worked but it didn't seem like it was even using the amdgpu drivers so I got rid of it (sorry because when I tried adding it again it didn't work for some reason). It shouldn't need that package anyway though... -
Amdgpu pro + ROCm installed (EDIT: Just tested ROCm only, doesn't work)
-
The clinfo that comes with amdgpu-pro (
/opt/amdgpu-pro/bin/clinfo
) -
Contacting AMD support (hehe)
Extra notes:
-
sudo radeontop
cannot identify the device as an RX 6700 XT (i.e. "Unknown Radeon card. <= R500 won't work, new cards might.") - Interesting: in
/opt/amdgpu/share/libdrm/amdgpu.ids
there is a list of cards, ids and revision ids. However, there is no RX 6700 XT listed there.lspci
shows that my card has the id of73df (rev c5)
and that is not listed in the file either. Maybe I should add it manually? Also all of the other 6000 series cards are there, just not the 6700 and 6700 XT. - Edit: Sometimes on kernel 5.8 dkms installs properly and other times it doesn't. Downgrading to 5.4 seems to install it consistently though, but then again OpenCL still doesn't work as mentioned above.
Solution 1:
EDIT: Nope! It seemed to be working, but was using the mesa opencl drivers which didn't work for what I needed (no image support).
Through an awful lot more hair-tearing I found installing ROCm directly worked, alongside the kisak mesa drivers ppa.
See: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html
Solution 2:
Solved! Credit to Oisin Carroll.
UPDATE: This problem has now been fixed by AMD. ROCm now supports kernel 5.8.0-48-generic.
Fix:
- Boot into kernel 5.6-oem (any one will do, I used
5.6.0-1056-oem
). - Follow guide here
If you get an error saying dependencies not met when following the guide:
sudo apt install aptitude
sudo aptitude install rocm-dkms
- Choose the 'N' option when it asks for it.
- Reboot