You are not logged in.

#1 2018-08-31 03:46:10

damo
....moderator....
Registered: 2015-08-20
Posts: 4,397

HowTo: GPU rendering on Buster, with Nvidia and Bumblebee (Optimus)

Updated version of HowTo get Blender Cycles GPU rendering on Debian 9, with Nvidia

I did a Helium to Buster upgrade as per @hhh's howto: dist-upgrade helium to buster (semi-official), then followed the package install process for nvidia and bumblebee in the previous HowTo

Warning: at the time of writing there is a critical bug in the nvidia-driver. It hasn't stopped me using the GPU, but nvidia-settings doesn't find the display(s). Arandr/xrandr manage OK though!

I also found out about using primusrun instead of optirun, and a command switch for them which make a significant difference to framerates. (YMMV of course wink )

To run nvidia-settings you need to use

optirun -b none nvidia-settings -c :8

To get the most out of primusrun use

vblank_mode=0 primusrun <application>

I made a wrapper script to make it easier to run applications from the menu...

#!/bin/bash
##
## primus - script to run applications using nvidia graphics

runcommand="$@"
vblank_mode=0 primusrun $runcommand &
#vblank_mode=0 optirun $runcommand &

exit

Comparisons: (compositing on/off made no difference on my system)

$  glxgears
370 frames in 5.0 seconds = 73.842 FPS
240 frames in 5.0 seconds = 47.991 FPS
240 frames in 5.0 seconds = 47.990 FPS
240 frames in 5.0 seconds = 47.991 FPS
240 frames in 5.0 seconds = 47.991 FPS

$ primusrun glxgears
/usr/bin/primusrun: line 41: warning: command substitution: ignored null byte in input
246 frames in 5.0 seconds = 49.119 FPS
240 frames in 5.0 seconds = 47.990 FPS
240 frames in 5.0 seconds = 47.991 FPS
240 frames in 5.0 seconds = 47.990 FPS
240 frames in 5.0 seconds = 47.991 FPS

$ vblank_mode=0 optirun glxgears
12699 frames in 5.0 seconds = 2539.646 FPS
12405 frames in 5.0 seconds = 2480.801 FPS
12697 frames in 5.0 seconds = 2539.362 FPS
12487 frames in 5.0 seconds = 2497.340 FPS
12783 frames in 5.0 seconds = 2556.472 FPS

$ vblank_mode=0 primusrun glxgears
/usr/bin/primusrun: line 41: warning: command substitution: ignored null byte in input
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
17883 frames in 5.0 seconds = 3576.529 FPS
18964 frames in 5.0 seconds = 3792.702 FPS
18992 frames in 5.0 seconds = 3798.278 FPS
18920 frames in 5.0 seconds = 3783.893 FPS
18982 frames in 5.0 seconds = 3796.380 FPS

I have added my graphics apps to bl-graphics-pipemenu (after copying it to ~/bin), like this, for example...

menuItem "Blender 2.79.6" "primus /home/damo/blender-builds/blender-2.79/blender"
Blender

...is getting better and better!  You can now do Cycles rendering on some graphics cards other than Nvidia, but I can't tell you anything about that hmm

Remember NOT to install Blender from the repos if you want to do superfast GPU rendering, and don't want to install 2GB of CUDA libraries. Download one of the self-contained builds from blender.org, and then do

apt-get install libcuda1

Unzip the tarball and run blender using a menu item, or...

$ vblank_mode=0 primusrun ~/path/to/blender

You can even get to play with the latest 2.10 alpha release, and the amazing Eevee real-time viewport renderer, with no chance of messing up your system smile


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

Board footer

Powered by FluxBB