I tried Blender-Open-Data benchmark scripts from Sem Mulder and could not get my CUDA/OptiX device run on Linux from command line. Blender always use CPU for rendering. CUDA is installed and from Interface I can render with both CUDA and OptiX on GPU.
Responsible for that, is line 57 in render.py:
d for d in devices if d.type == requested_device.type and not d.is_display
First of all, my GPU is_display. Problematic is, CPU is listed as CUDA and OptiX device on Ubuntu 20 and Archlinux. This is why CPU is set as enabled_device in line 61 and enabled_device is not None in line 62.
I am not sure how to solve that. The code works with Windows, but not with Linux (tested on Ubuntu and Archlinux).
Similar output, different result! Because GPU not is_display, Windows set GPU as enabled_device and at line 135 as render_device.