Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Oct 2016 05:45:49 +0200
From:      Petr Fischer <petr.fischer@me.com>
To:        freebsd-x11@freebsd.org
Subject:   Re: NVidia + run X apps from jail
Message-ID:  <20161005034549.34ib275kgav3bunw@pf-bsd.local>
In-Reply-To: <07be07151f0b51498e9e9d4e2c518fdd@kapsi.fi>
References:  <20161003021517.GB92917@pf-bsd.local> <07be07151f0b51498e9e9d4e2c518fdd@kapsi.fi>

next in thread | previous in thread | raw e-mail | index | archive | help

> Petr Fischer kirjoitti 03.10.2016 05:15:
> > 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):
> > 
> > 1) DISPLAY=server:0 xclock (from jail)
> > OK
> > 
> > 2) DISPLAY=server:0 glxgears (from jail)
> > libGL error: No matching fbConfigs or visuals found
> > libGL error: failed to load driver: swrast
> > X Error of failed request:  BadValue (integer parameter out of range
> > for operation)
> >   Major opcode of failed request:  153 (GLX)
> >   Minor opcode of failed request:  3 (X_GLXCreateContext)
> >   Value in failed request:  0x0
> >   Serial number of failed request:  33
> >   Current serial number in output stream:  35
> > 
> > What's the problem? Thanks! pf
> > _______________________________________________
> > freebsd-x11@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-x11
> > To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org"
> 
> Yes, first verify that you can get accelerated GPU support working on the
> actual system where you run the X-server. If the nvidia-driver -package does
> not work, install one of the other nvidia-driver-* package and try again.
> Test the graphics with OpenGL applications.

Yes, I installed correct nvidia-driver-340 (old graphics card, older driver).
That is OK. Works fine (media acceleration + opengl).

> After you can get OpenGL working locally on the system where X11 server is
> running in, next you need to try if you can get AIGLX working. To do this I
> would suggest installing the exact nvidia-driver or nvidia-driver-* package
> (which you installed in system with X11 server) inside the jail from where
> you want to run X11 apps. Aftern this you should try starting some OpenGL
> using app from inside the jail with DISPLAY=server:0 and see what happens.

Installed exactly this older nvidia driver also inside jail - but no luck. No working OpenGL (AIGLX) to server:0.
Still this errors:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
...

> If the AIGLX option did not work, you have another solution that requires
> more work but is way more optimal: VirtualGL. I actually have used this
> succesfully on several occassions. To get it working you just need to read
> the documentation at http://www.virtualgl.org/Documentation/Documentation
> and improvise. Requires shell scripting, but very doable. You can install
> VirtualGL via packages or ports.

I tried hard this virtualgl thing, started vglclient, used vglrun on other side, and ended with this error message:

$ DISPLAY=server:0 vglrun glxgears
[VGL] ERROR: in fconfig_instance--
[VGL]    97: Function not implemented

It's too much for me, absolutely no info on google about this error. To much layers for me (and maybe some of the layer not implemented some function, or this is just bogus error).

So I gave up OpenGL in a jail and installed everything (whole desktops + kodi + all deps) on the base host (server:0).

A also tried to run whole Xorg in a jail, configured many devfs rules (nvidia devs, mixer devs etc etc), but also no luck - there was some error like: "Can't get extended write mode on /dev/io" (or something like this).

But thanks Scot + Arto for your answers, I learned a lot of small details.

> -- 
> Arto Pekkanen



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