[lxc-users] nvidia graphics support in lxc (2.0, ubuntu 16.04)
Oz Dror
odror7 at gmail.com
Sat Apr 23 15:00:26 UTC 2016
I upgraded the container to 16.04 and reinstalled upgraded nvidia-364 in
both. I have also used the cuda package from the Ubuntu repo.
i.e apt-get install nvidia-cuda-toolkit (version 7.5)
Now I have graphics, but I do not have keyboard and mouse.
adding the following does not help. Because 16.04 is missing the xorg kbd
and mouse packages.
Section "ServerFlags"
Option "AutoAddDevices" "False"
EndSection
Section "Device"
Identifier "DiscreteNvidia"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "DiscreteNvidia"
EndSection
Section "ServerLayout"
Identifier "Desktop"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
On Sat, Apr 23, 2016 at 1:32 AM, Fajar A. Nugraha <list at fajar.net> wrote:
> 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
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160423/5b5fb7bb/attachment.html>
More information about the lxc-users
mailing list