Crash with Vega and Linux (OpenCL, games)

Hi, I’m having multiple issues under Linux and I was wondering if anyone could help…

I need OpenCL for Blender so I went with amdgpu-pro. However, some games fails to load. They freeze the system and I can’t even change the tty. When using the experimental features in Blender, it crashes instantly during a render, after having loaded the render kernels.

I then installed only the OpenCL part, while using the opensource amdgpu driver. Games work perfectly, but Blender still crashes the same way.

Is anyone in the same situation and has found how to solve this? Everything works fine under Windows, even the experimental features of Blender.

My setup:
Ryzen 1600X
Vega 64
Ubuntu 18.04
kernel: Linux 4.15.0-38-generic

glxinfo | grep OpenGL outputs:

With amdgpu-pro:
OpenGL core profile version string: 4.6.13540 Core Profile Context 18.40.2.15

With amdgpu:
(VEG_A10 , DRM 3.26.0 AMD 18.30 , 4.15.0-38-generic, LLVM 6.0.1) OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.0-rc4

Blender is giving this error in the terminal when crashing: blender: /build/blender-UBljLx/blender-2.79.b+dfsg0/intern/cycles/device/opencl/opencl_base.cpp:504: virtual void ccl::OpenCLDeviceBase::tex_alloc(const char*, ccl::device_memory&, ccl::InterpolationType, ccl::ExtensionType): Assertion `mem_map.find(name) == mem_map.end()’ failed. Aborted (core dumped)

Back when I used amdgpu-pro with Ubuntu 16.04, all my games used to work.

Hey buddy,

I had the same problem (as you can see in my past posts). using the $ ./amdgpu-pro-install -y --opencl=pal,legacy caused a lot of issues specifically with OpenCL.

So I installed via ./amdgpu-pro-install -y

then installed OpenCL packages. Blender works fine and games are happy.

https://linuxconfig.org/install-opencl-for-the-amdgpu-open-source-drivers-on-debian-and-ubuntu

Hey!
I tried your method, even with just ./amdgpu-pro-install -y my games crash :frowning:
But just to clarify, this issue is about a few games only (and they work with Mesa)

Blender still crashes.
Btw I’ve reported it as a bug here https://developer.blender.org/T57832
There are more info on the link. Could you try to render the test file I’ve submitted over there? Just need to press F12 after opening it.

Are you running Vega?
Thanks

which games are you running? I might have a couple of them to try out.
I’m running a vega 64/1950x
Rendering a scene works with me! Although I didn’t see the GPU render for Blender so not sure what that is about.

Are you running amdgpu-pro ? You need to install the OpenCL packages from it in order to use your GPU in blender

(for Ubuntu)
with ./amdgpu-pro-install -y --opencl=pal --headless (just OpenCL, keeps opensource mesa)
or ./amdgpu-pro-install -y --opencl=pal (amdgpu-pro and OpenCL)

https://www.amd.com/en/support/graphics/radeon-rx-vega-series/radeon-rx-vega-series/radeon-rx-vega-64

Dirt Rally and Rust are crashing when installing both with the second command. Dirt crashes only in ultra graphics setting tho. They work fine with mesa.

I’d be really thankful if you could install OpenCL , try this .blend file (press F12, make sure it’s GPU) and report your results!

crash test.zip (90.7 KB)

Rendered with me!
the following commands give me this:

glxinfo | grep ‘version’

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.5
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.0-rc4
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.1 Mesa 18.1.0-rc4
OpenGL shading language version string: 1.40
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.1.0-rc4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

clinfo

Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (2686.5)
  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                                   AMD Accelerated Parallel Processing
Number of devices                                 1
  Device Name                                     gfx900
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device OpenCL C Version                         OpenCL C 2.0 

Wow I’m speechless, I uninstalled amdgpu-pro, then installed amdgpu and openCL and I have the exact same versions as you…

I really don’t know what I could do now

I run a pretty the same setup here, albeit for gaming.
And i had problems with the amd driver as well, i installed the newest mesa driver and that really seemed to do the trick, dunno if it is the same for blender, but for gaming it did magic.
try this, it might help.
http://ubuntuhandbook.org/index.php/2018/05/install-mesa-18-0-4-ubuntu-18-04-lts/

Problems i had with the amd driver was some wierd problem where steam got all wierd on me and wouldn’t launch if i installed it complaining about opengl as well i believe.

I just tried that but it didn’t help. Blender keeps crashing, but it’s because of OpenCL I guess.

I said some of my games crashed the computer, but that was only when using amdgpu-pro, not mesa.

I’ll do some more testing with other distro and with that ROCm OpenCL thing maybe

did you uninstall the amd-pro drivers first?
again im no blender expert, i just know i can play skyrim SE through steam by not using AMD drivers.

Without the pro driver I can’t have OpenCL for blender

Holy crap I tried the experimental 2.79 build from today and it fixed everything, the viewport GPU rendering is at least 10 times faster, the 32 samples are rendered almost instantly…

Even the final render is faster
I guess it wasn’t because of the drivers after all !