GPU rendering on linux

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

GPU rendering on linux

Post 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
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post 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.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
mateusz@autonomy.pl
Posts: 16
Joined: Fri Jan 11, 2019 2:43 pm

Re: GPU rendering on linux

Post 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...
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post by timurhai »

Hi.
If you find out some corrected command line, i can guide you where to change it for Afanasy.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
mateusz@autonomy.pl
Posts: 16
Joined: Fri Jan 11, 2019 2:43 pm

Re: GPU rendering on linux

Post 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
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post by timurhai »

May be GUI session needed?
Try to run afrender in a terminal, where GPU command works.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
mateusz@autonomy.pl
Posts: 16
Joined: Fri Jan 11, 2019 2:43 pm

Re: GPU rendering on linux

Post by mateusz@autonomy.pl »

runing afrender in system terminal would be equal to gui sesion?
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post 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)
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: GPU rendering on linux

Post by timurhai »

The best way to check - try to launch Blender GUI from a terminal. If it works - terminal has a display.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
mateusz@autonomy.pl
Posts: 16
Joined: Fri Jan 11, 2019 2:43 pm

Re: GPU rendering on linux

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