"Failed to initialize A/V Sync" error trying to play HEVC h.265 with vdpau that supports hevc

Bug #1673481 reported by Dave Chiluk on 2017-03-16
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mythtv (Ubuntu)
Medium
Dave Chiluk
Xenial
Medium
Dave Chiluk
Yakkety
Medium
Dave Chiluk
Zesty
Medium
Dave Chiluk
Artful
Medium
Dave Chiluk

Bug Description

When trying to play HEVC / h265 / x265 video, frontend fails and reports "Failed to initialize A/V Sync" error when using vdpau.

This is identical to upstream
https://code.mythtv.org/trac/ticket/12992

[Impact]
 * When trying to play HEVC / h265 / x265 video, frontend fails and reports "Failed to initialize
   A/V Sync" error when using vdpau.

 * Log shows
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
mythfrontend.real: mythfrontend[19461]: I CoreContext tv_play.cpp:5855 (StartPlayer) TV::StartPlayer(): Created player.
mythfrontend.real: mythfrontend[19461]: I CoreContext tv_play.cpp:2532 (HandleStateChange) TV::HandleStateChange(): Changing from None to WatchingVideo
mythfrontend.real: mythfrontend[19461]: E Decoder videoout_vdpau.cpp:649 (DrawSlice) VidOutVDPAU: Codec is not supported.
mythfrontend.real: mythfrontend[19461]: I CoreContext tv_play.cpp:2632 (HandleStateChange) TV::HandleStateChange(): Main UI disabled.
mythfrontend.real: mythfrontend[19461]: I CoreContext tv_play.cpp:424 (StartTV) TV::StartTV(): Entering main playback loop.
mythfrontend.real: mythfrontend[19461]: E Decoder videoout_vdpau.cpp:559 (DrawSlice) VidOutVDPAU: IsErrored() in DrawSlice
mythfrontend.real: mythfrontend[19461]: I CoreContext screensaver-dbus.cpp:82 (Inhibit) ScreenSaverDBus: Successfully inhibited screensaver via org.freedesktop.ScreenSaver. cookie 1810861299. nom nom
mythfrontend.real: mythfrontend[19461]: W CoreContext screensaver-dbus.cpp:87 (Inhibit) ScreenSaverDBus: Failed to disable screensaver: Type of message, '(ss)', does not match expected type '(susu)'
mythfrontend.real: mythfrontend[19461]: E Decoder videoout_vdpau.cpp:559 (DrawSlice) VidOutVDPAU: IsErrored() in DrawSlice
mythfrontend.real: mythfrontend[19461]: I CoreContext screensaver-x11.cpp:149 (DisableDPMS) ScreenSaverX11Private: DPMS Deactivated 1
mythfrontend.real: mythfrontend[19461]: E Decoder videoout_vdpau.cpp:559 (DrawSlice) VidOutVDPAU: IsErrored() in DrawSlice
mythfrontend.real: mythfrontend[19461]: E CoreContext mythplayer.cpp:1838 (AVSync) Player(0): AVSync: Unknown error in videoOutput, aborting playback.
mythfrontend.real: mythfrontend[19461]: I CoreContext tv_play.cpp:2275 (HandleStateChange) TV::HandleStateChange(): Attempting to change from WatchingVideo to None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 * This is identical to upstream
   https://code.mythtv.org/trac/ticket/12992

[Test Case]

 1. Set up mythtv
 2. Configure mythtv vdpau video decoder with de-interlacing
 3. On frontend play h265/hevc encoded media, with nvidia-375+ and a pascal or newer nvidia card.
 4. See error

[Regression Potential]

 * Fix is narrowly applied to hevc/h265 decoding in the vdpau decoder.
 * Possible but unlikely regressions may be deinterlacing being broken, or vdpau ceasing to function.

[Other Info]
 * https://en.wikipedia.org/wiki/Nvidia_PureVideo . This will only affect video cards that have hevc decoding which is VDPAU Feature set E,F,G,H.
 * https://code.mythtv.org/trac/ticket/12992

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: mythtv-frontend 2:0.28.0+fixes.20160413.15cf421-0ubuntu2
ProcVersionSignature: Ubuntu 4.8.0-34.36~16.04.1-generic 4.8.11
Uname: Linux 4.8.0-34-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Mar 16 09:44:08 2017
InstallationDate: Installed on 2016-01-15 (425 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160115)
Installed_mythtv_dbg: 2:0.28.0+fixes.20160413.15cf421-0ubuntu2
MythTVDirectoryPermissions:
 total 4
 drwxr-xr-x 2 root root 4096 Jan 7 2016 videos
SourcePackage: mythtv
UpgradeStatus: No upgrade log present (probably fresh install)

Dave Chiluk (chiluk) wrote :
Dave Chiluk (chiluk) wrote :

This patch solves the issue by disabling de-interlacing for hevc/h265 material. This is not the final solution, but just a hack to keep all our wives happy while the real solution is developed.

Dave Chiluk (chiluk) on 2017-03-16
Changed in mythtv (Ubuntu Yakkety):
assignee: nobody → Dave Chiluk (chiluk)
Changed in mythtv (Ubuntu Xenial):
assignee: nobody → Dave Chiluk (chiluk)
status: New → Confirmed
Changed in mythtv (Ubuntu Yakkety):
status: New → Confirmed
Changed in mythtv (Ubuntu Zesty):
status: New → Confirmed
Changed in mythtv (Ubuntu Xenial):
importance: Undecided → Medium
Changed in mythtv (Ubuntu Yakkety):
importance: Undecided → Medium
Changed in mythtv (Ubuntu Zesty):
importance: Undecided → Medium
Dave Chiluk (chiluk) wrote :

FYI Sponsors patch needs to be cleaned up *(DEP3) and upstream work TBD. I'll handle that. I just wanted to document the bug here so that we can begin to see how many people may be affected.

Those of you that are affected don't add a comment. Instead select "This bug affects you" above on this page.

tags: added: patch
Dave Chiluk (chiluk) wrote :

While testing zesty it appears that the patch does not resolve issues there, and will have to be rewritten for it and newer.

Dave Chiluk (chiluk) on 2017-03-23
summary: "Failed to initialize A/V Sync" error trying to play HEVC h.265 with
- vdpau
+ vdpau that supports hevc
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.28.0+fixes.20170206.03f4403-0ubuntu5

---------------
mythtv (2:0.28.0+fixes.20170206.03f4403-0ubuntu5) artful; urgency=medium

  * Fix for error "Failed to initialize A/V Sync" when trying to play
    hevc/h265 content with vdpau acceleration. (LP: #1673481)

 -- Dave Chiluk <email address hidden> Sun, 02 Jul 2017 11:22:34 -0500

Changed in mythtv (Ubuntu Artful):
status: Confirmed → Fix Released
Dave Chiluk (chiluk) on 2017-07-03
description: updated
description: updated
Dave Chiluk (chiluk) on 2017-07-03
tags: added: verification-done-artful
Dave Chiluk (chiluk) wrote :

@Joe MC. What hardware do you have? I know this affects pascal (feature set h), but I think it might affect vdpau feature sets e,f,and g as well. Would you mind sharing what hardware you hit this with?

@else
Alright I've uploaded fixes for x+. I'm not uploading for T because if you have new enough hardware to hit this, you probably aren't running T.

Once the SRU team approves the uploads *(which may take a few days). This will land in the proposed pockets where it will need to be tested.

Joe Mc (joe+ubuntufourms) wrote :

Thanks for working this Dave. I have a GeForce GTX 1050, Nivdia Driver 381.09 on Xubuntu 16.04. MythTV 0.28.1+fixes.20170621.

Hello Dave, or anyone else affected,

Accepted mythtv into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mythtv/2:0.28.0+fixes.20170206.03f4403-0ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mythtv (Ubuntu Zesty):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-zesty
Andy Whitcroft (apw) wrote :

Hello Dave, or anyone else affected,

Accepted mythtv into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mythtv/2:0.28.0+fixes.20160413.15cf421-0ubuntu2.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mythtv (Ubuntu Xenial):
status: Confirmed → Fix Committed
tags: added: verification-needed-xenial
Andy Whitcroft (apw) wrote :

Hello Dave, or anyone else affected,

Accepted mythtv into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mythtv/2:0.28.0+fixes.20160413.15cf421-0ubuntu2.16.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-yakkety to verification-done-yakkety. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-yakkety. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mythtv (Ubuntu Yakkety):
status: Confirmed → Fix Committed
tags: added: verification-needed-yakkety
Dave Chiluk (chiluk) on 2017-07-06
tags: added: verification-done-xenial
removed: verification-needed-xenial
Łukasz Zemczak (sil2100) wrote :

Hey Dave! Could you please give some additional feedback on the testing procedures? It can be just and overview of the test-steps performed, the environment and the version number of the package you have tested.

Dave Chiluk (chiluk) wrote :

@sil2100, I deployed this fix to my xenial based main mythtv frontend. I have been using the frontend to watch hevc encoded OTA 1080p recordings on my nvidia 1060 gpu with the . These recordings were generated using ffmpeg with the nvenc hevc hardware offload.

I have also explicitly installed and tested yakkety, zesty, and artful on my victim machine by, adding the nvidia-378, vdpau packages, and mythtv packages. I then configured mythtv to point at my repository of encoded media and attempted playback. I verified that the series was indeed still broken. Then installed the packages in -proposed, and verified that media played correctly.

It looks like I forgot to mark y and z as verification done, as I remember doing those on separate days from x and a. Fixing that now.

tags: added: verification-done-yakkety verification-done-zesty
removed: verification-needed-yakkety verification-needed-zesty
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.28.0+fixes.20160413.15cf421-0ubuntu2.16.04.1

---------------
mythtv (2:0.28.0+fixes.20160413.15cf421-0ubuntu2.16.04.1) xenial; urgency=medium

  * Fix for error "Failed to initialize A/V Sync" when trying to play
    hevc/h265 content with vdpau acceleration. (LP: #1673481)

 -- Dave Chiluk <email address hidden> Sun, 02 Jul 2017 22:37:54 -0500

Changed in mythtv (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for mythtv has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.28.0+fixes.20160413.15cf421-0ubuntu2.16.10.1

---------------
mythtv (2:0.28.0+fixes.20160413.15cf421-0ubuntu2.16.10.1) yakkety; urgency=medium

  * Include e4f6e011b6 from upstream mythtv to fix yakkety ftbfs.
    "error: call of overloaded ‘abs(double)’ is ambiguous"
  * Fix for error "Failed to initialize A/V Sync" when trying to play
    hevc/h265 content with vdpau acceleration. (LP: #1673481)

 -- Dave Chiluk <email address hidden> Sun, 02 Jul 2017 22:37:54 -0500

Changed in mythtv (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.28.0+fixes.20170206.03f4403-0ubuntu3.1

---------------
mythtv (2:0.28.0+fixes.20170206.03f4403-0ubuntu3.1) zesty; urgency=medium

  * Fix for error "Failed to initialize A/V Sync" when trying to play
    hevc/h265 content with vdpau acceleration. (LP: #1673481)

 -- Dave Chiluk <email address hidden> Sun, 02 Jul 2017 12:29:50 -0500

Changed in mythtv (Ubuntu Zesty):
status: Fix Committed → Fix Released
Peter Bennett (pgbennett) wrote :

I have committed this fix upstream, in the MythTV repository. It will be in release 29.1.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers