Linux Binary compatibility - Nvidia Drivers and CUDA for Blender

linuxnunix

New Member


Messages: 7

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?
 

Snurg

Aspiring Daemon

Reaction score: 343
Messages: 821

Thank you [USER=54069]shkhln[/USER] 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

Daemon

Reaction score: 749
Messages: 1,826

drhowarddrfine

Son of Beastie

Reaction score: 1,733
Messages: 3,814

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.
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.
 
OP
L

linuxnunix

New Member


Messages: 7

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

Daemon

Reaction score: 749
Messages: 1,826

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.

Code:
% 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.
 
Last edited:

shkhln

Daemon

Reaction score: 749
Messages: 1,826

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

Aspiring Daemon

Reaction score: 343
Messages: 821

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

Daemon

Reaction score: 749
Messages: 1,826

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

Member

Reaction score: 5
Messages: 31

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?
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
 
OP
L

linuxnunix

New Member


Messages: 7

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)
 
Top