GPU rendering on linux

mateusz@autonomy.pl
Posts: 14
Joined: Fri Jan 11, 2019 2:43 pm

GPU rendering on linux

Post by mateusz@autonomy.pl » Fri Mar 01, 2019 10:27 am

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

User avatar
timurhai
Site Admin
Posts: 497
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post by timurhai » Mon Mar 04, 2019 10:46 am

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.
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

mateusz@autonomy.pl
Posts: 14
Joined: Fri Jan 11, 2019 2:43 pm

Re: GPU rendering on linux

Post by mateusz@autonomy.pl » Thu Mar 07, 2019 8:24 am

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

User avatar
timurhai
Site Admin
Posts: 497
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post by timurhai » Thu Mar 07, 2019 9:46 am

Hi.
If you find out some corrected command line, i can guide you where to change it for Afanasy.
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

mateusz@autonomy.pl
Posts: 14
Joined: Fri Jan 11, 2019 2:43 pm

Re: GPU rendering on linux

Post by mateusz@autonomy.pl » Thu Mar 07, 2019 10:38 am

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

User avatar
timurhai
Site Admin
Posts: 497
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post by timurhai » Thu Mar 07, 2019 10:49 am

May be GUI session needed?
Try to run afrender in a terminal, where GPU command works.
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

mateusz@autonomy.pl
Posts: 14
Joined: Fri Jan 11, 2019 2:43 pm

Re: GPU rendering on linux

Post by mateusz@autonomy.pl » Tue Mar 12, 2019 10:31 am

runing afrender in system terminal would be equal to gui sesion?

User avatar
timurhai
Site Admin
Posts: 497
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post by timurhai » Tue Mar 12, 2019 10:40 am

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)
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

User avatar
timurhai
Site Admin
Posts: 497
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post by timurhai » Tue Mar 12, 2019 10:41 am

The best way to check - try to launch Blender GUI from a terminal. If it works - terminal has a display.
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

mateusz@autonomy.pl
Posts: 14
Joined: Fri Jan 11, 2019 2:43 pm

Re: GPU rendering on linux

Post by mateusz@autonomy.pl » Tue Mar 12, 2019 10:55 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest