Kodi Community Forum

Full Version: VDPAU issue with latest GIT 2011-07-29
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hardware: Asrock ION 330.
Software: XBMC built from latest Git, Ubutnu Lucid, latest Nvidia drivers, 275.21.

Some videos are now freezing after about 2-5 seconds of video.

snip from log
Code:
14:49:59 T:2893015920 M:1638342656  NOTICE: Attempting recovery
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: nvidia-settings -nt -q RefreshRate3 produced no output
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: Using RandR for refreshrate detection
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: Detected refreshrate: 55 hertz
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: Vblank counter has reset
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: Detaching glX context
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: Attaching glX context
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: Vblank counter has reset
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: Cleaning up GLX
14:49:59 T:2876230512 M:1639804928 WARNING: CurrentHostCounter() moving backwords by 2139157 ticks with freq of 1000000000
14:49:59 T:2901408624 M:1639804928   DEBUG: CVideoReferenceClock: Setting up GLX
14:49:59 T:2893015920 M:1639788544  NOTICE: vdp_device = 0x00000001 vdp_st = 0x00000002
14:49:59 T:2893015920 M:1639788544   ERROR: (VDPAU) unable to init VDPAU - vdp_st = 0x2.  Falling back.
14:49:59 T:2893015920 M:1639788544   DEBUG: CDVDPlayerVideo - video decoder was flushed
14:49:59 T:2893015920 M:1639788544   ERROR:  (VDPAU) Error: An invalid handle value was provided.(3) at VDPAU.cpp:1002
14:49:59 T:2893015920 M:1639788544   ERROR: CVDPAU::FFGetBuffer - No Video surface available could be created
14:49:59 T:2893015920 M:1639788544   ERROR: ffmpeg[AC6FEB70]: [h264_vdpau] get_buffer() failed (-1 2147483647 2 (nil))
14:49:59 T:2893015920 M:1639788544   ERROR: ffmpeg[AC6FEB70]: [h264_vdpau] decode_slice_header error
14:49:59 T:2893015920 M:1639981056  NOTICE: Attempting recovery
14:49:59 T:2893015920 M:1640243200  NOTICE: vdp_device = 0x00000001 vdp_st = 0x0

Enitre log, http://pastebin.com/S3hcGxWC
I have similar errors, sometime when launching a video, and the display is adapted to the video rate, xbmc crash.

The next time I launch the video, most of the time it's OK, so not related to the video.

Code:
17:34:35 T:140444578735872 M:1387704320  NOTICE: Creating 1280x720 pixmap
17:34:35 T:140444578735872 M:1387290624  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)
17:34:35 T:140444578735872 M:1384337408  NOTICE: Creating video thread
17:34:35 T:140444578735872 M:1384337408  NOTICE: Opening audio stream: 1 source: 256
17:34:35 T:140444578735872 M:1384337408  NOTICE: Finding audio codec for: 86019
17:34:35 T:140444578735872 M:1384337408  NOTICE: Creating audio thread
17:34:35 T:140444451219200 M:1384337408  NOTICE: running thread: CDVDPlayerAudio::Process()
17:34:35 T:140444451219200 M:1384194048  NOTICE: Creating audio device with codec id: 86019, channels: 6, sample rate: 48000, no pass-through
17:34:35 T:140444459611904 M:1384321024  NOTICE: running thread: video_thread
17:34:35 T:140444459611904 M:1381781504  NOTICE:  (VDPAU) screenWidth:1280 vidWidth:1280
17:34:35 T:140444459611904 M:1382416384  NOTICE:  (VDPAU) screenHeight:720 vidHeight:720
17:34:35 T:140444459611904 M:1362362368  NOTICE:  (VDPAU) Total Output Surfaces Available: 4 of a max (tmp: 4 const: 4)
17:34:35 T:140444459611904 M:1359384576  NOTICE:  (VDPAU) Creating the video mixer
17:34:35 T:140444459611904 M:1348907008  NOTICE:  fps: 23.976024, pwidth: 1280, pheight: 720, dwidth: 1280, dheight: 720
17:34:35 T:140444459611904 M:1348907008  NOTICE: Display resolution ADJUST : default: 1920x1080 @ 24.00Hz (15) (weight: 0.001)
17:34:36 T:140444736997184 M:1344618496   ERROR: GLX: Same window as before, refreshing context
17:34:36 T:140444736997184 M:1344520192  NOTICE: Using GL_TEXTURE_2D
17:34:36 T:140444736997184 M:1344520192  NOTICE: GL: Using VDPAU render method
17:34:36 T:140444736997184 M:1344520192  NOTICE: GL: NPOT texture support detected
17:34:36 T:140444736997184 M:1344520192  NOTICE: GL: Using GL_ARB_pixel_buffer_object
17:34:36 T:140444736997184 M:1384120320   ERROR: VDPAU Device Preempted - attempting recovery
17:34:36 T:140444736997184 M:1384120320   ERROR:  (VDPAU) Error: The display was pre-empted, or a fatal error occurred.(2) at VDPAU.cpp:1337
17:34:38 T:140444459611904 M:1384476672  NOTICE: Attempting recovery
17:34:38 T:140444459611904 M:1384476672  NOTICE:  (VDPAU) FiniVDPAUOutput
17:34:38 T:140444459611904 M:1381756928  NOTICE: vdp_device = 0x00000001 vdp_st = 0x00000000

I am using Openelec EDEN (devel version), but also had this problem with openelec "dharma" devel version.

X.Org X Server 1.10.3
libvdpau 0.4.1
nvidia drivers 280.13
Skin : Alaska Revisited (if that matters ?)
esprit Wrote:I have similar errors, sometime when launching a video, and the display is adapted to the video rate, xbmc crash.

The next time I launch the video, most of the time it's OK, so not related to the video.

Code:
17:34:36 T:140444736997184 M:1384120320   ERROR: VDPAU Device Preempted - attempting recovery
17:34:36 T:140444736997184 M:1384120320   ERROR:  (VDPAU) Error: The display was pre-empted, or a fatal error occurred.(2) at VDPAU.cpp:1337

I am using Openelec EDEN (devel version), but also had this problem with openelec "dharma" devel version.

its a known and hard to find/solve issue in xbmc if you have enabled the option to change the display rate to match with video.

Stephan
The issue is identified but not that easy to fix. I am working on this.
FernetMenta Wrote:The issue is identified but not that easy to fix. I am working on this.

Awesome Smile this bug has annoyed me quite allot, and as far as i know it isn't caused by xbmc. What is/was the reason FernetMenta? you can count me in as a tester whenever it's time. I'll be waiting Big Grin
newphreak Wrote:Awesome Smile this bug has annoyed me quite allot, and as far as i know it isn't caused by xbmc. What is/was the reason FernetMenta? you can count me in as a tester whenever it's time. I'll be waiting Big Grin

I'm using the latest pixmap branch of FernetMenta build and all works perfect (99%) with VDPAU and auto-refresh change enabled.

Mini-guide:

With FernetMenta build (https://github.com/FernetMenta/xbmc/) pixmap branch! everything works and XBMC no crashes...

Download file .tar.gz (from PIXMAP BRANCH) and install it: http://forum.xbmc.org/showpost.php?p=818...stcount=18

Try it!
This branch is a bit outdated and has same flaws I am working on. It introduces vdpau-opengl-interop which can be activated if prerequisites are met (glew-dev > 1.5.5, nvidia > 255). This method bypasses the critical point which is most likely the reason for the crashes: glXBindTexImageEXT, glXReleaseTexImageEXT. Since refresh rate is changed asynchronously, it might occur at a time the driver can't handle it.

The root cause is known:
Quote:ERROR: (VDPAU) Error: The display was pre-empted, or a fatal error occurred.(2) at VDPAU.cpp:1337
Thus the most robust solution is to avoid this situation. If refresh rate is going to change: pause player, drain render buffers, release vdpau resources, wait for change to happen, and reconfigure. Sounds easy but a lot of code has to be touched.
Well, it's not desired to fix one issue and introduce 5 new ones. So don't expect a final fix tomorrow Smile
I have this already running but very experimental at the moment.
Thank you FernetMenta, it's good to know that the problem is known and that a solution will come.
I can wait for the fix, having XBMC crash when launching a video is a bit frustrating, but as it restarts automatically, not such a big deal.
Yeah that's true esprit. Will be nice to have it fixed though. And as i'm a tester for OpenELEC i don't use custom branches that needs compiling/git/anything weird.