# Linux Binary compatibility - Nvidia Drivers and CUDA for Blender



## linuxnunix (Mar 10, 2018)

Hi!

I've managed to run Blender 2.79 for Linux x64 in FreeBSD 11.1 with Binary compatibility "linux-c7" in a virtual QEMU machine.
My question is if it is possible to install the latest 390.25 Nvidia Drivers and CUDA 9.1 within the FreeBSD compatibility layer for Blender's Cycles render engine?
Native FreeBSD does not include a working CUDA package. I can't test this in a virtual machine and i may switch to FreeBSD if this is possible.
Has anyone tried this or would i waste my time testing this on my native Desktop machine?


----------



## shkhln (Mar 10, 2018)

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206711
I must admit I never actually tried CUDA with that workaround. OpenGL works with the 375.66 driver and doesn't work with 384.98 or 390.25.


----------



## Snurg (Mar 10, 2018)

Thank you shkhln for that information!
I guess suspend/resume can be fixed using the older driver, as 390 broke that, too.
Luckily one can download a few older drivers like 375.66 here: http://www.nvidia.com/drivers/beta
(I downloaded 375.66 just in case Nvidia stops keeping it available for download soon)


----------



## shkhln (Mar 10, 2018)

Snurg said:


> I guess suspend/resume can be fixed using the older driver, as 390 broke that, too.


Did it? I assume suspend/resume functionality was broken long before 390. Never tried using that either.



Snurg said:


> Luckily one can download a few older drivers like 375.66 here: http://www.nvidia.com/drivers/beta


Let me refer you to the "Unix Graphics Announcements and News" thread at https://devtalk.nvidia.com/default/board/99/.


----------



## Snurg (Mar 10, 2018)

shkhln said:


> Did it? I assume suspend/resume functionality was broken long before that. Never tried using that either.


It still worked for me with iirc 384. When I updated to 390, it stopped to work totally.
However, it takes quite a bit of effort to make it work on FreeBSD 10.2 or so and later, as newcons and vesa.ko breaks it and needs to be removed from the system configuration.


----------



## drhowarddrfine (Mar 11, 2018)

linuxnunix said:


> I've managed to run Blender 2.79 for Linux x64 in FreeBSD 11.1 with Binary compatibility "linux-c7" in a virtual QEMU machine.


I'm not on my machine but blender can be installed from ports on FreeBSD without all that.


linuxnunix said:


> My question is if it is possible to install the latest 390.25 Nvidia Drivers


Yes. nVidia supports FreeBSD.

The CUDA stuff I can't comment on.


----------



## linuxnunix (Mar 11, 2018)

Thanks for the answers. It's CUDA what prevents me to install FreeBSD because i use Blender a lot and render times are much faster with CUDA.
For now i stay with Archlinux but i may try Binary compatibility + CUDA at some point.


----------



## shkhln (Mar 19, 2018)

Ok, I managed to run OpenGL and Vulkan under 64-bit linuxulator with 384.111 driver by registering nvkms ioctls (in addition to the patch in the issue 206711) and then decided to test CUDA.


```
% nvcc -o test -lcuda test.c
% truss ./test
...
linux_newstat("/usr/bin/nvidia-modprobe",0x7fffffffc930) ERR#-2 'No such file or directory'
linux_open("/dev/nvidia-uvm",0x80002,00)     ERR#-2 'No such file or directory'
linux_open("/dev/nvidia-uvm",0x2,00)         ERR#-2 'No such file or directory'
linux_ioctl(0xfffffffe,0x30000001,0x7fffffffc9e0) ERR#-9 'Bad file descriptor'
linux_ioctl(0xfffffffe,0x30000002,0x0)         ERR#-9 'Bad file descriptor'
close(-2)                     ERR#-9 'Bad file descriptor'
linux_newfstat(1,0x7fffffffcfe0)         = 0 (0x0)
linux_mmap2(0x0,0x1000,0x3,0x22,0xffffffffffffffff,0x0) = 34366578688 (0x800686000)
cuInit failed: 999
write(1,"cuInit failed: 999\n",19)         = 19 (0x13)
linux_exit_group(0x1)      
process exit, rval = 1
```

It seems to be probing _nvidia-uvm_, which is not present in the FreeBSD driver. That part (a kernel module) of the Linux driver appears to be fully open-source because I don't see any precompiled objects lying around and should in principle be possible to port, but there is likely zero interest in that. I can't imagine FreeBSD devs doing that work. Maybe stubbing a few things here and there would be sufficient in practice, we'll see.


----------



## SirDice (Mar 20, 2018)

shkhln said:


> I can't imagine FreeBSD devs doing that work.


It's NVidia that supplies the code. So it's NVidia that needs to do the work.


----------



## shkhln (Mar 20, 2018)

SirDice said:


> It's NVidia that supplies the code. So it's NVidia that needs to do the work.


Don't get me wrong, I agree this is Nvidia's responsibility, however at this point CUDA is a 10 years old technology and it never has been available for FreeBSD natively. It is pretty clear they just don't care.


----------



## Snurg (Mar 20, 2018)

SirDice said:


> It's NVidia that supplies the code. So it's NVidia that needs to do the work.


The FreeBSD devs doing the video stuff knew for years that vesa.ko and newcons() break Nvidia suspend/resume, and instead of fixing that, they recommend to use AMD/ATI because "Nvidia makes problems".
So, why should Nvidia care?


----------



## shkhln (Mar 20, 2018)

Snurg said:


> they recommend to use AMD/ATI because "Nvidia makes problems"



To be fair, Mesa has a public bugtracker.  Nvidia is a bunch of jerks in comparison. Yeah, they have more capable hardware, more performant and less buggy drivers, extremely competent people, whatever. But can you actually check whether your suspend/resume problem has been reported to them? Nope.


----------



## pbp_jackd (Jan 16, 2021)

linuxnunix said:


> Hi!
> 
> I've managed to run Blender 2.79 for Linux x64 in FreeBSD 11.1 with Binary compatibility "linux-c7" in a virtual QEMU machine.
> My question is if it is possible to install the latest 390.25 Nvidia Drivers and CUDA 9.1 within the FreeBSD compatibility layer for Blender's Cycles render engine?
> ...


How did you manage to start the linux binary of blender ?
At least in my tests with Blender 2.91 I always get:

```
Error! Unsupported graphics card or driver.
A graphics card and driver with support for OpenGL 3.3 or higher is required.
The program will now close.
```

glxinfo for compat gives me OpenGL version 2.1, which according to the error message is definetly a problem.

```
LIBGL_ALWAYS_SOFTWARE=1 /compat/linux/bin/glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 7.0, 128 bits)
OpenGL version string: 2.1 Mesa 18.3.4
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 18.3.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
```

vs. the results with "FreeBSD Mesa"


```
glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: AMD Radeon RX 5700 XT (NAVI10, DRM 3.35.0, 13.0-CURRENT, LLVM 10.0.1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.2.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.2.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.2.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
```


----------



## linuxnunix (Jan 17, 2021)

Since Blender version 2.80 it requires OpenGL 3.3. You can try 2.79, it should work with OpenGL 2.1.
And i think i had to disable Blender Sound output with a parameter. (./blender -noaudio)


----------



## pbp_jackd (Jan 17, 2021)

linuxnunix said:


> Since Blender version 2.80 it requires OpenGL 3.3. You can try 2.79, it should work with OpenGL 2.1.
> And i think i had to disable Blender Sound output with a parameter. (./blender -noaudio)


Blender 2.79b works. Thank you. But pitty, I need 2.9.

Just wondering if anyone knows a way to make linux mesa report a higher OpenGL version ?


----------



## kpedersen (Jan 17, 2021)

I generally fall back to LLVMpipe (which is software rendering but supports up to OpenGL 4.x). Unless you have any really complex models it should work.

`$ LIBGL_ALWAYS_SOFTWARE=1 blender`

Frankly I am getting a little sick of Blender. It is either getting too "professional" for me or it is starting to be pulled apart by many commercial companies trying to push their agenda and incorrect decisions. All I know is it is changing too much (they broke the Blender Render which was great for easy shadowmap baking), trying to look like Maya too much and consuming too much hardware.

(Annoyingly this was further exacerbated by the Linux Intel drivers dropping support for OpenGL 2.1 on my slightly older GMA 965 GPU. FreeBSD seems to have gotten affected by the upstream but OpenBSD oddly didn't).

As a small side project I have been bastardizing a Quake III level editor to make it work as a generic modeller just because I can see Blender becoming a pain in the butt in future (http://thamessoftware.co.uk/openradiant)


----------



## shkhln (Jan 18, 2021)

pbp_jackd said:


> start the linux binary of blender ?


Why do you want a Linux binary in the first place?



pbp_jackd said:


> glxinfo for compat gives me OpenGL version 2.1


I imagine LIBGL_ALWAYS_SOFTWARE=1 has something to do with it.


----------



## kpedersen (Jan 18, 2021)

shkhln said:


> I imagine LIBGL_ALWAYS_SOFTWARE=1 has something to do with it.



The software renderer (LLVMpipe) should give more than 2.1
On a machine I haven't updated for a while I get:


```
Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 8.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.2.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
```

Though perhaps the Mesa in linux compat is old?


----------



## shkhln (Jan 18, 2021)

kpedersen said:


> Though perhaps the Mesa in linux compat is old?


It is, but that's beside the point. Although, now that I think of it, it _might_ have some problems working with the newest AMD cards.


----------



## pbp_jackd (Jan 18, 2021)

shkhln said:


> Why do you want a Linux binary in the first place?
> 
> 
> I imagine LIBGL_ALWAYS_SOFTWARE=1 has something to do with it.


I was hoping I could OpenCL somehow working with the Linux Version and get GPU rendering this way in Blender. Did not think the whole concept through though. Just starting here and then solve the next issue and so on.

I'm also using Darktable quite a bit and GPU rendering would be very welcome too.

It seems to me it all depends on clover getting image support implemented and there is https://bugs.freedesktop.org/show_bug.cgi?id=87738 and a couple of other bugs but with no visible progress.

For Blender I was also wondering if one could somehow get https://www.amd.com/en/technologies/radeon-prorender to work this way. Most likly not because they say it requires the AMD drivers but yeah, that is what I was after.

About LIBGL_ALWAYS_SOFTWARE=1.
If I run glxinfo withouth the variable set it gives me this:

```
/compat/linux/bin/glxinfo  | grep version               
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: amdgpu_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: amdgpu
libGL error: pci id for fd 4: 1002:731f, driver (null)
pci id for fd 5: 1002:731f, driver (null)
libGL error: failed to create dri screen
libGL error: failed to load driver: radeonsi
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
```


----------



## shkhln (Jan 18, 2021)

So, you want OpenCL libs from AMDGPU-Pro? Otherwise this doesn't make any sense.


----------



## pbp_jackd (Jan 18, 2021)

shkhln said:


> So, you want OpenCL libs from AMDGPU-Pro? Otherwise this doesn't make any sense


I don't if that is the only way. But yes I have read somewhere that it should be possible to extract those from the AMD driver.


----------



## pbp_jackd (Jan 19, 2021)

shkhln said:


> It is, but that's beside the point. Although, now that I think of it, it _might_ have some problems working with the newest AMD cards.


Just happend to stumble over https://phoronix.com/scan.php?page=news_item&px=AMD-Navi-RADV-Mesa-19.2 today.
Without checking mesa git repo yet you might be right that mesa 18.3 as in linuxlator today is missing some bits to support Navi10 cards.

Just wondering if building mesa head from git and putting it into linuxlator would be any good ?


----------



## kpedersen (Jan 20, 2021)

In this case, would the LIBGL_ALWAYS_*INDIRECT* stuff work? This should just send the OpenGL drawing commands outside of the Linux compat to then be rendered natively on the FreeBSD Mesa (which does have working AMD GL drivers).

The problem is, I can't recall the last time I saw indirect rendering actually working.


----------



## shkhln (Jan 20, 2021)

kpedersen said:


> In this case, would the LIBGL_ALWAYS_*INDIRECT* stuff work?


Forget it ever existed, it's been dead for many years now.


----------



## pbp_jackd (Jan 25, 2021)

shkhln said:


> It is, but that's beside the point. Although, now that I think of it, it _might_ have some problems working with the newest AMD cards.


1 step closer.
Got Linux Blender 2.91 working with OpenGL after I update Mesa to 20 in /compat/linux.

not it looks like so:


```
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.4
OpenGL core profile shading language version string: 4.60
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.0.4
OpenGL shading language version string: 4.60
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
    GL_EXT_shader_implicit_conversions, GL_EXT_shader_integer_mix,
```


----------



## shkhln (Jan 25, 2021)

If you are so inclined, you can try AMDGPU-Pro OpenCL libraries (use https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=opencl-amd as a reference to what download/extract) with my glibc shim. You'll need to set OCL_ICD_VENDORS and LD_LIBRARY_PATH appropriately and then run `with-glibc-shim clinfo`.


----------



## pbp_jackd (Jan 25, 2021)

shkhln said:


> If you are so inclined, you can try AMDGPU-Pro OpenCL libraries (use https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=opencl-amd as a reference to what download/extract) with my glibc shim. You'll need to set OCL_ICD_VENDORS and LD_LIBRARY_PATH appropriately and then run `with-glibc-shim clinfo`.


Thx. No luck so far.
Not sure what is missing that clinfo will find a device.

My setup looks like so:
- installed ubuntu 20.04 to /compat/linux ( https://forums.freebsd.org/threads/...-google-chrome-linux-binary-on-freebsd.77559/)
- installed AMD OpenCL libs with this script: https://gist.github.com/tuxutku/79daa2edca131c1525a136b650cdbe0a
- run clinfo in various ways e.g.

```
OCL_ICD_VENDORS="/compat/linux/etc/OpenCL/vendors/" LD_LIBRARY_PATH="/compat/linux/opt/amdgpu/share/libdrm" LIBGL_DRI3_DISABLE=1 ./with-glibc-shim clinfo
Number of platforms                               0
```

or

```
OCL_ICD_VENDORS="/compat/linux/etc/OpenCL/vendors/" LD_LIBRARY_PATH="/compat/linux/opt/amdgpu/share/libdrm" LIBGL_DRI3_DISABLE=1 /compat/linux/usr/bin/clinfo

Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (3188.4)
  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                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  AMD Accelerated Parallel Processing
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   
  clCreateContext(NULL, ...) [default]            No devices found in 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

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1
```


----------



## shkhln (Jan 25, 2021)

pbp_jackd said:


> - installed AMD OpenCL libs with this script: https://gist.github.com/tuxutku/79daa2edca131c1525a136b650cdbe0a


I specifically said extract and not install with a script. That is, extract files by hand into some local directory; you just messed up your installation.


----------



## pbp_jackd (Jan 26, 2021)

shkhln said:


> I specifically said extract and not install with a script. That is, extract files by hand into some local directory; you just messed up your installation.


Did everything again without installing ;-)

Questions:
Guessing based on the output below in 1.1. I think clinfo can see my CPU after using the amd libs but not the GPU.
So what about this file: amdgpu.ids ? It does contain the id for my 5700 XT. Any ideas what to do with it ?
Is part of https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=opencl-amd but I do not point to it in any way right now.

Observations:
1. If OCL_ICD_VENDORS or LD_LIBRARY_PATH is not set clinfo always gives

```
Number of platforms                               0
```
1.1 running clinfo inside the ubuntu chroot but exported OCL_ICD_VENDORS and LD_LIBRARY_PATH
or from outside (/compat/linux/usr/bin/clinfo) also with exported env variables leads to the output below. If  one is not set, the output is same with above.
So it seems like a tiny step forward.

```
Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (3188.4)
  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                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  AMD Accelerated Parallel Processing
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)  
  clCreateContext(NULL, ...) [default]            No devices found in 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

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1
```

2. running clinfo from host with
`OCL_ICD_VENDORS="/tmp/pkgdir/etc/OpenCL/vendors/" LD_LIBRARY_PATH="/tmp/pkgdir/usr/lib" LIBGL_DRI3_DISABLE=1 ./with-glibc-shim clinfo`

```
➜  bin git:(master) ✗
OCL_ICD_VENDORS="/tmp/pkgdir/etc/OpenCL/vendors/" LD_LIBRARY_PATH="/tmp/pkgdir/usr/lib" LIBGL_DRI3_DISABLE=1 ./with-glibc-shim clinfo
shim init
shim_fcntl64 is not implemented
Assertion failed: (0), function shim_fcntl64, file build/wrappers64.c, line 16037.
[1]    15491 abort (core dumped)  OCL_ICD_VENDORS="/tmp/pkgdir/etc/OpenCL/vendors/" LD_LIBRARY_PATH= =1  clinfo
```

3. did run ldd clinfo ang got:

```
ldd clinfo
        linux_vdso.so.1 (0x00007ffffffff000)
        libOpenCL.so.1 => /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 (0x0000000801200000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x0000000801070000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000000080140b000)
        /lib64/ld-linux-x86-64.so.2 (0x0000000001021000)
```


----------



## shkhln (Jan 26, 2021)

pbp_jackd said:


> shim_fcntl64 is not implemented
> Assertion failed: (0), function shim_fcntl64, file build/wrappers64.c, line 16037.


Try again with https://github.com/shkhln/libc6-shim/commit/1b7863ab017273d7def84ccdaa5115b0e7c961fe.


----------



## pbp_jackd (Feb 3, 2021)

shkhln said:


> Try again with https://github.com/shkhln/libc6-shim/commit/1b7863ab017273d7def84ccdaa5115b0e7c961fe.


With your update the failure is gone. Thx.


----------



## pbp_jackd (Feb 3, 2021)

Just some notes for myself and in case someone else wants to give the approach a try.

- I did not get OpenCL to work with the Linuxlator ubuntu 18.04.5 LTS +  5700 XT + AMD OpenCL libs (yet). The results are the same as show already above. The 5700 XT is not seen by clinfo.
- I attached a strace log I took from inside the ubuntu chroot. I'm not understanding what is going on there in detail ( maybe someone else can see what is wrong ?) but checking it against the hints from https://github.com/bashbaug/OpenCLP...inux.asciidoc#troubleshooting-opencl-on-linux it seems things are actual setup "OK"
- Finding a Ubuntu version + a version of AMD OpenCL libs which actually work together seems crucial.
- The only combination which worked for me on an actual Ubuntu installation was Ubuntu 18.04.5 HWE + AMD amdgpu-pro-20.40-1147287-ubuntu-18.04.tar.xz . With this the 5700 XT + Ryzen CPU are recognized by clinfo, blender, darktable as OpenCL devices.
- Hints about the OS + AMD OpenCL version: https://devtalk.blender.org/t/guide-install-amd-opencl-on-pop-os-ubuntu-some-derivates/13458
-  like shkhln said, its enough to extract the libs and the icd files
- the icd files you need are:

```
-rw-r--r--  1 user  user    20B Feb  2 22:26 amdocl-orca64.icd
-rw-r--r--  1 user  user    15B Feb  2 22:26 amdocl64.icd
```
- the libs you need are:

```
lrwxr-xr-x  1 user  user    21B Feb  2 22:26 libamd_comgr.so -> libamd_comgr.so.1.7.0
lrwxr-xr-x  1 user  user    21B Feb  2 22:26 libamd_comgr.so.1 -> libamd_comgr.so.1.7.0
-rw-r--r--  1 user  user   104M Feb  2 22:26 libamd_comgr.so.1.7.0
-rw-r--r--  1 user  user    81M Feb  2 22:26 libamdocl-orca64.so
-rw-r--r--  1 user  user    35M Feb  2 22:26 libamdocl12cl64.so
-rw-r--r--  1 user  user    90M Feb  2 22:26 libamdocl64.so
lrwxr-xr-x  1 user  user    16B Feb  2 22:26 libOpenCL.so.1 -> libOpenCL.so.1.2
-rw-r--r--  1 user  user    30K Feb  2 22:26 libOpenCL.so.1.2
```

- I replicated the setup as good as I could on FreeBSD (13-Alpha3) like so:
- setup Ubuntu BIONIC Linuxlator according to  https://wiki.freebsd.org/LinuxJails
- NOTE: this only gives you Ubuntu version 18.4 LTS. To get 18.04.5 I had to add the following to  /compat/ubuntu/etc/apt/sources.list ( run apt update/upgrade. Check OS version e.g. with lsb_release -a)
`deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse`
- The upgrade is important. Otherwise the mesa version is too old to recognize the 5700 XT and second it would not match the Ubuntu version I used for testing.
- I also tested to upgrade just mesa to latest but seems to make no difference either.


----------



## shkhln (Feb 3, 2021)

pbp_jackd said:


> With your update the failure is gone. Thx.


That was just an assertion check (stub). I'm rather interested in what it is _doing_ now. What result clinfo prints, differences with Linuxulator and so on.


----------



## BawdyAnarchist (Apr 8, 2021)

Pretty bummed to find out that stupid nvidia doesn't allow CUDA or CL to work on FreeBSD. What a bunch of jerks. Surely they have some backroom deal with Linux??

I need it for Blender, which seems to be the overal best free and open source 3d design software around. And now I have to go buy an AMD GPU just to get this to work. Too bad I didn't know about FreeBSD when I bought this machine, because I specifically bought the nvidia for CUDA support; otherwise would've just gone with AMD.


----------



## shkhln (Apr 8, 2021)

BawdyAnarchist said:


> I need it for Blender, which seems to be the overal best free and open source 3d design software around. And now I have to go buy an AMD GPU just to get this to work.


FYI, you are posting this directly under a string of posts documenting how good AMD is at running Blender on FreeBSD.



BawdyAnarchist said:


> What a bunch of jerks. Surely they have some backroom deal with Linux??


Do you have any non-dumb things to say on the topic?


----------



## BawdyAnarchist (Apr 8, 2021)

shkhln said:


> FYI, you are posting this directly under a string of posts documenting how good AMD is at running Blender on FreeBSD.
> 
> 
> Do you have any non-dumb things to say on the topic?


Sorry, I apologize, it was late at night and I was frustrated at not being able to get my nice shiny new GPU to do a basic thing that I needed. I'm just a dabbler and I don't really understand the nuts and bolts of how this works.

Could I make a small request? I'm not going to be running Blender in Linuxulator; just in a FreeBSD jail. Are you saying that I will have problems with OpenCL on AMD GPU as well? Because those are the two options I see in Blender for ray tracing and GPU support (CUDA and OpenCL). I thought this thread was primarily about trying to get OpenCL libraries working on an nvidia GPU.


----------



## shkhln (Apr 9, 2021)

BawdyAnarchist said:


> I thought this thread was primarily about trying to get OpenCL libraries working on an nvidia GPU.


It is supposed to be, but it was hijacked.



BawdyAnarchist said:


> Are you saying that I will have problems with OpenCL on AMD GPU as well?


With AMD there are 4 alternative OpenCL drivers: Clover, Orca, PAL and ROCm.

Clover is an open-source OpenCL driver from Mesa, that's what you normally get on FreeBSD.
Orca and PAL are official AMD closed-source OpenCL drivers _for Linux_.
ROCm is an official AMD open-source GPU computing stack (it's not limited to OpenCL), which is in theory supposed to replace all other AMD GPU computing stuff. However, inexplicably, AMD decided to _not_ support regular consumer GPUs in ROCm. To make this as much of a PITA as possible they also decided to limit support to specific CPUs and motherboard features: https://github.com/RadeonOpenCompute/ROCm#Hardware-and-Software-Support https://docs.amd.com/bundle/Hardwar...Guide/page/Hardware_and_Software_Support.html. ROCm is not ported to FreeBSD.


----------



## Jose (Apr 9, 2021)

shkhln said:


> However, inexplicably, AMD decided to _not_ support regular consumer GPUs in ROCm. To make this as much of a PITA as possible they also decided to limit support to specific CPUs and motherboard features: https://github.com/RadeonOpenCompute/ROCm#Hardware-and-Software-Support.


Sounds like the ATI I know and hate.


----------



## SteamBSD (Apr 17, 2021)

*For what*  *?* (This is a joke) The best games run well: CSGO, DOTA2, Age of Mythology (wine), Heroes of Might and Magic III Hota (wine)
*Heroes 3 took half my life away*

--- SteamBSD © is FREE operating system.
YouTube: https://www.youtube.com/channel/UC8wwRY8yGWiJ-bIQlK0wvUA/videos
Site (download ISO/IMG): https://lpros.blogspot.com
Github (internet installer): https://github.com/steambsd/os
Email: steambsd@gmail.com


----------

