[lxc-users] nvidia graphics support in lxc (2.0, ubuntu 16.04)

Fajar A. Nugraha list at fajar.net
Sat Apr 23 08:32:15 UTC 2016


On Sat, Apr 23, 2016 at 1:33 AM, Oz Dror <odror7 at gmail.com> wrote:
> Hi
>
> Prior to the Ubuntu upgrade from 15.10 to 16.04 I was able to have an lxc
> container running ubuntu 14.04 sharing the NVIDIA graphics uring cuda.
>
> After the 16.04 I am not able to start the graphics on the 14.04

not sure about nvidia and lxc, but my guess is cuda uses opengl. And
from my experience with 16.04 and xrdp (with ubuntu's X + xorgxrdp
driver), glxgears from mesa-utils (or any other programs that use
opengl, for that matter) would segfault. The best workaround I can
find was to downgrade all mesa-related stuff to 15.10 version

# cat /etc/apt/sources.list.d/wily.list
deb http://archive.ubuntu.com/ubuntu wily main universe
deb http://archive.ubuntu.com/ubuntu wily-updates main universe

# cat /etc/apt/preferences.d/pin-mesa-wily
Package: mesa-utils
Pin: release a=wily
Pin-Priority: 1000

Package: libgl1-mesa-glx
Pin: release a=wily
Pin-Priority: 1000

Package: libglapi-mesa
Pin: release a=wily
Pin-Priority: 1000

Package: libegl1-mesa
Pin: release a=wily
Pin-Priority: 1000

Package: libgl1-mesa-dri
Pin: release a=wily
Pin-Priority: 1000

Package: libwayland-egl1-mesa
Pin: release a=wily
Pin-Priority: 1000

Package: mesa-vdpau-drivers
Pin: release a=wily
Pin-Priority: 1000


apt-get, apt-get dist-upgrade. The mesa-related packages will be
downgraded, and opengl works again in my case.

You might want to test the above workaround first, and if it works,
file a bug with ubuntu's mesa package on 16.04 (since it's not
lxc-specific)

-- 
Fajar


More information about the lxc-users mailing list