Problem:
If there is a xserver running on a Linux machine then vainfo command will fail with the following error when typed from non-root unix login:
$ vainfo
error: can't connect to X server!
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 1
vaInitialize failed with error code 1 (operation failed),exit
Fix for this problem:
vainfo command is used for testing if Intel(R) HD Graphics Driver is installed correctly or not. xserver is always run as root on a Linux machine. But by default access to xserver is restricted. In order to disable the access control, try the following command as root from the xterm window:
$ export DISPLAY=:0
$ xhost +
access control disabled, clients can connect from any host
Now the vainfo command will result in correct response as shown below:
$ vainfo
error: can't connect to X server!
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.34 (libva 1.2.0.pre1)
vainfo: Driver version: 16.3.1.18283-ubit
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
This article applies to:
Products: Intel® System Studio, Intel® INDE
Host OS/Platform: Windows (IA-32 or Intel® 64); Linux (Intel® 64)
Target OS/platform: Windows (IA-32 or Intel® 64); Ubuntu 12.04 (Intel® 64)