VA-API and VDPAU is broken on Radeon R600 GPU
System information
-
OS: NAME="Ubuntu" PRETTY_NAME="Ubuntu 18.04.5 LTS" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic
-
GPU: Radeon HD 3650 / Radeon HD 2600 / Radeon HD 6770M
-
Kernel version: Linux kle-PC 5.4.0-51-generic #56 (closed)~18.04.1-Ubuntu SMP Tue Oct 6 09:47:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
-
Mesa version: OpenGL version string: 3.0 Mesa 20.0.8
-
Xserver version: X.Org X Server 1.20.8 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.15.0-115-generic x86_64 Ubuntu Current Operating System: Linux kle-PC 5.4.0-51-generic #56 (closed)
18.04.1-Ubuntu SMP Tue Oct 6 09:47:18 UTC 2020 x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-51-generic root=UUID=acb5100e-91cc-4028-9310-30266525a18e ro hpet=force quiet splash vt.handoff=1 Build Date: 04 September 2020 01:36:23PM xorg-server-hwe-18.04 2:1.20.8-2ubuntu2.218.04.3 (For technical support please see http://www.ubuntu.com/support) Current version of pixman: 0.34.0 -
Desktop manager and compositor: Qt: 4.8.7 KDE Development Platform: 4.14.38 KIO Client: 2.0
The issue
The video acceleration UVD is broken on R600 and RV635 GPU systems. I can confirm this for Radeon HD 2600 and Radeon HD 3650 based computers. While the VA-API seems entirely nonfunctional, the VDPAU API seems to work partial but not correctly. An up-to-date Kubuntu 18.04 Linux with Mesa 20.0.8 shows the following errors when a video file is loaded: 1280x720
Update 09.03.2021:
It looks that this problem here is not directly related to any older Radeon R600 based hardware. There seems to exist a more widespread problem in VA-API with certain H264 encoded videos (on UVD hardware). For example, the issue can be reproduced with the following video file: https://www.tagesschau.de/multimedia/video/video-642301.html (The highest resolution format must to be downloaded and then played in vlc which can be started from CLI.)
The resolution is 1280x720, - maybe there are also other (special?) encoded options set. I can confirm this problem now also for newer UVD3 based hardware like a Radeon HD 6770M.
Maybe I will close this bug report and open a new one which better describes the current circumstances.
kle@kle-PC:~$ xine
Dies ist xine (X11 gui) - Ein freier Video-Player v0.99.9.
(c) 2000-2014 The xine Team.
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vo_vdpau: this hardware doesn't support mpeg4-part2.
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
{ i:0 u:1 c:3 pn:8-9 ir:1-1 tpoc:24 bpoc:25 sf:21 }
{ i:1 u:1 c:3 pn:10-11 ir:1-1 tpoc:30 bpoc:31 sf:18 }
{ i:2 u:1 c:3 pn:13-13 ir:1-1 tpoc:32 bpoc:33 sf:24 }
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
{ i:0 u:1 c:3 pn:8-9 ir:1-1 tpoc:24 bpoc:25 sf:22 }
{ i:1 u:1 c:3 pn:10-11 ir:1-1 tpoc:30 bpoc:31 sf:13 }
{ i:2 u:1 c:3 pn:13-13 ir:1-1 tpoc:32 bpoc:33 sf:39 }
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
{ i:0 u:1 c:3 pn:8-9 ir:1-1 tpoc:24 bpoc:25 sf:38 }
{ i:1 u:1 c:3 pn:10-11 ir:1-1 tpoc:30 bpoc:31 sf:9 }
{ i:2 u:1 c:3 pn:13-13 ir:1-1 tpoc:32 bpoc:33 sf:21 }
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
vo_vdpau: video surface doesn't match size contraints (1920 x 1080) -> (1920 x 1080) != (1920 x 1088). Segfaults ahead!
{ i:0 u:1 c:3 pn:8-9 ir:1-1 tpoc:24 bpoc:25 sf:40 }
{ i:1 u:1 c:3 pn:10-11 ir:1-1 tpoc:30 bpoc:31 sf:14 }
{ i:2 u:1 c:3 pn:13-13 ir:1-1 tpoc:32 bpoc:33 sf:33 }
kle@kle-PC:~$ xine
kle@kle-PC:~$ vlc
VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
[00005605afd39570] main libvlc: VLC wird mit dem Standard-Interface ausgeführt. Benutzen Sie 'cvlc', um VLC ohne Interface zu verwenden.
[00005605afd3d4e0] main playlist: playlist is empty
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
[00007f7050003870] glconv_vaapi_x11 gl error: vaDeriveImage: operation failed
[00007f70440c7150] main video output error: video output creation failed
[00007f7058cfb3e0] main decoder error: failed to create video output
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
QXcbConnection: XCB error: 3 (BadWindow), sequence: 10125, resource id: 41996206, major code: 40 (TranslateCoords), minor code: 0
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
libva info: va_openDriver() returns 0
[00007f7080056aa0] glconv_vaapi_x11 gl error: vaDeriveImage: operation failed
[00007f70640a67d0] main video output error: video output creation failed
[00007f704ccfad20] main decoder error: failed to create video output
[00007f704ccfad20] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
QObject::~QObject: Timers cannot be stopped from another thread
kle@kle-PC:~$
Regression
The issue is present for years. The UVD video acceleration (with Mesa drivers) probably never worked correctly on older R600 based GPU cards.