How can I take advantage of my discrete graphics card on a headless server?
Asked Answered
I

2

8

I'm working on a remote visualization project for BioMesh3D, harnessing a beefed up server to do processing and rendering. It's easy to get it working if we setup a user to auto-login to the graphical desktop because then we have a running xserver. We'd like to run it completely headless and without having to do an auto-login.

It seems as if our only choice is to rely on something like Xvfb if we want to run the server completely headless. But as we are doing some fairly complex rendering we'd like to take advantage of the discrete graphics card.

Is it possible to get Xvfb to use the video card? If not, is there another method we can use?

Imagery answered 16/9, 2011 at 17:58 Comment(2)
Do you actually want to accelerate OpenGL stuff, or OpenCL type stuff? If OpenCL, I'd start by trying to see what the Amazon EC2 instances with GPU hardware do.Wheal
We are rendering 3D Meshes with SCIRun using OpenGLImagery
M
3

If you want to use hardware OpenGL rendering on linux then your options are:

  • Try the bleeding edge Mesa with Gallium drivers and EGL. IIRC last I checked this only supported GLES so you may need to tweak your rendering code.
  • Run an X server to access the OpenGL hardware via traditional driver

The NVIDIA binary blob supports running a headless X server (even multiple ones). Check out the http://vizstack.sourceforge.net/ project for details on that.

As for VirtualGL, it will let you achieve transparent remote rendering without modifying your app (I don't understand your "it's a bit too intrusive" or "rewrite the application" comments, could you expand?), but it still requires the X server running. (Update: VirtualGL 3 supports an EGL backend, and doesn't require the X server.)

Mouthwatering answered 24/9, 2011 at 4:13 Comment(0)
A
1

Did you take a look at http://www.virtualgl.org ?

Atrabilious answered 16/9, 2011 at 18:17 Comment(2)
We've looked at it. It's the only thing we know so far that we think could work the way we want. However, it's a bit to intrusive though. We'd rather not rewrite the application to facilitate the use of virtualgl. Thanks for the response!Imagery
@rabid.sloth: It's perfectly possible to start X without performing a autologin. In one of the startup scripts: 'xinit $COMMAND_TO_LAUNCH_A_PRIMARY_X_CLIENT -- /usr/bin/X :100'Atrabilious

© 2022 - 2024 — McMap. All rights reserved.