NVidia + run X apps from jail

Arto Pekkanen isoa at kapsi.fi
Mon Oct 3 13:28:43 UTC 2016


The problem is more complicated than that.

A FreeBSD jail fully prevents applications from accessing the graphics 
device. This means you must run the X-server outside of the jail, and 
then have the X applications connect to it from within the jail.

The applications cannot access the direct rendering capabilities of the 
GPU, because the GPU device is not available inside the jail (is outside 
the jail or in another computer entirely). This means that OpenGL 
applications cannot work UNLESS the GPU specific OpenGL library supports 
AIGLX. AIGLX allows sending OpenGL data over X11 client server 
connection, so that the graphics are rendered indirectly by the server 
instead of the application using the GPU directly. I know that the Open 
Source drivers such as i915 and radeon support AIGLX, but I am not sure 
if nVidia supports it. Read more on AIGLX here: 
https://en.wikipedia.org/wiki/AIGLX

To verify whether nVidia supports AIGLX, ie. OpenGL over X11 network 
connection, you should try installing the nvidia-driver package inside 
the jail where you run the applications. The nvidia-driver package 
provides nVidia specific libGL, which might be required to have 
compatible AIGLX implementation in both server and client end.

If installing nvidia-driver inside the jail does not enable OpenGL 
applications to run, then I assume the proprietary nVidia driver does 
not support AIGLX.

And regardless if you get AIGLX working or not, it is a suboptimal 
solution to remote or indirect rendering of OpenGL. The better way is to 
use VirtualGL:
http://www.virtualgl.org/About/Introduction

I've used VirtualGL to run OpenGL applications from a headless server on 
a laptop with a GPU, full hardware acceleration. I won't be acting as 
your technical support, but I just suggest you read the manuals, google 
a bit and do your own research on this.

Scott Bennett kirjoitti 03.10.2016 10:17:
> Petr Fischer <petr.fischer at me.com> wrote:
> 
>> Hello, I have kodi installed in a jail and running it remotely to the 
>> main host X server with DISPLAY=server:0 kodi...
>> 
>> With vesa driver, it's slow but everything works from jail.
>> 
>> Just bought new NVidia 210 card, installed "nvidia-driver" package, 
>> but now, every OpenGL application cant't start (when started inside 
>> jail):
>> 
>      I think that's the same GPU that I had in the machine I recently 
> stopped
> using.  If so, it is no longer supported by the main nvidia-driver, but 
> is
> supported by nvidia-driver-340.  Give that one a try instead, and let 
> us know
> whether that resolves the matter for you.
> 
> 
>                                   Scott Bennett, Comm. ASMELG, CFIAG
> **********************************************************************
> * Internet:   bennett at sdf.org   *xor*   bennett at freeshell.org  *
> *--------------------------------------------------------------------*
> * "A well regulated and disciplined militia, is at all times a good  *
> * objection to the introduction of that bane of all free governments *
> * -- a standing army."                                               *
> *    -- Gov. John Hancock, New York Journal, 28 January 1790         *
> **********************************************************************
> _______________________________________________
> freebsd-x11 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-x11
> To unsubscribe, send any mail to "freebsd-x11-unsubscribe at freebsd.org"

-- 
Arto Pekkanen


More information about the freebsd-x11 mailing list