Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Oct 2016 17:11:17 -0500
From:      Scott Bennett <bennett@sdf.org>
To:        freebsd-x11@freebsd.org, isoa@kapsi.fi
Subject:   Re: NVidia + run X apps from jail
Message-ID:  <201610032211.u93MBHwA024530@sdf.org>
In-Reply-To: <cccd3de7be9a2910e78d0c07ea58ee68@kapsi.fi>
References:  <20161003021517.GB92917@pf-bsd.local> <201610030717.u937HJ3Q018671@sdf.org> <cccd3de7be9a2910e78d0c07ea58ee68@kapsi.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
Arto Pekkanen <isoa@kapsi.fi> wrote:

     Please do *NOT* top-post!

> 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

     Well, if he uses a driver whose only support for the hardware is VESA,
I doubt it can help.  If he uses a driver that fully supports the hardware,
then other options may open up.
>
> 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.
>
     All that is interesting, but again, he needs to install the correct
driver, not the current nvidia-driver, which doesn't support his graphics
card (except as VESA).


                                  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         *
**********************************************************************



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610032211.u93MBHwA024530>