Unbuntu 18.04 and AMD driver -- need help

It seems that a lot of GPU problems revolve around specific versions of drivers. Though AMD has their own support structure, you can often learn from information reported by others who fold.

Moderators: Site Moderators, FAHC Science Team

MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by MeeLee »

Sometimes uninstalling FAH, and do

Code: Select all

sudo apt purge fah*
might do the trick.
FAH best configures itself if everything is working the way it should (OpenCL, GPU drivers), before installing FAH.

If your OS can't handle the wildcard, you'll have to do purge on all of them:

Code: Select all

sudo apt purge fahclient
sudo apt purge fahcontrol
sudo apt purge fahviewer
Or do:

Code: Select all

sudo apt autoremove fahclient
and same for viewer, and control.

Then for safety, you can also try one (or all) of the following commands:

Code: Select all

 sudo apt-get update –-fix-missing
 sudo dpkg --configure -a
Try if your GPUs work the way they should (if Furmark makes sense, instead of slideshows) and if games look like they get the framerates you'd expect them to have on that type of GPU; then try reinstalling fahcontrol and fahclient, and re-set up everything in FAH.

Remember to enable GPUs in advanced settings: "GPU = true"
Restart the client, by typing

Code: Select all

sudo /etc/init.d/fahclient start
if this doesn't work, use systemd:

Code: Select all

sudo systemctl start fahclient.service
_The_Editor_
Posts: 15
Joined: Mon May 18, 2020 9:38 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by _The_Editor_ »

rdavis852 wrote:I found this tutorial.... Going to give it a try. For AMD GPU's only.
https://linustechtips.com/main/topic/11 ... n-windows/
That tutorial is written for Arch based distros, your Ubuntu distro is a Debian base.

If you want to move over to Arch/Manjaro, by all means use that guide. But from looking at your log/experience so far I think you're having the exact same permission issue I was having with my RX 480 in Ubuntu.

So stop the service:

Code: Select all

$ sudo systemctl stop FAHClient.service
Modify the service to change the user back to fahclient:

/etc/systemd/system/FAHClient.service

Code: Select all

user=fahclient
Then add the `fahclient` to the video users group:

Code: Select all

$ sudo usermod -a -G video fahclient
$ sudo usermod -g video fahclient
Reload the systemd daemon, then restart the FAHClient.service:

Code: Select all

$ sudo systemctl daemon-reload
$ sudo systemctl start FAHClient.service
That fixed it for me, and I was in the exact same position as you with the exact same error messages in the log. Oh and I set opencl-index manually to 0 in the F@H config.
mr_raider
Posts: 28
Joined: Tue Jan 26, 2010 9:21 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by mr_raider »

Got my rx 5700 working and it was a pain. The three key elements for me:


1. Install the OpenCL driver from the amdgpu-pro package on AMDs website. I needed to hack os-release file to make it look like ubuntu.

2. Manually edit the service to run as "root" not fahclient. In my case it was not in systemd but rather in /etc/init.d (KDE Neon based on ubuntu 18.04)

3. Configure the GPU slot manually, to use OpenCL ID as "0", not -1.

Now getting 900k PPD. This thing is beast compared to my previous 1070
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by MeeLee »

mr_raider wrote:Got my rx 5700 working and it was a pain. The three key elements for me:


1. Install the OpenCL driver from the amdgpu-pro package on AMDs website. I needed to hack os-release file to make it look like ubuntu.

2. Manually edit the service to run as "root" not fahclient. In my case it was not in systemd but rather in /etc/init.d (KDE Neon based on ubuntu 18.04)

3. Configure the GPU slot manually, to use OpenCL ID as "0", not -1.

Now getting 900k PPD. This thing is beast compared to my previous 1070
The RX5700 should be faster than an RTX 2060.
The 2060 gets 1.04M PPD. The RX 5700 should get about the same, ~1.05M PPD.

I'm thinking you're running via emulation or virtualization?
Or perhaps it's CPU, or PCIE limited?
Also, did you optimize all virtualization options in bios?
mr_raider
Posts: 28
Joined: Tue Jan 26, 2010 9:21 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by mr_raider »

MeeLee wrote:
mr_raider wrote:Got my rx 5700 working and it was a pain. The three key elements for me:


1. Install the OpenCL driver from the amdgpu-pro package on AMDs website. I needed to hack os-release file to make it look like ubuntu.

2. Manually edit the service to run as "root" not fahclient. In my case it was not in systemd but rather in /etc/init.d (KDE Neon based on ubuntu 18.04)

3. Configure the GPU slot manually, to use OpenCL ID as "0", not -1.

Now getting 900k PPD. This thing is beast compared to my previous 1070
The RX5700 should be faster than an RTX 2060.
The 2060 gets 1.04M PPD. The RX 5700 should get about the same, ~1.05M PPD.

I'm thinking you're running via emulation or virtualization?
Or perhaps it's CPU, or PCIE limited?
Also, did you optimize all virtualization options in bios?
No it's a native Linux install. No VM. Some units do get 1 million. CPU is a Ryzen 2700x. I can always try to turn off the CPU clients and see if I get more.

I usually run the CPU client 24/7. I run the GPu client at night when the temp drops below 20C.
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by MeeLee »

I would certainly try to at least have 1 core available per 1 or 2 GPUs.
Otherwise, the GPU will need to share bandwidth with a CPU WU on a thread. This is not recommended.
mr_raider
Posts: 28
Joined: Tue Jan 26, 2010 9:21 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by mr_raider »

MeeLee wrote:I would certainly try to at least have 1 core available per 1 or 2 GPUs.
Otherwise, the GPU will need to share bandwidth with a CPU WU on a thread. This is not recommended.
I've set it to medium, which only uses 14 threads (out of 16) for the CPU clients. That's on physical core for GPU.

I also have the option of using two Open CL implementations:

Code: Select all

r_raider@HK-47:~$ clinfo
Number of platforms                               2
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 20.1.0 - kisak-mesa PPA
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (3075.10)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             AMD

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     AMD Radeon RX 5700 (NAVI10, DRM 3.36.0, 5.3.0-53-generic, LLVM 10.0.0)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 20.1.0 - kisak-mesa PPA
  Driver Version                                  20.1.0 - kisak-mesa PPA
  Device OpenCL C Version                         OpenCL C 1.1 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Max compute units                               36
  Max clock frequency                             1850MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
Right now my OpenCL index is set to 0. Maybe the other opencl library is faster?
mr_raider
Posts: 28
Joined: Tue Jan 26, 2010 9:21 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by mr_raider »

MeeLee wrote:
mr_raider wrote:Got my rx 5700 working and it was a pain. The three key elements for me:


1. Install the OpenCL driver from the amdgpu-pro package on AMDs website. I needed to hack os-release file to make it look like ubuntu.

2. Manually edit the service to run as "root" not fahclient. In my case it was not in systemd but rather in /etc/init.d (KDE Neon based on ubuntu 18.04)

3. Configure the GPU slot manually, to use OpenCL ID as "0", not -1.

Now getting 900k PPD. This thing is beast compared to my previous 1070
The RX5700 should be faster than an RTX 2060.
The 2060 gets 1.04M PPD. The RX 5700 should get about the same, ~1.05M PPD.

I'm thinking you're running via emulation or virtualization?
Or perhaps it's CPU, or PCIE limited?
Also, did you optimize all virtualization options in bios?
Kernel 5.7 installed and now get 1.2m PPD on some projects. Not bad
gunnarre
Posts: 567
Joined: Sun May 24, 2020 7:23 pm
Location: Norway

Re: Unbuntu 18.04 and AMD driver -- need help

Post by gunnarre »

I can report that a Radeon HD 7700 series (VERDE) card won't work on Ubuntu. Even when the permissions issue is taken care of, so FAHClient finds the card as a unit in OpenCL, all work units fail. This is with both the prorietary AMD driver (20.20-1098277, 19.20-812932), and the open ROCM and MESA versions of OpenCL. Installing packages individually and sed-patched with a new path doesn't work either - that just makes the whole FAHClient crash.
Image
Online: GTX 1660 Super, GTX 1080, GTX 1050 Ti 4G OC, RX580 + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 960, GTX 950
zookeeny
Posts: 23
Joined: Fri Apr 03, 2020 1:32 pm

Re: Unbuntu 18.04 and AMD driver -- need help

Post by zookeeny »

I had the same problems with getting my RX5700XT running under Ubuntu 20.04 - maybe one of the steps in the last post will help: viewtopic.php?f=108&t=35572#p337749

Good luck!
Joe_H
Site Admin
Posts: 7856
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: Unbuntu 18.04 and AMD driver -- need help

Post by Joe_H »

The HD 7700 series cards are based on the GCN 1st generation Verde chips. OpenCL support for those was dropped by AMD for Linux several years ago, you would have to load older versions of the drivers and may be capped at Ubuntu 16.04 or earlier. The older drivers and OpenCL support may or may not be compatible with current GPU folding cores. Their versions are somewhere prior to 18.20.

As far as I know, no one has been able to use the Mesa drivers for F@h. People would have to back port the ROCm drivers to early generation GCN chips, as I understand it AMD is not doing so.

Which version of the AMD proprietary drivers might support the 7700 series on Linux I can't say. I went down that rabbit hole looking for support for some other early gen GCN and Terascale cards and stopped looking after mention of kernel mods being needed, last version of driver with OpenCL support giving incorrect calculations and needing to go to an even older version, and so on. Basically this is one area where it probably is better to stick to Windows, AMD continued full support for these older gen cards a bit longer there. For Linux the cards are just accelerated frame buffers, not usable for GPU number crunching requiring OpenCL.

Edit: This might not apply to the HD 7790, that used a different GCN gen 2 chip. But the rest of the HD 7800 and 7900 cards were based on GCN gen 1 chips, so also are problematic on Linux for F@h.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
gunnarre
Posts: 567
Joined: Sun May 24, 2020 7:23 pm
Location: Norway

Re: Unbuntu 18.04 and AMD driver -- need help

Post by gunnarre »

Maybe these GPUs which don't have any working drivers should be blacklisted by the client or the server so they don't cause churning of work units. Will the client/slot eventually give up or get banned by the assignment servers when it has a 100% bad work unit rate?
Image
Online: GTX 1660 Super, GTX 1080, GTX 1050 Ti 4G OC, RX580 + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 960, GTX 950
Joe_H
Site Admin
Posts: 7856
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: Unbuntu 18.04 and AMD driver -- need help

Post by Joe_H »

Blacklisting on the client/server level would be limited because currently it is based on the GPU only, not the OS or driver. On the client level more than a set number of failures in a row on a slot should disable the slot, but that only lasts until the next restart of the client. Not foolproof, but enough to usually get the attention of the person running F@h on their system.

In the case of these HD 7700 cards, they should work on Windows but may require using a driver that provides support for OpenCL. I think in this case that might be one of the last Catalyst versions, or possibly an early Crimson driver install.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
gunnarre
Posts: 567
Joined: Sun May 24, 2020 7:23 pm
Location: Norway

Re: Unbuntu 18.04 and AMD driver -- need help

Post by gunnarre »

I had both a HD 7770 and an RX 580 in a Windows 10 PC, where they both were folding and producing valid results, but it seems that the 7770 was bottlenecking the RX 580; at least anecdotally the total PPD on the Windows PC seems higher without the 7770 than with it. Perhaps due to thermals, PCIe or RAM speed. The Linux box has better airflow, faster RAM and PCIe slots, so that's why I tried to run it in Linux.
Image
Online: GTX 1660 Super, GTX 1080, GTX 1050 Ti 4G OC, RX580 + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 960, GTX 950
gunnarre
Posts: 567
Joined: Sun May 24, 2020 7:23 pm
Location: Norway

Re: Unbuntu 18.04 and AMD driver -- need help

Post by gunnarre »

Joe_H wrote:The HD 7700 series cards are based on the GCN 1st generation Verde chips. OpenCL support for those was dropped by AMD for Linux several years ago, you would have to load older versions of the drivers and may be capped at Ubuntu 16.04 or earlier.
Yes, I looked closer at the AMD Linux driver release notes, and although version 18.20 of the AMD Radeon pro drivers explicity supports the Radeon HD 7700 series cards, the release notes also lists about its components: "OpenCL™1.2 (not supported for 1st generation GCN products)", as you say.

For the giggles, I installed Ubuntu 16.04 and 14.04 in a libvirt KVM and tried the last Ubuntu drivers that don't include the note about non-support for 1st gen GCN.

The good news is that on 16.04 the driver installs and PCI passthrough with IOMMU from the GPU to the virtual machine works. The bad news is that in the case of 16.04 I got the same type of error: OpenCL installs and appears to work, including clinfo, but FAH makes bad work units. And in the case of 14.04, installation failed on compiling/including the DKMS module, and no amount of kernel source packages seeemd to cure this - perhaps I just haven't tried the correct minor version of the kernel yet.

To confirm the qemu/libvirt host was set up correctly, I installed Windows 10 as a guest OS, and it appears to run the GPU fine in FAH, and it even seems to run the GPU faster than it did natively in the old Windows PC. CPU overhead is negligble in the host OS - except when Windows Update starts running.

I might test with an different version of the Linux kernel in Ubuntu and Centos in libvirt again, as the memory overhead of running a full Windows installation just to feed work to an old GPU is rather ridiculous.
Image
Online: GTX 1660 Super, GTX 1080, GTX 1050 Ti 4G OC, RX580 + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 960, GTX 950
Post Reply