Page 1 of 2

GPU rendering on linux

Posted: Fri Mar 01, 2019 10:27 am
by mateusz@autonomy.pl
I have made configuration with windows users and mixed linux/ windows render nodes.
When i use CPU for rendering everything is fine. Problem is that when i want to render on GPU.
Windows slaves renders it on gpu correctly, but linux ones change cycles mode to CPU. How to avoid that?
Best regards

Re: GPU rendering on linux

Posted: Mon Mar 04, 2019 10:46 am
by timurhai
Hi.
There can be lots of reasons.
Remember that Afanasy (like most others render managers) just run task command.
You can double click job, than double click task to get all its info - command and command output (stdout+stderr).

Machines hardware is the same?
Commands for linux/windows are the same?
May there is some error/warning message in that output?
Try to run that command in a terminal with a GUI session where are should be sure that drivers are ok.

Re: GPU rendering on linux

Posted: Thu Mar 07, 2019 8:24 am
by mateusz@autonomy.pl
thanks for reply.
It seams to be blender itself issue as i found

"Blender has no command-line way to set the render device Cycles should use. (...) This is not a problem if you use the same computer to save the file and to render it. However if you need to render your file in a remote computer (in this case a renderfarm) you may not have access to the same hardware available in the target computer. So you can’t rely on the ‘render device’ settings that are saved with your .blend."

There is no problem when using blender with gui- somehow it is switching to available gpus itself... but no way to make it work from commandline... strange that noone have found it before...

Re: GPU rendering on linux

Posted: Thu Mar 07, 2019 9:46 am
by timurhai
Hi.
If you find out some corrected command line, i can guide you where to change it for Afanasy.

Re: GPU rendering on linux

Posted: Thu Mar 07, 2019 10:38 am
by mateusz@autonomy.pl
after further investigation i found that when pasting same command from afanasy task to terminal in ubuntu- file renders normally on gpu..
but when afanasy is starting its job with same command it becames cpu only...
seams like blender instance opened by cgru dont see gpus for some reason... and its linux related

Re: GPU rendering on linux

Posted: Thu Mar 07, 2019 10:49 am
by timurhai
May be GUI session needed?
Try to run afrender in a terminal, where GPU command works.

Re: GPU rendering on linux

Posted: Tue Mar 12, 2019 10:31 am
by mateusz@autonomy.pl
runing afrender in system terminal would be equal to gui sesion?

Re: GPU rendering on linux

Posted: Tue Mar 12, 2019 10:40 am
by timurhai
If terminal will have a display (GUI session) it will be.
For example, when you run some xfce-terminal from choosing some menu item from xfce window manager theme, it will have a gui. (xfce can be kde or gnome or whatever)

Re: GPU rendering on linux

Posted: Tue Mar 12, 2019 10:41 am
by timurhai
The best way to check - try to launch Blender GUI from a terminal. If it works - terminal has a display.

Re: GPU rendering on linux

Posted: Tue Mar 12, 2019 10:55 am
by mateusz@autonomy.pl
OKay, running blender from terminal gives me no problem. Blender sees GPUs.
I even copied command from cgru task. Pasted it into terminal and linux render on GPU.
But same computer when recived same command throught cgru ints rendering CPU....