title: Intel vaapi error: can't connect to X server
body: <p>I am using an EC2 with Ubuntu 18.04, CPU Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz, and a Nvidia Tesla T4. It seems <code>vainfo</code> reports a problematic setup:</p>
  <pre><code>error: can't connect to X server!
  libva info: VA-API version 1.1.0
  libva info: va_getDriverName() returns -1
  libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
  vaInitialize failed with error code -1 (unknown libva error),exit
  </code></pre>
  <p>My goal is to use vaapi accelerated HW decoding with gstreamer in Python.</p>
  <p><code>lspci | grep VGA</code> returns:</p>
  <pre><code>00:01.3 Non-VGA unclassified device: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
  00:03.0 VGA compatible controller: Amazon.com, Inc. Device 1111
  </code></pre>
  <p>Note:</p>
  <ul>
  <li>I installed on the EC2 the Nvidia drivers (not sure if they could interfere with Intel's graphic card)</li>
  <li>I also installed OpenVINO</li>
  <li>I was following this guide <a href="http://lifestyletransfer.com/how-to-install-gstreamer-vaapi-plugins-on-ubuntu/" rel="nofollow noreferrer">http://lifestyletransfer.com/how-to-install-gstreamer-vaapi-plugins-on-ubuntu/</a> for the setup and I got stuck at the point when I run <code>vaapi</code></li>
  </ul>
  <p>How can I fix this?</p>