AMD Ryzen Mobile APU, wrong opengl vendor string, terrible performance

I have a HP Envy x360 with the AMD Ryzen 5 2500U processor which includes the Radeon Vega 8 Mobile GPU. When I got the machine in mid-January I started using the kernels from thed kernel-head OBS repo because kernel 4.15 is required for the AMDGPU driver to work correctly. Here is the repo:

https://download.opensuse.org/repositories/Kernel:/HEAD/standard/

All of the release candidates for 4.15 correctly identified the kernel and performance was acceptable. Once 4.15 was released and became available in the Tumbleweed repo, I switched back to the Tumbleweed version, but I discovered severely degraded performance. After doing some poking around, I discovered this output for glxinfo:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,  
    GLX_ARB_create_context_profile, GLX_ARB_fbconfig_float,  
    GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,  
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,  
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,  
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_texture_from_pixmap,  
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,  
    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig,  
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,  
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness,  
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB,  
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_buffer_age,  
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,  
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,  
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,  
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer,  
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,  
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control,  
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,  
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,  
    GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,  
    GLX_ARB_create_context_profile, GLX_ARB_fbconfig_float,  
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,  
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,  
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,  
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,  
    GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,  
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,  
    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig,  
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: VMware, Inc. (0xffffffff)
    Device: llvmpipe (LLVM 5.0, 128 bits) (0xffffffff)
    Version: 18.0.0
    Accelerated: no
    Video memory: 15807MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
**OpenGL vendor string: VMware, Inc.**
OpenGL renderer string: llvmpipe (LLVM 5.0, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.0.0-rc4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:


The openGL vendor string is now saying “VMware, Inc.” instead of “AMD”. On other forums and reddit people have had this issue with Opensuse but other distrubutions do not suffer from the same thing. I’ve tested going back to the kernel-head version since the release candidates for 4.16 are out, but I’m seeing the same behavior.

The output of lsmod shows that AMDGPU is loaded, but I can’t explain the terrible performance, nor the incorrect OpenGL vendor string:


%lsmod |grep amd
edac_mce_**amd**           28672  0
kvm_**amd**               102400  0
ccp                    94208  1 kvm_**amd**
kvm                   704512  1 kvm_**amd**
pinctrl_**amd**            28672  0
**amd**kfd                176128  1
**amd**_iommu_v2           20480  1 **amd**kfd
**amd**gpu               3121152  2
chash                  16384  1 **amd**gpu
i2c_algo_bit           16384  1 **amd**gpu
gpu_sched              28672  1 **amd**gpu
drm_kms_helper        200704  1 **amd**gpu
ttm                   122880  1 **amd**gpu
drm                   458752  6 **amd**gpu,gpu_sched,ttm,drm_kms_helper


Anything thoughts our help would be appreciated.

That’s Mesa’s software renderer, so of course it is slow.

The likely reason is that hardware OpenGL support for certain AMD GPUs (GFX9/Vega) has been disabled in Mesa because of bugs in LLVM 5.
See 1075901 – [Mesa 17.3.2] Some OpenGL applications cause system to freeze and 1082298 – Mesa: get rid of n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch?

Apparently you need to wait until LLVM 6 is released and in Tumbleweed, which should be really soon…

The bug reports mention a testing repo you could try though.
I.e. try to install Mesa and LLVM from here:
https://download.opensuse.org/repositories/home:/michalsrb:/branches:/Mesa-llvm6:/X11:/XOrg/openSUSE_Tumbleweed/
(e.g. add the repo and do a full switch to it)

PS:

It should get released in the next couple of days:
http://lists.llvm.org/pipermail/llvm-dev/2018-March/121520.html

I’ll try to test with that repo and I’ll provide an update once LLVM6 lands in Tumbleweed. Thanks!

Quick update: I did install Mesa and LLVM6 from the test repository, along with kernel 4.16-rc4 and performance is back inline with where I would expect it to be.

I haven’t seen anything on when llvm6 will land in tumbleweed, but for now this seems to have fixed my issue.

Good to hear! :slight_smile:

I haven’t seen anything on when llvm6 will land in tumbleweed

Shouldn’t take too long any more.

6.0.0 final has been released meanwhile:
http://lists.llvm.org/pipermail/llvm-dev/2018-March/121675.html

And it already has been submitted to Factory/Tumbleweed too:
https://build.opensuse.org/request/show/584624Just needs to go through staging, as usual.

Unfortunately there are problems with the new package (file conflicts with LLVM 5) that cause a delay because they need to be fixed first before it can get accepted…