I'm trying to get opengl working for headless offscreen rendering on a Amazon p2 instance with Ubuntu Ubuntu Server 16.04.
After instance creation I've installed the appropriate nvidia drivers according to this amazon article, and they seem to be working as expected:
$ lsmod | grep nvidia
nvidia_drm 53248 0
nvidia_modeset 790528 1 nvidia_drm
nvidia 11911168 1 nvidia_modeset
drm_kms_helper 155648 3 cirrus,nouveau,nvidia_drm
drm 364544 7 ttm,drm_kms_helper,cirrus,nouveau,nvidia_drm
$ nvidia-smi -q | head
==============NVSMI LOG==============
Timestamp : Thu Jan 19 11:22:38 2017
Driver Version : 375.20
Attached GPUs : 1
GPU 0000:00:1E.0
Product Name : Tesla K80
Product Brand : Tesla
I'm then trying the steps from this related question:
sudo apt-get install xserver-xorg libglu1-mesa-dev freeglut3-dev mesa-common-dev libxmu-dev libxi-dev
sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024
sudo /usr/bin/X :0 &
Which does start X but running glxinfo
does not work:
$ DISPLAY=:0 glxinfo
name of display: :0
Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0".
(... line repeats couple of times ...)
Error: couldn't find RGB GLX visual or fbconfig
Changing the BusID in Xorg.conf as mentioned in the related stackoverflow question did not help.
$ lspci|grep VGA
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
/etc/X11/xorg.conf
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Tesla K80"
BusID "PCI:0:2:0"
EndSection
I've googled quite intensively and it's unclear to me how to proceed next... Any help would be appreciated