Bug 32149 - libva-vdpau-driver need libva-vdpau-driver-chromium patchs
Summary: libva-vdpau-driver need libva-vdpau-driver-chromium patchs
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-31 10:30 CEST by Eric Petit
Modified: 2023-08-10 18:24 CEST (History)
4 users (show)

See Also:
Source RPM: vaapi-driver-vdpau
CVE:
Status comment:


Attachments

Comment 1 Dave Hodgins 2023-07-31 18:10:08 CEST
The geany.org links have already expired.

The libvdpau-driver packages are part of the mesa srpm.

Assigning to the registered maintainer.

CC: (none) => davidwhodgins
Assignee: bugsquad => thierry.vignaud

Comment 2 David GEIGER 2023-07-31 18:14:26 CEST
Nop it is part of  vaapi-driver-vdpau srpm.

CC: (none) => geiger.david68210

David GEIGER 2023-07-31 18:14:41 CEST

Source RPM: libva-vdpau-driver => vaapi-driver-vdpau

Comment 3 Dave Hodgins 2023-07-31 21:42:49 CEST
In m8, $ urpmq -i libvdpau-driver-r600|grep ^Source|tail -n 1
Source RPM  : mesa-21.3.9-1.mga8.src.rpm
Comment 4 David GEIGER 2023-08-01 06:57:29 CEST
For mga8 or cauldron the package which should be fixed is vaapi-driver-vdpau:

$ urpmq -i vaapi-driver-vdpau|grep ^Source|tail -n 1
Source RPM  : vaapi-driver-vdpau-0.7.4-11.mga9.src.rpm
Comment 5 David GEIGER 2023-08-01 07:00:40 CEST
Assigning to QA,


Packages in 8/Core/updates_testing:
======================
vaapi-driver-vdpau-0.7.4-9.1.mga8.x86_64.rpm


Packages in 9/Core/updates_testing:
======================
vaapi-driver-vdpau-0.7.4-12.mga9.x86_64.rpm


From SRPMS:
vaapi-driver-vdpau-0.7.4-9.1.mga8.src.rpm
vaapi-driver-vdpau-0.7.4-12.mga9.src.rpm

Assignee: thierry.vignaud => qa-bugs

Comment 6 Eric Petit 2023-08-01 07:41:07 CEST
Hi
it's day and night.
A last error :
/usr/lib64/chromium-browser/chromium-wrapper mycanal.fr
[21895:21895:0801/073557.954644:ERROR:gpu_memory_buffer_support_x11.cc(49)] dri3 extension not supported.

and

google-chrome-stable 
[22485:22485:0801/073713.252818:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.portal.Error.NotFound: Requested setting not found
[22485:22485:0801/073715.646238:ERROR:feature_processor_state.cc(39)] Processing error occured: model WebAppInstallationPromo failed with UkmEngineDisabled, message: 
[22485:22485:0801/073715.668917:ERROR:feature_processor_state.cc(39)] Processing error occured: model WebAppInstallationPromo failed with UkmEngineDisabled, message: 
[22535:22541:0801/073718.107321:ERROR:socket_posix.cc(93)] CreatePlatformSocket() failed: Famille d'adresses non supportée par le protocole (97)
[22535:22541:0801/073718.113658:ERROR:socket_posix.cc(93)] CreatePlatformSocket() failed: Famille d'adresses non supportée par le protocole (97)
Comment 7 Herman Viaene 2023-08-01 17:31:14 CEST
MGA8-64 MATE on Acer Aspire 5253
No installation issues.
This laptop has AMD-Radeon video HW, so no real test. But video plays OK, so no ill effects on this system.

CC: (none) => herman.viaene

Comment 8 Len Lawrence 2023-08-08 18:58:38 CEST
Mageia 9, x86_64
Installed OK.
CPU:
  Info: 10-core Intel Core i9-7900X [MT MCP] speed (MHz): avg: 2985
    min/max: 1200/4300:4500
Graphics:
  Device-1: NVIDIA GP102 [GeForce GTX 1080 Ti] driver: nvidia
    v: 535.54.03

Rebooted and rebuilt nvidia driver.  Desktop works.  vlc for videos and TV OK.

So, how to test the vdpau side?  There is a vlc plugin installed (vlc-plugin-vdpau-3.0.18-5.mga9).

CC: (none) => tarazed25

Comment 9 Eric Petit 2023-08-08 19:07:41 CEST
(In reply to Len Lawrence from comment #8)
> Mageia 9, x86_64
> Installed OK.
> CPU:
>   Info: 10-core Intel Core i9-7900X [MT MCP] speed (MHz): avg: 2985
>     min/max: 1200/4300:4500
> Graphics:
>   Device-1: NVIDIA GP102 [GeForce GTX 1080 Ti] driver: nvidia
>     v: 535.54.03
> 
> Rebooted and rebuilt nvidia driver.  Desktop works.  vlc for videos and TV
> OK.
> 
> So, how to test the vdpau side?  There is a vlc plugin installed
> (vlc-plugin-vdpau-3.0.18-5.mga9).

Bug is reported about Mageia 8, not 9, also with chrome/chromium web browser and play video on web page/app
Comment 10 David GEIGER 2023-08-08 19:27:31 CEST
Both should be tested as for mga9 it adds now support for vacreatesurfaces2.
Comment 11 Len Lawrence 2023-08-08 19:35:54 CEST
Thanks Eric for the clarification.  <mid-air collision twice>
Just happened to be sitting at an Mageia 9 session and as there are updates for 8 and 9 decided to try it.  QA is expected to do general tests as well as try to address the bug.  And I don't know how to get hold of chromium browser.

Referring to comment 8.  A trace on vlc while playing an MP4 file shows several references to /usr/lib64/vlc/plugins/vdpau/libvdpau* like
 openat(AT_FDCWD, "/usr/lib64/vlc/plugins/vdpau", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
newfstatat(AT_FDCWD, "/usr/lib64/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so", {st_mode=S_IFREG|0755, st_size=15456, ...}, 0) = 0

VAAPI applies to Intel graphics AFAIK so this probably does not help.  Shall try it on an Alder Lake system.
Comment 12 Len Lawrence 2023-08-08 22:06:14 CEST
Tried the update on a system using the i965 driver.  The MP4 file played smoothly enough in vlc but the terminal reported: 
[00007f2544001290] mp4 demux: Fragment sequence discontinuity detected 1 != 0
libva info: VA-API version 1.16.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_16
libva error: /usr/lib64/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
[00007f2534001ea0] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error

strace  showed messages like these:
newfstatat(AT_FDCWD, "/usr/lib64/vlc/plugins/video_output/libglconv_vdpau_plugin.so", {st_mode=S_IFREG|0755, st_size=15416, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/lib64/vlc/plugins/vdpau", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib64/vlc/plugins/vdpau", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
newfstatat(AT_FDCWD, "/usr/lib64/vlc/plugins/vdpau/libvdpau_chroma_plugin.so", {st_mode=S_IFREG|0755, st_size=23888, ...}, 0) = 0

Installed chromium-browser from tainted and tried it out on DUST videos.
That worked OK.
Terminal output:
$ [2567850:2567850:0808/205027.693345:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
libva error: /usr/lib64/dri/i965_drv_video.so init failed
[2567850:2567873:0808/205028.701519:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.DBus.StartServiceByName: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Comment 13 Len Lawrence 2023-08-09 01:35:40 CEST
Mageia8, x86_64
 
Intel Alder Lake-P Integrated Graphics driver: i915

Installed vaapi-driver-vdpau and chromium-browser.  Played DUST video in chromium-browser.
Updated vaapi-driver-vdpau.
Launched chromium-browser and as before the update there was a stack trace, 
$ libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[54499:54499:0808/230835.896509:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
Received signal 11 SEGV_MAPERR 000000000000
#0 0x5564710b9172 base::debug::CollectStackTrace()
#1 0x556471004d16 base::debug::StackTrace::StackTrace()
#2 0x5564710b8c61 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f3ca441b180 (/usr/lib64/libpthread-2.32.so+0x1317f)
....
ending in:

[end of stack trace]
[660795:660795:0809/012319.154748:ERROR:gpu_process_host.cc(952)] GPU process exited unexpectedly: exit_code=139
[660968:660968:0809/012319.158239:ERROR:gpu_init.cc(525)] Passthrough is not supported, GL is disabled, ANGLE is 

Youtube videos play.
Comment 14 Eric Petit 2023-08-09 07:54:39 CEST
You have vaapi-driver-intel-media and vaapi-driver-intel rpms installed?
what return
vainfo
vdpauinfo
cat ~/.config/chrome-flags.conf
echo $SDL_FRAMEBUFFER_ACCELERATION
echo $LIBGL_ALWAYS_INDIRECT
echo $LIBVA_DRIVER_NAME
is VDPAU_DRIVER=va_gl?

A find this wiki interesting :
https://wiki.archlinux.org/title/Hardware_video_acceleration
Comment 15 Len Lawrence 2023-08-09 10:23:58 CEST
In reply to Eric Petit comment 14:
$ rpm -qa | grep vaapi
gstreamer1.0-vaapi-1.18.5-1.mga8
vaapi-driver-intel-2.4.1-1.mga8
vaapi-driver-vdpau-0.7.4-9.1.mga8

$ vainfo
bash: vainfo: command not found
$ vdpauinfo
bash: vdpauinfo: command not found

Installed vaapi-driver-intel-media
There is still a large stack trace on launching chromium-browser but it works. 

$ cat ~/.config/chrome-flags.conf
cat: /home/lcl/.config/chrome-flags.conf: No such file or directory

$ echo $SDL_FRAMEBUFFER_ACCELERATION

$ echo $LIBGL_ALWAYS_INDIRECT

$ echo $LIBVA_DRIVER_NAME

$ echo $VDPAU_DRIVER

Blank in all cases.
Comment 16 Len Lawrence 2023-08-09 10:29:05 CEST
Should have read the article first.
Installed libva-utils.
Comment 17 Len Lawrence 2023-08-09 10:30:33 CEST
$ vainfo
libva info: VA-API version 1.10.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit
Comment 18 Len Lawrence 2023-08-09 10:35:06 CEST
$ vdpauinfo
display: :0   screen: 0
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1
Comment 19 Eric Petit 2023-08-09 20:29:35 CEST
as explain in the article, you should list /usr/lib/dri/ and choice the good /usr/lib/dri/${LIBVA_DRIVER_NAME}_drv_video.so
with export LIBVA_DRIVER_NAME  you can add it in .bashrc later.

why VDPAU backend is libvdpau_nvidia.so if you use intel, again, article explain how to setup
Comment 20 Len Lawrence 2023-08-10 17:05:35 CEST
I don't really understand most of that article - completely unfamiliar territory - but from the following list I would guess that i965_drv_video.so is the driver to use.
$ ls /usr/lib64/dri
crocus_dri.so*      nouveau_drv_video.so*  radeonsi_drv_video.so*
i830_dri.so*        nouveau_vieux_dri.so*  s3g_drv_video.so@
i915_dri.so*        nvidia_drv_video.so@   swrast_dri.so*
i965_dri.so*        r200_dri.so*           vdpau_drv_video.so*
i965_drv_video.so*  r300_dri.so*           virtio_gpu_dri.so*
iHD_drv_video.so*   r600_dri.so*           vmwgfx_dri.so*
iris_dri.so*        r600_drv_video.so*     zink_dri.so*
kms_swrast_dri.so*  radeon_dri.so*
nouveau_dri.so*     radeonsi_dri.so*

Added export LIBVA_DRIVER_NAME=i965 to user's .bashrc
and recycled login.  Launched chromium-browser OK but there was a huge stack trace again, starting with
"libva error: /usr/lib64/dri/i965_drv_video.so init failed"

$ grep -iE 'vdpau | dri driver' ~/.local/share/xorg/Xorg.0.log
[    42.845] (II) modeset(0): [DRI2]   DRI driver: iris
[    42.845] (II) modeset(0): [DRI2]   VDPAU driver: va_gl

$ vainfo
libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva error: /usr/lib64/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

I am about to give up on this - way above my pay grade.
Comment 21 Len Lawrence 2023-08-10 17:51:55 CEST
Back to nvidia machine and Mageia 8
GP102 - GeForce GTX 1080 Ti - VDPAU supported.
NVIDIA 470.161.03

$ ls /usr/lib64/dri
crocus_dri.so*      nouveau_drv_video.so*  radeonsi_dri.so*
i830_dri.so*        nouveau_vieux_dri.so*  radeonsi_drv_video.so*
i915_dri.so*        nvidia_drv_video.so@   s3g_drv_video.so@
i965_dri.so*        r200_dri.so*           swrast_dri.so*
i965_drv_video.so*  r300_dri.so*           vdpau_drv_video.so*
iris_dri.so*        r600_dri.so*           virtio_gpu_dri.so*
kms_swrast_dri.so*  r600_drv_video.so*     vmwgfx_dri.so*
nouveau_dri.so*     radeon_dri.so*         zink_dri.so*

$ rpm -qa | grep nvidia | grep utils
nvidia-current-utils-470.161.03-1.mga8.nonfree

$ chromium-browser &
$ [79159:79159:0810/163146.399638:ERROR:vaapi_wrapper.cc(1315)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[79159:79159:0810/163146.399745:ERROR:vaapi_wrapper.cc(1262)] FillProfileInfo_Locked failed for va_profile VAProfileH264Main and entrypoint VAEntrypointVLD
[79159:79159:0810/163146.399792:ERROR:vaapi_wrapper.cc(1315)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[79159:79159:0810/163146.399832:ERROR:vaapi_wrapper.cc(1262)] FillProfileInfo_Locked failed for va_profile VAProfileH264High and entrypoint VAEntrypointVLD
[79159:79159:0810/163146.437044:ERROR:gpu_memory_buffer_support_x11.cc(49)] dri3 extension not supported.

$ nvidia-smi
Thu Aug 10 16:33:53 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.161.03   Driver Version: 470.161.03   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:65:00.0  On |                  N/A |
|  0%   49C    P8    17W / 250W |    483MiB / 11175MiB |     17%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2278      G   /usr/libexec/Xorg                 176MiB |
|    0   N/A  N/A      5595      G   /usr/lib64/firefox/firefox        136MiB |
|    0   N/A  N/A      5615      G   ...4/thunderbird/thunderbird      108MiB |
|    0   N/A  N/A     79159      G   ...=AudioServiceOutOfProcess       57MiB |
+-----------------------------------------------------------------------------+

The last entry is for chromium-browser apparently.

Updated vaapi-driver-vdpau.
Logged out and in and started chromium-browser.

$ chromium-browser &
[1] 191892
lcl@canopus:~ $ [191932:191932:0810/164518.888854:ERROR:gpu_memory_buffer_support_x11.cc(49)] dri3 extension not supported.

That certainly looks tidier.
nvidia-smi registers the 191932 process.

Does this mean that the patch works for Mageia 8?
Comment 22 Eric Petit 2023-08-10 18:13:48 CEST
(In reply to Len Lawrence from comment #20)
> I don't really understand most of that article - completely unfamiliar
> territory - but from the following list I would guess that i965_drv_video.so
> is the driver to use.
> $ ls /usr/lib64/dri
> crocus_dri.so*      nouveau_drv_video.so*  radeonsi_drv_video.so*
> i830_dri.so*        nouveau_vieux_dri.so*  s3g_drv_video.so@
> i915_dri.so*        nvidia_drv_video.so@   swrast_dri.so*
> i965_dri.so*        r200_dri.so*           vdpau_drv_video.so*
> i965_drv_video.so*  r300_dri.so*           virtio_gpu_dri.so*
> iHD_drv_video.so*   r600_dri.so*           vmwgfx_dri.so*
> iris_dri.so*        r600_drv_video.so*     zink_dri.so*
> kms_swrast_dri.so*  radeon_dri.so*
> nouveau_dri.so*     radeonsi_dri.so*
> 
> Added export LIBVA_DRIVER_NAME=i965 to user's .bashrc
> and recycled login.  Launched chromium-browser OK but there was a huge stack
> trace again, starting with
> "libva error: /usr/lib64/dri/i965_drv_video.so init failed"
> 
> $ grep -iE 'vdpau | dri driver' ~/.local/share/xorg/Xorg.0.log
> [    42.845] (II) modeset(0): [DRI2]   DRI driver: iris
> [    42.845] (II) modeset(0): [DRI2]   VDPAU driver: va_gl
> 
> $ vainfo
> libva info: VA-API version 1.10.0
> libva info: User environment variable requested driver 'i965'
> libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
> libva info: Found init function __vaDriverInit_1_7
> libva error: /usr/lib64/dri/i965_drv_video.so init failed
> libva info: va_openDriver() returns -1
> vaInitialize failed with error code -1 (unknown libva error),exit
> 
> I am about to give up on this - way above my pay grade.

I really don't know intel, try perhaps iHD
Comment 23 Eric Petit 2023-08-10 18:17:00 CEST
(In reply to Len Lawrence from comment #21)
> Back to nvidia machine and Mageia 8
> GP102 - GeForce GTX 1080 Ti - VDPAU supported.
> NVIDIA 470.161.03
> 
> $ ls /usr/lib64/dri
> crocus_dri.so*      nouveau_drv_video.so*  radeonsi_dri.so*
> i830_dri.so*        nouveau_vieux_dri.so*  radeonsi_drv_video.so*
> i915_dri.so*        nvidia_drv_video.so@   s3g_drv_video.so@
> i965_dri.so*        r200_dri.so*           swrast_dri.so*
> i965_drv_video.so*  r300_dri.so*           vdpau_drv_video.so*
> iris_dri.so*        r600_dri.so*           virtio_gpu_dri.so*
> kms_swrast_dri.so*  r600_drv_video.so*     vmwgfx_dri.so*
> nouveau_dri.so*     radeon_dri.so*         zink_dri.so*
> 
> $ rpm -qa | grep nvidia | grep utils
> nvidia-current-utils-470.161.03-1.mga8.nonfree
> 
> $ chromium-browser &
> $ [79159:79159:0810/163146.399638:ERROR:vaapi_wrapper.cc(1315)]
> vaQuerySurfaceAttributes failed, VA error: invalid parameter
> [79159:79159:0810/163146.399745:ERROR:vaapi_wrapper.cc(1262)]
> FillProfileInfo_Locked failed for va_profile VAProfileH264Main and
> entrypoint VAEntrypointVLD
> [79159:79159:0810/163146.399792:ERROR:vaapi_wrapper.cc(1315)]
> vaQuerySurfaceAttributes failed, VA error: invalid parameter
> [79159:79159:0810/163146.399832:ERROR:vaapi_wrapper.cc(1262)]
> FillProfileInfo_Locked failed for va_profile VAProfileH264High and
> entrypoint VAEntrypointVLD
> [79159:79159:0810/163146.437044:ERROR:gpu_memory_buffer_support_x11.cc(49)]
> dri3 extension not supported.
> 
> $ nvidia-smi
> Thu Aug 10 16:33:53 2023       
> +----------------------------------------------------------------------------
> -+
> | NVIDIA-SMI 470.161.03   Driver Version: 470.161.03   CUDA Version: 11.4   
> |
> |-------------------------------+----------------------+---------------------
> -+
> | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr.
> ECC |
> | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute
> M. |
> |                               |                      |               MIG
> M. |
> |===============================+======================+=====================
> =|
> |   0  NVIDIA GeForce ...  Off  | 00000000:65:00.0  On |                 
> N/A |
> |  0%   49C    P8    17W / 250W |    483MiB / 11175MiB |     17%     
> Default |
> |                               |                      |                 
> N/A |
> +-------------------------------+----------------------+---------------------
> -+
>                                                                             
> 
> +----------------------------------------------------------------------------
> -+
> | Processes:                                                                
> |
> |  GPU   GI   CI        PID   Type   Process name                  GPU
> Memory |
> |        ID   ID                                                   Usage    
> |
> |============================================================================
> =|
> |    0   N/A  N/A      2278      G   /usr/libexec/Xorg                
> 176MiB |
> |    0   N/A  N/A      5595      G   /usr/lib64/firefox/firefox       
> 136MiB |
> |    0   N/A  N/A      5615      G   ...4/thunderbird/thunderbird     
> 108MiB |
> |    0   N/A  N/A     79159      G   ...=AudioServiceOutOfProcess      
> 57MiB |
> +----------------------------------------------------------------------------
> -+
> 
> The last entry is for chromium-browser apparently.
> 
> Updated vaapi-driver-vdpau.
> Logged out and in and started chromium-browser.
> 
> $ chromium-browser &
> [1] 191892
> lcl@canopus:~ $
> [191932:191932:0810/164518.888854:ERROR:gpu_memory_buffer_support_x11.
> cc(49)] dri3 extension not supported.
> 
> That certainly looks tidier.
> nvidia-smi registers the 191932 process.
> 
> Does this mean that the patch works for Mageia 8?

you have same result as me, vaQuerySurfaceAttributes fixed and still x11 error.
Do you run gnome, wayland or X11?
Comment 24 Len Lawrence 2023-08-10 18:24:47 CEST
I use Mate and X11.

Note You need to log in before you can comment on or make changes to this bug.