Page 1 of 1
RX 5700 and Ubuntu 20.04
Posted: Sat Jun 13, 2020 8:20 pm
by zookeeny
Hi,
I saw that AMD
finally released OpenCL support for Ubuntu 20.04, so I installed the new driver, but still cannot get FAHclient to recognize it. Here's what I see in the log:
Code: Select all
19:32:16:******************************* System ********************************
19:32:16: CPU: AMD Ryzen 9 3900X 12-Core Processor
19:32:16: CPU ID: AuthenticAMD Family 23 Model 113 Stepping 0
19:32:16: CPUs: 24
19:32:16: Memory: 31.37GiB
19:32:16:Free Memory: 24.99GiB
19:32:16: Threads: POSIX_THREADS
19:32:16: OS Version: 5.4
19:32:16:Has Battery: false
19:32:16: On Battery: false
19:32:16: UTC Offset: -4
19:32:16: PID: 18006
19:32:16: CWD: /var/lib/fahclient
19:32:16: OS: Linux 5.4.0-7634-generic x86_64
19:32:16: OS Arch: AMD64
19:32:16: GPUs: 1
19:32:16: GPU 0: Bus:12 Slot:0 Func:0 AMD:6 Navi 10 [Radeon RX 5600 OEM/5600 XT /
19:32:16: 5700/5700 XT]
19:32:16: CUDA: Not detected: Failed to open dynamic library 'libcuda.so':
19:32:16: libcuda.so: cannot open shared object file: No such file or
19:32:16: directory
19:32:16: OpenCL: Not detected: clGetDeviceIDs() returned -1
19:32:16:******************************* libFAH ********************************
It sees the RX 5700, but is getting nothing when calling clGetDeviceIDs(). Any ideas what I'm doing wrong? Thanks!
Re: RX 5700 and Ubuntu 20.04
Posted: Sat Jun 13, 2020 9:24 pm
by PantherX
Did you install OpenCL package (sudo apt-get install ocl-icd-opencl-dev)?
Re: RX 5700 and Ubuntu 20.04
Posted: Sat Jun 13, 2020 9:39 pm
by zookeeny
Thanks for the suggestion - I installed ocl-icd-opencl-dev and rebooted, but unfortunately got the same message when FAHclient started.
The strange thing is that Blender now recognizes the RX5700 as a valid OpenCL device, and darktable-cltest seems to see it as well:
Code: Select all
0.612471 [opencl_init] discarding device 1 `AMD Radeon RX 5700 XT (NAVI10, DRM 3.35.0, 5.4.0-7634-generic, LLVM 9.0.1)' - The OpenCL driver doesn't provide image support. See also 'clinfo' output.
0.612478 [opencl_init] OpenCL successfully initialized.
0.612481 [opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
0.612484 [opencl_init] 0 'gfx1010'
0.612492 [opencl_init] FINALLY: opencl is AVAILABLE on this system.
0.612493 [opencl_init] initial status of opencl enabled flag is ON.
Re: RX 5700 and Ubuntu 20.04
Posted: Sun Jun 14, 2020 7:57 am
by PantherX
May I suggest that you uninstall FAHClient and then reinstall it to see if it detects the GPU or not? From what I have read, the FAHClient does a decent job of GPU detection when it is first installed. Also, can you please post the new log file too to see what the client does?
Re: RX 5700 and Ubuntu 20.04
Posted: Sun Jun 14, 2020 1:58 pm
by zookeeny
Unfortunately that didn't work either. I removed FAHclient and then reinstalled it, but the GPU still isn't found. Here's the first-time startup information from the log:
Code: Select all
*********************** Log Started 2020-06-14T13:53:20Z ***********************
13:53:20:Trying to access database...
13:53:20:Successfully acquired database lock
13:53:20:Read GPUs.txt
13:53:20:Enabled folding slot 00: READY cpu:23
13:53:20:****************************** FAHClient ******************************
13:53:20: Version: 7.6.13
13:53:20: Author: Joseph Coffland <joseph@cauldrondevelopment.com>
13:53:20: Copyright: 2020 foldingathome.org
13:53:20: Homepage: https://foldingathome.org/
13:53:20: Date: Apr 28 2020
13:53:20: Time: 04:20:16
13:53:20: Revision: 5a652817f46116b6e135503af97f18e094414e3b
13:53:20: Branch: master
13:53:20: Compiler: GNU 8.3.0
13:53:20: Options: -std=c++11 -ffunction-sections -fdata-sections -O3 -funroll-loops
13:53:20: -fno-pie
13:53:20: Platform: linux2 4.19.0-5-amd64
13:53:20: Bits: 64
13:53:20: Mode: Release
13:53:20: Args: --child /etc/fahclient/config.xml --run-as fahclient
13:53:20: --pid-file=/var/run/fahclient.pid --daemon
13:53:20: Config: /etc/fahclient/config.xml
13:53:20:******************************** CBang ********************************
13:53:20: Date: Apr 25 2020
13:53:20: Time: 00:07:53
13:53:20: Revision: ea081a3b3b0f4a37c4d0440b4f1bc184197c7797
13:53:20: Branch: master
13:53:20: Compiler: GNU 8.3.0
13:53:20: Options: -std=c++11 -ffunction-sections -fdata-sections -O3 -funroll-loops
13:53:20: -fno-pie -fPIC
13:53:20: Platform: linux2 4.19.0-5-amd64
13:53:20: Bits: 64
13:53:20: Mode: Release
13:53:20:******************************* System ********************************
13:53:20: CPU: AMD Ryzen 9 3900X 12-Core Processor
13:53:20: CPU ID: AuthenticAMD Family 23 Model 113 Stepping 0
13:53:20: CPUs: 24
13:53:20: Memory: 31.37GiB
13:53:20:Free Memory: 23.66GiB
13:53:20: Threads: POSIX_THREADS
13:53:20: OS Version: 5.4
13:53:20:Has Battery: false
13:53:20: On Battery: false
13:53:20: UTC Offset: -4
13:53:20: PID: 35753
13:53:20: CWD: /var/lib/fahclient
13:53:20: OS: Linux 5.4.0-7634-generic x86_64
13:53:20: OS Arch: AMD64
13:53:20: GPUs: 1
13:53:20: GPU 0: Bus:12 Slot:0 Func:0 AMD:6 Navi 10 [Radeon RX 5600 OEM/5600 XT /
13:53:20: 5700/5700 XT]
13:53:20: CUDA: Not detected: Failed to open dynamic library 'libcuda.so':
13:53:20: libcuda.so: cannot open shared object file: No such file or
13:53:20: directory
13:53:20: OpenCL: Not detected: clGetDeviceIDs() returned -1
13:53:20:******************************* libFAH ********************************
13:53:20: Date: Apr 15 2020
13:53:20: Time: 21:43:24
13:53:20: Revision: 216968bc7025029c841ed6e36e81a03a316890d3
13:53:20: Branch: master
13:53:20: Compiler: GNU 8.3.0
13:53:20: Options: -std=c++11 -ffunction-sections -fdata-sections -O3 -funroll-loops
13:53:20: -fno-pie
13:53:20: Platform: linux2 4.19.0-5-amd64
13:53:20: Bits: 64
13:53:20: Mode: Release
13:53:20:***********************************************************************
Re: RX 5700 and Ubuntu 20.04
Posted: Sun Jun 14, 2020 2:30 pm
by ajm
I was able to get passed that only when running FAH as root. You may want to give it a try.
Re: RX 5700 and Ubuntu 20.04
Posted: Sun Jun 14, 2020 4:21 pm
by zookeeny
I think you're on to something there! I just tried to dump a bad work unit by running "FAHClient --dump 0" on the command line (which didn't work, but that's another story), and the below was the response - note the two OpenCL devices now appearing at the bottom. I'm thinking that I might be able to just add user fahclient to the group that allows OpenCL access, but I'm not sure what group that would be. Running it as root would probably do it too, but I'll have to try that out later. Thanks!
Code: Select all
16:08:11:******************************* System ********************************
16:08:11: CPU: AMD Ryzen 9 3900X 12-Core Processor
16:08:11: CPU ID: AuthenticAMD Family 23 Model 113 Stepping 0
16:08:11: CPUs: 24
16:08:11: Memory: 31.37GiB
16:08:11: Free Memory: 26.74GiB
16:08:11: Threads: POSIX_THREADS
16:08:11: OS Version: 5.4
16:08:11: Has Battery: false
16:08:11: On Battery: false
16:08:11: UTC Offset: -4
16:08:11: PID: 4822
16:08:11: OS: Linux 5.4.0-7634-generic x86_64
16:08:11: OS Arch: AMD64
16:08:11: GPUs: 1
16:08:11: GPU 0: Bus:12 Slot:0 Func:0 AMD:6 Navi 10 [Radeon RX 5600 OEM/5600 XT
16:08:11: / 5700/5700 XT]
16:08:11: CUDA: Not detected: Failed to open dynamic library 'libcuda.so':
16:08:11: libcuda.so: cannot open shared object file: No such file or
16:08:11: directory
16:08:11:OpenCL Device 0: Platform:0 Device:0 Bus:12 Slot:0 Compute:2.0 Driver:3110.6
16:08:11:OpenCL Device 1: Platform:1 Device:0 Bus:NA Slot:NA Compute:1.1 Driver:20.0
Re: RX 5700 and Ubuntu 20.04
Posted: Sun Jun 14, 2020 4:32 pm
by ajm
You can also try to only add FAH to the video group. It worked for some people.
See viewtopic.php?p=335323#p335323
Re: RX 5700 and Ubuntu 20.04
Posted: Sun Jun 14, 2020 6:03 pm
by Joe_H
Some Linux versions require the fahclient user account to be added to the 'render' group. You may also need to designate the 'render' or 'video' group as the primary group the account belongs to based on information that has been posted to the forum.
Re: RX 5700 and Ubuntu 20.04
Posted: Sun Jun 14, 2020 8:20 pm
by mad_martn
you probably have to add a systemd service unit, see viewtopic.php?f=81&t=33353 scroll down to 'Fixing the permissions issue (clGetDeviceIDs() returned -1)'
Re: RX 5700 and Ubuntu 20.04
Posted: Mon Jun 15, 2020 12:30 am
by MeeLee
Don't just uninstall fah. Purge it too.
sudo apt purge fahclient fahcontrol
before installing it.
Also do a furmark, or heaven benchmark, to see if the GPU works the way it should.
Re: RX 5700 and Ubuntu 20.04
Posted: Mon Jun 15, 2020 8:17 pm
by zookeeny
Thanks for all of the suggestions! I tried just adding user
fahclient to the
video and
render groups, but that didn't seem to make any difference. Then I saw mad_martn's post, and realized that was probably why the group additions weren't working. So I:
- Purged my fahclient installation and reinstalled from scratch
- Added user fahclient to groups video and render
- Created a systemd startup file for FAHClient.service
- Rebooted
This resulted in a black screen
, but apparently everything started up normally since I was able to ssh in... just the video wasn't working. This may be one of the side-effects of doing OpenCL calculations on my only video card, but not sure about that. But looking at the log FAHClient definitely found the card and recognized it as supporting OpenCL, I just need to figure out now if it's possible to actually use the monitor and do OpenCL calculations at the same time. But I appreciate all of the help!
Re: RX 5700 and Ubuntu 20.04
Posted: Mon Jun 15, 2020 8:49 pm
by mad_martn
zookeeny wrote:
This resulted in a black screen
, but apparently everything started up normally since I was able to ssh in... just the video wasn't working. This may be one of the side-effects of doing OpenCL calculations on my only video card, but not sure about that. ...
did you have a Linux kernel update in between? ... just guesswork, i'm using debian bullseye/testing and only use the opencl bits from the amdgpu-pro ubuntu package, i had black screens after reboot (xserver fail caused by amdgpu drm crash) with some combinations of kernel and opencl packages coming from the AMD ubuntu package
Re: RX 5700 and Ubuntu 20.04
Posted: Tue Jun 16, 2020 5:07 pm
by MeeLee
Your Linux OS might have defaulted to the IGP of other GPU for the GUI?
Your main GPU should not give a blank screen.
Did you see any pre OS loading going on?
Can you get into the bios?
If you have one of the latest X570 or X400 series motherboards, they tend to be very flaky.
A lot of bugs that make no sense.
I believe the AMD overclocking tools, use up too much space of the BIOS opcode, causing people to sometimes have to reinstall the latest BIOS upgrade, to reset it.
Re: RX 5700 and Ubuntu 20.04
Posted: Wed Jun 17, 2020 1:59 am
by zookeeny
Thanks again to everyone for all the help! After messing with things a bit further I finally got both the CPU and GPU slots folding. I haven't tried rebooting yet, so I don't know if the black screen on startup will be an issue again, but I'll cross that bridge when I get to it. Here are the steps that worked for me:
- Installed only the OpenCL component of amdgpu ("sudo amdgpu-install --open-cl=pal --headless --no-dkms")
- Stopped FAHClient ("sudo /etc/init.d/FAHClient stop" - for some reason "sudo systemctl stop FAHClient" didn't work for me, although I think it should have)
- Made video the primary group for user fahclient ("sudo usermod -a -g video fahclient")
- Added supplemental group render for user fahclient ("sudo usermod -a -G render fahclient")
- Changed the FAHClient startup from init.d to systemd (viewtopic.php?f=81&t=33353)
- Manually updated /etc/fahclient/config.xml to add the new GPU slot (I had to do this because FAHControl requires a python package my system can't install)
- Restarted FAHClient through systemd ("sudo systemctl daemon-reload" and "sudo systemctl start FAHClient.service")
One caveat: I'm running Pop_OS, which is derived from Ubuntu, but there may be some minor differences because of that.
It took a little while for FAHClient to find an available GPU work unit, but it finally did, and is about 20% through it. Success!