Can't get to work VDPAU on Optimus Notebook. But everything else works fine

These errors indicate that the GPU doesn’t have a video decoder in it. I filed internal bug 1808799 to try to get VDPAU to provide a better error message when this happens.

WHAT? the 940MX without video decoder?

WTF? 2016 and you are selling chips for laptops without video decoding?! LOL!

@neti: Why would you need a decoder on a secondary dedicated GPU? Just firing up the GPU will raise the resource usage far more than you could ever save by doing hardware instead of software decoding. Well, maybe not for 4K decoding and/or HEVC video, but still. That’s why there’s no Nvidia decoder, it’s a waste of silicon. Just use the Intel decoder with VAAPI.

@aplattner, @neti, @Gusar,
According to this page 940MX has “E” VDPAU feature set.
According to docs this future set does have hw video decoding. Am I wrong?

Just for positive input: vdpau is working here and always has. Gentoo, 740M Optimus. So maybe something wrong with driver packaging in some distros?
vdpauinfo:

display: :1   screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library  375.26  Thu Dec  8 18:03:32 PST 2016

Video surface:

name   width height types
-------------------------------------------
420     4096  4096  NV12 YV12 
422     4096  4096  UYVY YUYV 

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                           0 65536  4032  4048
MPEG2_SIMPLE                    3 65536  4032  4048
MPEG2_MAIN                      3 65536  4032  4048
H264_BASELINE                  41 65536  4032  4080
H264_MAIN                      41 65536  4032  4080
H264_HIGH                      41 65536  4032  4080
VC1_SIMPLE                      1  8190  2048  2048
VC1_MAIN                        2  8190  2048  2048
VC1_ADVANCED                    4  8190  2048  2048
MPEG4_PART2_SP                  3  8192  2048  2048
MPEG4_PART2_ASP                 5  8192  2048  2048
DIVX4_QMOBILE                   0  8192  2048  2048
DIVX4_MOBILE                    0  8192  2048  2048
DIVX4_HOME_THEATER              0  8192  2048  2048
DIVX4_HD_1080P                  0  8192  2048  2048
DIVX5_QMOBILE                   0  8192  2048  2048
DIVX5_MOBILE                    0  8192  2048  2048
DIVX5_HOME_THEATER              0  8192  2048  2048
DIVX5_HD_1080P                  0  8192  2048  2048
H264_CONSTRAINED_BASELINE      41 65536  4032  4080
H264_EXTENDED                  41 65536  4032  4080
H264_PROGRESSIVE_HIGH          41 65536  4032  4080
H264_CONSTRAINED_HIGH          41 65536  4032  4080
H264_HIGH_444_PREDICTIVE       41 65536  4032  4080
HEVC_MAIN                      --- not supported ---
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8 
R10G10B10A2      16384 16384    y  Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     y
INVERSE_TELECINE                 y
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y
HIGH QUALITY SCALING - L1        y
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y         1     4096
VIDEO_SURFACE_HEIGHT             y         1     4096
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y
  1. there are enough cases when you have CPU fully loaded and you need to hw decode video at the same time
  2. feature sets of Intel’s decoder are not equal to NVIDIA one.
  3. using Intel’s VAAPI while you have switched to NVIDIA GPU is somewhat tricky
  4. it is not waste of silicon and video decoder/encoder is certainly there, NVIDIA GPUs have standardized feature sets. Spreading feature sets by disabling features only makes hw support harder. If NVIDIA really did cripple mobile GPUs by limiting the firmware/drivers capabilities, then they need to document this properly.

Driver version 378.13. Xorg 1.19.1. Distro Archlinux x86_64. GeForce 840M, pci id 1341.
This problem is still there.

display: :0.0   screen: 0
VDPAU capture: Enabled
vdp_imp_device_create_x11(0xe74c20, 0, -, -)
VDPAU nvidia: Version: NVIDIA VDPAU Driver Shared Library  378.13  Tue Feb  7 18:29:20 PST 2017
VDPAU nvidia: Error detected 9 368  5
VDPAU nvidia: Backtrace:
--: /usr/lib/vdpau/libvdpau_nvidia.so.1 [0x7f9c70c7d000] DSO load base
00: /usr/lib/vdpau/libvdpau_nvidia.so.1 [0x7f9c70cab570] 
01: /usr/lib/vdpau/libvdpau_nvidia.so.1 [0x7f9c70c9dfe3] 
02: /usr/lib/vdpau/libvdpau_nvidia.so.1 [0x7f9c70c85e5c] vdp_imp_device_create_x11
    -> 1
Error creating VDPAU device: 1

Have the same with Ubuntu 17.04 and 375.39. GeForce940MX.

Same problem here : 17.10 and 384 on 840M:

libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'nvidia'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_39
GPU at BusId 0x3 doesn't have a supported video decoder
VDPAU nvidia: Version: NVIDIA VDPAU Driver Shared Library  387.34  Tue Nov 21 02:08:49 PST 2017
VDPAU nvidia: Error detected 9 319  3
VDPAU nvidia: Backtrace:
--: /usr/lib/vdpau/libvdpau_nvidia.so.1 [0x7f2d2bf5c000] DSO load base
00: /usr/lib/vdpau/libvdpau_nvidia.so.1 [0x7f2d2bf929f9] 
01: /usr/lib/vdpau/libvdpau_nvidia.so.1 [0x7f2d2bf82673] 
02: /usr/lib/vdpau/libvdpau_nvidia.so.1 [0x7f2d2bf66951] vdp_imp_device_create_x11
libva error: /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

This seems like on old menace … anyone found a solution/workaround?

940MX still fails with kernel 5.2 and nvidia drivers 435.17.

Very similar message as above, so I don’t want to repeat here.

A matrix telling you it’s supported but actually NOT WORKING causing damage to Nvidia’s reputation.

My laptop has a nvidia 840m geforce card. I’m trying to get hardware acceleration working for youtube on the browser.

As the cpu heats up.

After spending much time going through forums and guides. I found out that vdpau is not even enabled.

THe result of vdpauinfo. and vaainfo is bellow.

vdpauinfo
display: :1 screen: 0
GPU at BusId 0x1 doesn’t have a supported video decoder
Error creating VDPAU device: 1

vainfo
libva info: VA-API version 1.8.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_7
GPU at BusId 0x1 doesn’t have a supported video decoder
libva error: /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Ubuntu 20.10

Same here.

THe result of vdpauinfo. and vaainfo is bellow.

vdpauinfo
display: :1 screen: 0
GPU at BusId 0x1 doesn’t have a supported video decoder
Error creating VDPAU device: 1

vainfo
libva info: VA-API version 1.8.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_7
GPU at BusId 0x1 doesn’t have a supported video decoder
libva error: /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Ubuntu 20.10