Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Intel MSS generic installation problem

Livikin_Alexey
Beginner
1,697 Views

Hi,

I try install MSS 2015 R6 on old RHEL 6.4 based distro with partial success. Encode work only with -vaapi option:

./sample_encode_drm h264 -i ./1280x720x420p.yuv -o ./out.h264 -w 1280 -h 720 -async 1 -vaapi
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Encoding Sample Version 6.0.16043175.175

Input file format    YUV420
Output video        AVC
Source picture:
    Resolution    1280x720
    Crop X,Y,W,H    0,0,1280,720
Destination picture:
    Resolution    1280x720
    Crop X,Y,W,H    0,0,1280,720
Frame rate    30.00
Bit rate(Kbps)    3231
Target usage    balanced
Memory type    d3d
Media SDK impl        hw
Media SDK version    1.16

Processing started
Frame number: 1439
Processing finished

But without -vaapi encode process never end and with -async 1 next error:

Return on error: error code -17,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK3/git/mdp_msdk-samples/samples/sample_encode/src/pipeline_encode.cpp    1212
Return on error: error code -17,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK3/git/mdp_msdk-samples/samples/sample_encode/src/pipeline_encode.cpp    1367
ERROR: Hardware device was lost or returned an unexpected error. Recovering...

And another problem -mss option dont worked with -vaapi:

./sample_encode_drm h264 -i ./1280x720x420p.yuv -o ./out.h264 -w 1280 -h 720 -async 1 -vaapi -mss 1200
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0

Return on error: error code -1,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK3/git/mdp_msdk-samples/samples/sample_encode/src/pipeline_encode.cpp    1165

I try install on this platform Centos 7.2 and all work perfectly. But for some reasons i need use this rhel 6.4 based os. Where can be problem?

Best Regards,

Warp.

0 Kudos
11 Replies
Surbhi_M_Intel
Employee
1,697 Views

Hi Alexey, 

There might be possibility that your system has multiple libva and libdrm which can cause random failures. Make sure you have Intel libva and libdrm.
If you don't, the clear libva before recompiling libva with “find /usr -name "libva*" | xargs sudo rm –rf” and with “./configure --prefix=/usr” before run “make”. Check the article on install on secondary OS -https://software.intel.com/en-us/articles/how-to-setup-media-server-studio-on-secondary-os-of-linux to make sure you have followed all the steps. Are you on Kernel 3.14.5? What is your system configuration?

Hope it helps. 

Thanks,
Surbhi

 

 

0 Kudos
Livikin_Alexey
Beginner
1,697 Views

Hi Surbhi,

Yes i remove all other libdrm and libva, kernel is 3.14.5 patched from generic directory patches. Cpu is Intel(R) Core(TM) i7-4770R CPU @ 3.20GHz .  Same kernel version i setup in Centos 7.2 for verify all work fine.

ldd --version
ldd (GNU libc) 2.12

Error comming from MFXVideoCORE_SyncOperation function in kernel traces i see

[drm:drm_ioctl], pid=11079, dev=0xe200, auth=1, I915_GEM_USERPTR
[drm:drm_ioctl], ret = -19

Maybe some specific options in kernel need not only drm and i915? I use minimal kernel configuration without unused modules.

Best Regards,

Alexey.

0 Kudos
Surbhi_M_Intel
Employee
1,697 Views

Hi Alexey, 

Thanks for providing information. Your system is supported by MediaServer Studio so is the glibc. Can you send the o/p of few test and more info asked below - 

1. add strace to the cmd - strace ./sample_encode_drm h264 -i ./1280x720x420p.yuv -o ./out.h264 -w 1280 -h 720 -async 1 -vaapi 

2. By default async value is 4, can you try not to set async value and check if the issue exits. 

Send o/p of following cmds 

$ vainfo

$ ls -l /dev/dri

$ lspci -nn | grep VGA

Just to set the expectations clear we support CentOS 7.1 as a gold OS configuration and provide generic package with kernel 3.14.5  patches as a option to work on other Linux distributions as preferred by customer and any issues raise on other than gold OS(CentOS7.1) needs to be replicated on CentOS7.1 for us to look at. We can try to help you this issue because of the interest but can't escalate it to experts unless replicate on CentOS7.1. 

FYI - Media Server Studio 2016 release is out, in case you would like to update. This might not solve the issue you are experiencing but it will be best to see if the issue is reproducible on the latest release. 

Thanks,
Surbhi

 

 

0 Kudos
Livikin_Alexey
Beginner
1,697 Views

Hi Surbhi,

I update to 2016 and you right nothing change.

1. I attach strace.txt

2.

./sample_encode h264 -i ./f.yuv -o ./ff.h264 -w 1280 -h 720
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Encoding Sample Version 6.0.16043361.361

Input file format    YUV420
Output video        AVC
Source picture:
    Resolution  

 1280x720
    Crop X,Y,W,H    0,0,1280,720
Destination picture:
    Resolution    1280x720
    Crop X,Y,W,H    0,0,1280,720
Frame rate    30.00
Bit rate(Kbps)    3231
Gop size    0
Ref dist    0
Ref number    1
Idr Interval    0
Target usage    balanced
Memory type    system
Media SDK impl        hw
Media SDK version    1.17

Processing started
ERROR: No free surfaces in pool (during long period)

Return on error: error code -4,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK1/git/mdp_msdk-samples/samples/sample_encode/src/pipeline_encode.cpp    1291


Return on error: error code 1,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK1/git/mdp_msdk-samples/samples/sample_encode/src/sample_encode.cpp    766

Frame number: 0

With vaapi:

/sample_encode h264 -i ./f.yuv -o ./ff.h264 -w 1280 -h 720 -vaapi
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Encoding Sample Version 6.0.16043361.361

Input file format    YUV420
Output video        AVC
Source picture:
    Resolution    1280x720
    Crop X,Y,W,H    0,0,1280,720
Destination picture:
    Resolution    1280x720
    Crop X,Y,W,H    0,0,1280,720
Frame rate    30.00
Bit rate(Kbps)    3231
Gop size    0
Ref dist    0
Ref number    1
Idr Interval    0
Target usage    balanced
Memory type    d3d
Media SDK impl        hw
Media SDK version    1.17

Processing started
Frame number: 1439

Processing finished

With vaapi and mss:

./sample_encode h264 -i ./f.yuv -o ./ff.h264 -w 1280 -h 720 -vaapi -mss 1200
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0

Return on error: error code -1,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK1/git/mdp_msdk-samples/samples/sample_encode/src/pipeline_encode.cpp    1202


Return on error: error code -1,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK1/git/mdp_msdk-samples/samples/sample_encode/src/pipeline_encode.cpp    1117


Return on error: error code 1,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK1/git/mdp_msdk-samples/samples/sample_encode/src/sample_encode.cpp    744

Frame number: 0

vainfo:

vainfo
error: can't connect to X server!
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.99 (libva 1.67.0.pre1)
vainfo: Driver version: 16.4.4.47109-ubit
vainfo: Supported profile and entrypoints
      VAProfileH264Baseline           :    VAEntrypointEncSlice
      VAProfileH264Baseline           :    <unknown entrypoint>
      VAProfileH264Baseline           :    <unknown entrypoint>
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:    <unknown entrypoint>
      VAProfileH264ConstrainedBaseline:    <unknown entrypoint>
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSlice
      VAProfileH264Main               :    <unknown entrypoint>
      VAProfileH264Main               :    <unknown entrypoint>
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSlice
      VAProfileH264High               :    <unknown entrypoint>
      VAProfileH264High               :    <unknown entrypoint>
      VAProfileMPEG2Simple            :    VAEntrypointEncSlice
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointEncSlice
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointEncPicture
      VAProfileVP8Version0_3          :    VAEntrypointEncSlice
      VAProfileVP8Version0_3          :    VAEntrypointVLD
      VAProfileVP8Version0_3          :    <unknown entrypoint>
      VAProfileHEVCMain               :    VAEntrypointEncSlice
      VAProfileVP9Profile0            :    VAEntrypointEncSlice
      VAProfileVP9Profile0            :    VAEntrypointVLD
      VAProfileVP9Profile0            :    <unknown entrypoint>
      <unknown profile>               :    VAEntrypointVideoProc
      VAProfileNone                   :    VAEntrypointVideoProc
      VAProfileNone                   :    <unknown entrypoint>

ls -l /dev/dri
total 0
crw-rw---- 1 root video 226,   0 Feb 23 12:09 card0
crw-rw---- 1 root video 226,  64 Feb 23 12:09 controlD64
crw-rw---- 1 root video 226, 128 Feb 23 12:09 renderD128

lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:0d22] (rev 08)

uname -a
Linux alt 3.14.5 #13 SMP PREEMPT Sat Feb 20 17:06:52 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux

Best Regards,

Alexey.

0 Kudos
Surbhi_M_Intel
Employee
1,697 Views

Hi Alexey, 

Thanks for sending in the information. All the above info sent in your last post looks right, so I discussed your case with an expert and these msgs doesn't look right -
[drm:drm_ioctl], pid=11079, dev=0xe200, auth=1, I915_GEM_USERPTR
[drm:drm_ioctl], ret = -19
So, 
would like to confirm if you have rebuild the libdrm last when we discussed to remove multiple libva and libdrm. If not, please remove the libdrm, recompile and install them. Also, what version of gcc version do you have? Please update to 4.7 or higher as this is a pre-requisite. You can refer to this article to find the cmds for rebuilding kernel and updating gcc. 

Thanks,
Surbhi

0 Kudos
Livikin_Alexey
Beginner
1,697 Views

Hi Surbhi,

gcc already updated to 5.3.0 version:

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr --disable-multilib
Thread model: posix
gcc version 5.3.0 (GCC)

libdrm and libva recompilled from generic directory, nothing change. Previously i use precompilled from installation with identicall results.

Best Regards,

Alexey.

0 Kudos
Jiandong_Z_Intel
Employee
1,697 Views

Hi Alexey,

Have you merge the MSS patches to kernel when you build the kernel 3.14.5 ?

How did you build your kernel ?

which gcc version used when you build the kernel ?

I suggest you build kernel with RHEL build-in gcc and following "How to setup MSS on CentOS 6.5" in  How to setup Media Server Studio on Secondary OS of Linux

 

Thanks,

Zachary

0 Kudos
Livikin_Alexey
Beginner
1,697 Views

Hi Zachary,

Yes i applyed patches with command

for i in ../intel-kernel-patches/*.patch; do patch -p1 < $i; done

I attached my config for 3.14.5

Build with next commands make -j 8 next make modules_install and make install. Gcc version for build kernel same 5.3.0

Best Regards,

Alexey.

0 Kudos
Jiandong_Z_Intel
Employee
1,697 Views

Hi Alexey,

Have you tried to use "make olddefconfig" for configure your kernel before run "make -j 8" ?

And, I suggest you use RHEL 6.4 build-in gcc to compile your kernel. following command line can help to restore your gcc

[user@host]# yum remove gcc gcc-c++
[user@host]# yum install gcc gcc-c++

Because some upgrade gcc version may cause run issue.  after build and install kernel you can use 5.3.0.

And can you share how did you upgrade gcc to 5.3.0 ?

 

Thanks,

Zachary

 

 

 

 

0 Kudos
Livikin_Alexey
Beginner
1,697 Views

Hi Zachary,

After some studing installation manuals i found decission. Its "

Important Note: With using own kernel configuration please make sure CONFIG_MMU_NOTIFIERS=y is enabled. It can be disable implicitly with disabling virtualization support.

"

Virtualisation disabled in my config and notifiers not setted. After i set him and recompile kernel all work great. Documentation not quite right parameter must be named CONFIG_MMU_NOTIFIER not CONFIG_MMU_NOTIFIERS.

Anyway thanx for help.

Best Regards,

Alexey.

0 Kudos
Jiandong_Z_Intel
Employee
1,697 Views

Hi Alexey,

Good to know it worked for you. and Thank you for share your knowledge. It will help to others.

Thanks,

Zachary

 

0 Kudos
Reply