Getting an AMD APU to work with Ubuntu 20.04

Tom M
Tom M
Joined: 2 Feb 06
Posts: 5589
Credit: 7675942625
RAC: 1861112

Bill wants to restart this

Bill wants to restart this thread. I will see if I can assemble my Apu setup on a test bench. And then we can stumble around together.

Tom M

A Proud member of the O.F.A.  (Old Farts Association).  Be well, do good work, and keep in touch.® (Garrison Keillor)

Bill
Bill
Joined: 2 Jun 17
Posts: 38
Credit: 243920898
RAC: 250497

I did want to restart it, but

I did want to restart it, but I am not hanging out on the boards like I used to.  I'll bring everyone up to date with what I just messaged Tom.

-Fresh install of Ubuntu 20.04.3, all up to date.

-Added myself to the video and render groups (usermod -a -G video, for example).

-Installed the AMD drivers version 21.40.1.40501-1 (yes, not techinically supported for the Vega 8, but appears to have installed fine).

-Installed BOINC from Ubuntu Software (just wanted to use it as a quick checkpoint for now, I know Gianfranco's is more current).  This is version 7.16.6, by the way.

-No GPU detected in BOINC :(

-I installed clinfo.  Output is:

Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.2 AMD-APP (3361.0)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             AMD

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No devices found in platform

 

Any thoughts?  I never tried what was mentioned earlier in the forum with using an older kernel and not updating.  I tried looking for those older versions of Ubuntu, and I can't find them.  All the mirror sites appear to have the most current version of either 18.04 or 20.04.

Tom M
Tom M
Joined: 2 Feb 06
Posts: 5589
Credit: 7675942625
RAC: 1861112

Tom M wrote: This is a

Tom M wrote:

This is a summary how-to install Ubuntu 20 LTS with any (apparently) Radeon graphics including both the regular external cards and the APU internal graphics adapters.

  1. Create an install media for Ubuntu 20 LTS.   You want to use version 20.04.1  Unless someone has changed it, it has Kernel 5.4 (not 5.8!) as its baseline install.
  2. Do a clean install with the system unable to access the Internet in any way, shape or form.
    1. This means you have to choose your time zone manually.  If you type in the first couple of letters of the time zone it normally displays for you (in my case Chicago) you can select that and get on with it.
  3. After the install and re-boot you should disable all the system update choices as much as possible.
    1. You can usually find the update app and start it from the lower left corner of your desktop.  Change parameters and it will remember you don't want to do "anything".
  4. Now download a copy of the Ubuntu drivers for say an Rx 5700 video card.  I have just successfully downloaded and installed Revision: 20.30 which is the first driver specifically named for Ubuntu 20.04.1 LTS
  5. Un-Archive it someplace you can find it.
  6. Go into the file manager and open that archived folder in the Terminal.
  7. Copy paste this: ./amdgpu-pro-install -y --opencl=pal,legacy --headless   
    1. I usually have to use the menu paste in terminal.  The Cntl-V doesn't work for me.
  8. If it runs without an error then reboot, install Boinc and off you go.
  9. I believe this is a public link to the AIO Linux version of the Boinc Manager.
    1. http://www.arkayn.us/lunatics/BOINC.7z

Sun 16 Jan 2022 04:43:12 PM CST |  | Starting BOINC client version 7.16.5 for x86_64-pc-linux-gnu
Sun 16 Jan 2022 04:43:12 PM CST |  | log flags: file_xfer, sched_ops, task, sched_op_debug
Sun 16 Jan 2022 04:43:12 PM CST |  | Libraries: libcurl/7.68.0 GnuTLS/3.6.13 zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Sun 16 Jan 2022 04:43:12 PM CST |  | Data directory: /home/tom/Desktop/BOINC
Sun 16 Jan 2022 04:43:16 PM CST |  | OpenCL: AMD/ATI GPU 0: Unknown AMD GPU (driver version 3143.9 (PAL,HSAIL), device version OpenCL 2.0 AMD-APP (3143.9), 6963MB, 6963MB available, 1126 GFLOPS peak)
Sun 16 Jan 2022 04:43:17 PM CST |  | libc: Ubuntu GLIBC 2.31-0ubuntu9 version 2.31
Sun 16 Jan 2022 04:43:17 PM CST |  | Host name: APU-Experiment
Sun 16 Jan 2022 04:43:17 PM CST |  | Processor: 4 AuthenticAMD AMD Ryzen 3 2200G with Radeon Vega Graphics [Family 23 Model 17 Stepping 0]
Sun 16 Jan 2022 04:43:17 PM CST |  | Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
Sun 16 Jan 2022 04:43:17 PM CST |  | OS: Linux Ubuntu: Ubuntu 20.04.1 LTS [5.4.0-42-generic|libc 2.31 (Ubuntu GLIBC 2.31-0ubuntu9)]
Sun 16 Jan 2022 04:43:17 PM CST |  | Memory: 13.68 GB physical, 2.00 GB virtual
Sun 16 Jan 2022 04:43:17 PM CST |  | Disk: 915.40 GB total, 856.77 GB free

The good news is the desktop version from Ubuntu for 20.04.1 is still available.  And so is the Rx 5700 version 20.30 is still available.

The CRUCIAL point appears to be    --opencl=pal,legacy   NOT  --opencl=rocr,legacy   

Boinc gives an warning/error message about the version of the driver but the system is downloading and crunching (slowly) the GPU gamma ray tasks.

Tom M

 

A Proud member of the O.F.A.  (Old Farts Association).  Be well, do good work, and keep in touch.® (Garrison Keillor)

Tom M
Tom M
Joined: 2 Feb 06
Posts: 5589
Credit: 7675942625
RAC: 1861112

It is a little embarrassing. 

It is a little embarrassing.  This AMD Ryzen 2200G (4c/4t + iGPU) looks like it is going to kick the ass of my "Fire Team" in short order...

The GPU processing has slowed down so it looks like I will have to install the regular CPU cooler on it.  I was experimenting with a smaller cooler that snaps on as the larger coolers do instead of screwing on like the previous generation low-end AM4 coolers.

Tom M

A Proud member of the O.F.A.  (Old Farts Association).  Be well, do good work, and keep in touch.® (Garrison Keillor)

Tom M
Tom M
Joined: 2 Feb 06
Posts: 5589
Credit: 7675942625
RAC: 1861112

Obtw. When running 3 machine

Obtw. When running 3 machine learning at home tasks with the GPU using a half thread the GPU processing slowed down about 200 seconds.

What is not clear is if it was not enough CPU for the GPU or too much data congestion for 3 CPU tasks vs 2.

Given the memory bottleneck I am going to guess pushing the CPU/GPU memory as fast as you can and stay stable is the to maximum Einstein production.

Tom M

A Proud member of the O.F.A.  (Old Farts Association).  Be well, do good work, and keep in touch.® (Garrison Keillor)

Bill
Bill
Joined: 2 Jun 17
Posts: 38
Credit: 243920898
RAC: 250497

Good news:  I have been able

Good news:  I have been able to get the Vega 8 GPU to work with Ubuntu 20.04.  There is bad news, but let me walk through my procedure first.

  1. Download Ubuntu 20.04.1 iso and create a bootable USB with Rufus.
  2. Boot into the USB drive and install Ubuntu, with no connection to the internet.
  3. Restart, and basically follow these directions here to keep the kernel the from updating.  I also followed the "no means no" procedure.
  4. After doing so, I found that there were no more updates that could be applied, which I understood to mean it won't update the kernel again.
  5. I downloaded the AMD drivers, version 20.30.  Before (or after, I don't recall), I ran the following commands:
    sudo usermod -a -G video (username)
    sudo usermod -a -G render (username)
  6. I then installed the drivers using the following command:  ./amdgpu-install --opencl=legacy,pal --headless --no-dkms  (thank you to JEEARR from your earlier post!)
  7. Next I installed OpenCL to confirm it was working with my APU.  It appeared so.
  8. Installed Gianfranco Costamagna's PPA for BOINC.
  9. Started crunching!

Now it was working fine for a few weeks, tasks were completing and validating no problem.  The other day, I checked on the computer and found there was a security update to Ubuntu.  I assumed since I stopped any kernel updates, I would be fine.  The update completed, and I manually reset the computer to make sure everything was fine.

It wasn't.

The computer boots, and I see graphics output in my boot loading screen (Ubuntu loading, so after posting).  However, the screen goes black after awhile, and, nothing.

Well, I thought nothing was happening.  I had the computer off over the weekend, but I turned it on this morning.  I'm checking the two projects that the computer was crunching (MW@H and WCG), and on the website it says it has reached those computers today.  What I think is happening is the client is running fine on the computer, but for some reason I don't get graphics output anymore.

Any thoughts on what I can do to get graphics back?

Tom M
Tom M
Joined: 2 Feb 06
Posts: 5589
Credit: 7675942625
RAC: 1861112

Ouch. Last resort is

Ouch.

Last resort is reinstall. I have not been letting Ubuntu install any updates at all.

I am trying to see if I can increase production by running two GPU tasks at once.

By calculation I should have a higher rac but it is just puttering along.

Tom M

A Proud member of the O.F.A.  (Old Farts Association).  Be well, do good work, and keep in touch.® (Garrison Keillor)

Bill
Bill
Joined: 2 Jun 17
Posts: 38
Credit: 243920898
RAC: 250497

I did reinstall once already,

I did reinstall once already, but I thought my mistake was that I may not have stopped kernel updates properly.  I assumed I could still get SOME updates to Ubuntu.  I tried looking at a way to boot up in "safe mode" and figure out how to revert...something, not sure what, but I'm still too green with Ubunutu.

On the plus side, it is still crunching tasks!  Too bad I can't see a damn thing...

Ian&Steve C.
Ian&Steve C.
Joined: 19 Jan 20
Posts: 3681
Credit: 33843925883
RAC: 36746709

Bill wrote: Good news:  I

Bill wrote:

Good news:  I have been able to get the Vega 8 GPU to work with Ubuntu 20.04.  There is bad news, but let me walk through my procedure first.

  1. Download Ubuntu 20.04.1 iso and create a bootable USB with Rufus.
  2. Boot into the USB drive and install Ubuntu, with no connection to the internet.
  3. Restart, and basically follow these directions here to keep the kernel the from updating.  I also followed the "no means no" procedure.
  4. After doing so, I found that there were no more updates that could be applied, which I understood to mean it won't update the kernel again.
  5. I downloaded the AMD drivers, version 20.30.  Before (or after, I don't recall), I ran the following commands:
    sudo usermod -a -G video (username)
    sudo usermod -a -G render (username)
  6. I then installed the drivers using the following command:  ./amdgpu-install --opencl=legacy,pal --headless --no-dkms  (thank you to JEEARR from your earlier post!)
  7. Next I installed OpenCL to confirm it was working with my APU.  It appeared so.
  8. Installed Gianfranco Costamagna's PPA for BOINC.
  9. Started crunching!

Now it was working fine for a few weeks, tasks were completing and validating no problem.  The other day, I checked on the computer and found there was a security update to Ubuntu.  I assumed since I stopped any kernel updates, I would be fine.  The update completed, and I manually reset the computer to make sure everything was fine.

It wasn't.

The computer boots, and I see graphics output in my boot loading screen (Ubuntu loading, so after posting).  However, the screen goes black after awhile, and, nothing.

Well, I thought nothing was happening.  I had the computer off over the weekend, but I turned it on this morning.  I'm checking the two projects that the computer was crunching (MW@H and WCG), and on the website it says it has reached those computers today.  What I think is happening is the client is running fine on the computer, but for some reason I don't get graphics output anymore.

Any thoughts on what I can do to get graphics back?

I'm going to guess that initially installing the driver with the --no-dkms argument is the reason this happened. you likely did get a kernel update, but a minor update within the same kernel branch. like an update from 5.4.0-23 to 5.4.0-25 (totally made up kernel numbers as an example). without registering the driver module with dkms, you'd have to wipe and re-install the drivers again.

_________________________________________________________________________

Tom M
Tom M
Joined: 2 Feb 06
Posts: 5589
Credit: 7675942625
RAC: 1861112

While Keith posted directions

While Keith posted directions that should have locked the kernel down against updates I was never successful in doing that.

After experimentation I just stopped allowing any updates to hold the kernel version.

Tom M

A Proud member of the O.F.A.  (Old Farts Association).  Be well, do good work, and keep in touch.® (Garrison Keillor)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.