0

I am trying to run Blender 3.6.5 in a remote server using x-forwarding. The server as installed the base x11 and mesa packages, as well as freetype package.

user@server:~$ sudo apt install -y
        bzip2 libfreetype6 libgl1-mesa-dev \
        libglu1-mesa \
        fontconfig \
        libxi6 libxrender1 libglib2.0-0 x11-utils

I connect to the server using ssh client, and defining the x11 forwarding option.

user@client$ ssh -X -v user@server

I tryed to run glxgears and it works properly, but when I run blender, it crashes with an error that I do not understand.

user@server:~/blender-3.6.5-linux-x64$ ./blender
0debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 60744
debug1: channel 1: new [x11]
debug1: confirm x11
Failed to open dir (No such file or directory): /run/user/7693/gvfs/
X Error of failed request:  BadGC (invalid GC parameter)
  Major opcode of failed request:  60 (X_FreeGC)
  Resource id in failed request:  0x6e00025
  Serial number of failed request:  218
  Current serial number in output stream:  223
debug1: channel 1: FORCE input drain

Is there any other thing that I need to consider to run Blender remotely? (fonts or specific libraries for example)

1
  • 1
    I mean glxgears is about 30 years old and ribs on purely software-rendered mesa at maximum rate. Using it to determine whether a modern application will work over X forwarding is not very sensible. Nov 24, 2023 at 11:05

1 Answer 1

1

Since blender uses modern X11 features and relies on features that weren't even invented when glxgears was written, it's not too much of a surprise that glxgears needs less features to work.

Quick tracing of what X11 calls blender does during start indicates it makes use of shared memory extensions - which makes perfectly good sense for a program which does things like modifying textures and displaying them on models. Then I'm sure the OpenGL side also makes use of similar features, so even if you somehow patched all x11-mitshm calls out and made them somehow transparently transport through SSH, it would fall flat.

You need your blender to render locally (i.e., on the remote machine that is actually running blender). Then you can forward the rendered bitmap to your local machine. And I suspect that is what you want to do anyway: you're probably not logging in from a machine with a mighty GPU and CPU to a server that is running with very little compute power, but quite the opposite! You're probably trying to use blender from a laptop that is too slow and not GPU equipped, and the server is the one that's fast and has the GPU, right? (Otherwise your whole endeavor makes little sense. Run blender locally.)

Classically, VNC doing screen captures of the displayed graphics would have been the way to do that. But I'm not sure this is the desired way with high-resolution low-latency large-delta graphics. You typically need a physical screen attached to the remote server to start a GPU-accelerated X.org on there that a VNC server can then screen grab, encode, and send to you - none of that is desirable.

I think I'd look into the application streaming solutions that people have built for headless servers after Google abandoned Stadia (and all their paying customers and business partners, which should tarnish Google's image as platform provider, including its cloud compute offerings, for decades to come). I think Sunshine for the server and Moonshine for the client are currently popular solutions, but I have no experience with these.

5
  • Hi, thanks for the response. The point is that, the same server (hardware) and setup worked three days ago. However, IT updated from Ubuntu 18 to Ubuntu 22 (full reinstall), and I need to install again the needed packages to make it work. The x-forwarding worked perfectly using ssh, and I was able to interact with the blender window in real-time. I guess that I missed a package or a specific configuration for this end.
    – goe
    Nov 27, 2023 at 9:09
  • No, blender 2.8 stopped working over x forwarding, due to central features it got. So, you would need to manage to downgrade to a really ancient blender. Nov 27, 2023 at 10:21
  • Using Blender 3.6 in the server, and connecting to it using MobaXterm from windows, it works. Not from my linux machine. I am checking now where is the client configuration difference between both scenarios
    – goe
    Nov 27, 2023 at 10:29
  • And as I told you before, I was working using x-forwarding with blender (3.3) since some days ago, so the x-forwarding feature is working also in modern version of the tool
    – goe
    Nov 27, 2023 at 10:30
  • Interesting! (I was assuming you were using the old blender that Ubuntu 18.04 ships itself) That contradicts developer statements! But facts are facts, so you must be right then. But in that case, I'm out of insights. I can't make it work over ssh. Anyways, I'm fairly certain it's not going to be a missing library. Nov 27, 2023 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .