'Cannot get NVIDIA Capture SDK 7.1 code sample to run on Ubuntu 18.04 correctly

I am trying to get a code sample from this SDK to work properly: https://developer.nvidia.com/capture-sdk

I am using the Linux SDK.

This is the code sample:

Capture_Linux_v7.1.6/NvFBC/samples/NvFBCHwEnc$ ./NvFBCHwEnc
Application version: 4
NvFBC API version: 1.6

Version mismatch between NvFBC and the X driver interface

Here's some additional information if I run ldconfig -v: https://gist.github.com/Suhail/afa4ffbc8cfcbeaf2676ff9e4ef54d86

I installed the latest XCB: XCB 1.13.1

I am able to get glxgears to work.

$ nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.30       Driver Version: 430.30       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla M60           Off  | 00000000:00:1E.0 Off |                    0 |
| N/A   29C    P8    14W / 150W |    141MiB /  7618MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      3255      G   /usr/lib/xorg/Xorg                            57MiB |
|    0      3286      G   /usr/bin/gnome-shell                          81MiB |
+-----------------------------------------------------------------------------+

uname -a Linux ip-172-31-23-156 4.15.0-1044-aws #46-Ubuntu SMP Thu Jul 4 13:38:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Driver was installed via:

$ aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .
download: s3://ec2-linux-nvidia-drivers/latest/NVIDIA-Linux-x86_64-430.30-grid.run to ./NVIDIA-Linux-x86_64-430.30-grid.run

Following these instructions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html

Update

When I run glxinfo, I notice that direct rendering is "No"

~$ glxinfo
name of display: :1
display: :1  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4

It looks like the NVIDIA driver is not installed correctly.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source