• 1
  • 48
  • 49
  • 50(current)
  • 51
  • 52
  • 58
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform
Redsandro Wrote:Same here btw, for plugins like XOT-UZG or Youtube it seems to happen much quicker.

But I think it's a problem with XBMC and the video drivers, because everything freezes. When you ssh into your htpc you can killall -9 xbmc.bin and /etc/init.d/lightdm restart all you want, but you are not gonna get your display back. Ever.

Hence, reboot now is the only way out.

FYI: For me a restart of X is enough. I don't have any window managers running, tho. Plain X without desktop environment/shell that simply calls xbmc binary in .xsession.

After kill -9 on xbmc.bin the window drops back to shell and I can restart X.

Still hoping that someone finds this problem/a workaround in the renderer.
Reply
Could you provide a xbmc.log with debugging turned on. And if this is possible a gdb backtrace?

You can ssh into the system remotely, export your DISPLAY and start xbmc.bin in gdb.

After it crashs, please obtain the backtrace (thread apply all bt)

Before you can force gdb to log into a file with:
set logging on crashlog.txt


I think i know, what i will read in the gdb logs :-). A lot of fglrx faill stuff, hopefully you can prove me wrong.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
I bet its the same problem we've seen before... Can you check your /var/log/kern.log for fglrx entries too please?
Reply
fritsch Wrote:Could you provide a xbmc.log with debugging turned on. And if this is possible a gdb backtrace?

You can ssh into the system remotely, export your DISPLAY and start xbmc.bin in gdb.

After it crashs, please obtain the backtrace (thread apply all bt)

Before you can force gdb to log into a file with:
set logging on crashlog.txt


I think i know, what i will read in the gdb logs :-). A lot of fglrx faill stuff, hopefully you can prove me wrong.

Ok, I'll try to reproduce it. It is not crashing, btw. It becomes dead partly (ignoring inputs, but still logging) - I will have to Strg+C in the gdb once it starts behaving like described.
Reply
It hangs in fglrx, i suppose during swapBuffers call or similar.... too much GL in xvba-driver which can interfere. But let`s see your log.

First idea (some month ago) was to fix xvba-driver, cause you do only get this kind of hangs hang after having watched a movie with vaapi over xvba-driver. But we decided differently, to implement raw xvba.

But! we need to get this fixed. No solution if vaapi crashes for all AMD folks outside when eden is released.

You use the latest Catalyst btw.? 11.11?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
fritsch Wrote:It hangs in fglrx, i suppose during swapBuffers call or similar.... too much GL in xvba-driver which can interfere. But let`s see your log.

First idea (some month ago) was to fix xvba-driver, cause you do only get this kind of hangs hang after having watched a movie with vaapi over xvba-driver. But we decided differently, to implement raw xvba.

But! we need to get this fixed. No solution if vaapi crashes for all AMD folks outside when eden is released.

You use the latest Catalyst btw.? 11.11?

Yes, I do. Thanks for the background.

I'll see what I can provide ;-)

Btw, I'm using Opdenkamp git at this commit https://github.com/opdenkamp/xbmc/commit...47ee02b90d and with this patch:

Code:
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
@@ -358,7 +358,9 @@ bool CDecoder::EnsureContext(AVCodecContext *avctx)
     else
       m_refs = 2;
   }
-  return EnsureSurfaces(avctx, m_refs + 3);
+  // number of reference + 3 renderbuffers + Holder
+  // an extra one should not harm
+  return EnsureSurfaces(avctx, m_refs + 5);
}

bool CDecoder::EnsureSurfaces(AVCodecContext *avctx, unsigned n_surfaces_count)

Maybe this is part of the problem.
Reply
I replaced stable with nathan-renniewaldock/xbmc-nightly yesterday, let's see if I still have the issue.

BTW, the post-releases driver cannot install for some reason, so I installed the non-post-release driver from jockey in Ubuntu which is Catalyst 11.8 for Ubuntu 11.10.

@chemical For me the crash left the frozen image on the screen, even after XBMC was killed or desktop manager restarted. Replugging cables or picking a different port has no effect, that's why I must reboot at that time. Everything else keeps working though, so if I don't need to do mediacentering, I can just leave it running as file server and other headless tasks. AMD Fusion A50M here.

-edit-

@chemical I also used the opdenkamp repo previously, without patches, and had the freezes I described. I don't think that patch is the cause.
Try Xubuntu. It's the new Ubuntu.
Reply
fritsch Wrote:It hangs in fglrx, i suppose during swapBuffers call or similar.... too much GL in xvba-driver which can interfere. But let`s see your log.

First idea (some month ago) was to fix xvba-driver, cause you do only get this kind of hangs hang after having watched a movie with vaapi over xvba-driver. But we decided differently, to implement raw xvba.

But! we need to get this fixed. No solution if vaapi crashes for all AMD folks outside when eden is released.

You use the latest Catalyst btw.? 11.11?

Within the debugger, I noticed this is different. Sometime after skipping in movies, stopping them and jumping to live tv, I found that xbmc.bin froze (not even logging anything).

However, I wasn't able to Strg+C in gdb back to the prompt.

last messages in xbmc.log:
Code:
23:56:38 T:140736583833344    INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
23:56:38 T:140736583833344   DEBUG: VAAPI - attempting to open codec 28 with profile 77 at level 40 with 2 reference frames
23:56:38 T:140736676964096  NOTICE: Opening teletext stream: 4 source: 256
23:56:38 T:140736676964096  NOTICE: Creating teletext data thread
23:56:38 T:140736676964096  NOTICE: Opening audio stream: 2 source: 256
23:56:38 T:140736676964096  NOTICE: Finding audio codec for: 86016
23:56:38 T:140736676964096   DEBUG: FactoryCodec - Audio: libmad - Opening
23:56:38 T:140736676964096   DEBUG: SECTION:LoadDLL(libmad.so.0)
23:56:38 T:140736751122176   DEBUG: Thread CDVDTeletextData start, auto delete: 0
23:56:38 T:140736751122176  NOTICE: running thread: CDVDTeletextData
23:56:38 T:140736676964096   DEBUG: Loading: libmad.so.0
23:56:38 T:140736583833344   DEBUG: VAAPI - initialize version 0.32
23:56:38 T:140736583833344   DEBUG: VAAPI - attrib 5 (get/---) min 1 max 1 value 0x1
23:56:38 T:140736583833344   DEBUG: VAAPI - attrib 4 (get/set) min 0 max 16777215 value 0xffffff
23:56:38 T:140736583833344   DEBUG: VAAPI - attrib 0 (get/set) min -100 max 100 value 0x0
23:56:38 T:140736583833344   DEBUG: VAAPI - attrib 1 (get/set) min -100 max 100 value 0x0
23:56:38 T:140736583833344   DEBUG: VAAPI - attrib 2 (get/set) min -100 max 100 value 0x0
23:56:38 T:140736583833344   DEBUG: VAAPI - attrib 3 (get/set) min -100 max 100 value 0x0
23:56:38 T:140736583833344   DEBUG: VAAPI - profile 7
23:56:38 T:140736583833344   DEBUG: VAAPI - profile 10
23:56:38 T:140736583833344   DEBUG: VAAPI - making sure 7 surfaces are allocated for given 2 references

Checking with top, I found that xbmc.bin loaded both cpus. Stracing the process xbmc.bin: Permission denied.

Last output of gdb:
Code:
[Thread 0x7fffcfa32700 (LWP 3221) exited]
[New Thread 0x7fffcfa32700 (LWP 3222)]
[New Thread 0x7fffc9960700 (LWP 3227)]
[New Thread 0x7fffdec60700 (LWP 3228)]
[New Thread 0x7fffca161700 (LWP 3229)]
libva: VA-API version 0.32.0
libva: User requested driver 'xvba'
libva: Trying to open /usr/lib/va/drivers/xvba_drv_video.so
[New Thread 0x7fffd40eb700 (LWP 3230)]
libva: va_openDriver() returns 0
[New Thread 0x7fffd38ea700 (LWP 3231)]
^C
^C^C^C^C^C^C

The last thread fork was pid 3231 - that one is still running and gdb was waiting for it (indefinitely - 3065 is "gdb /usr/lib/xbmc/xbmc.bin"):

Code:
xbmc@xbmc:~/.xbmc/temp$ sudo strace -p 3065
Process 3065 attached - interrupt to quit
wait4(3231,

Don't know how to go on here, the only way to help is kill -9 gdb - no bt possible ;-(

EDIT: Without debugger, xbmc.bin is traceable. Freezing in "futex(0x7fc068000020, FUTEX_WAIT_PRIVATE, 2, NULL"
Reply
Was able to catch a (different) crash.

Last lines in xbmc.log
http://paste.kde.org/156356/

Thread apply all bt:
http://paste.kde.org/156368/
Reply
I am afraid this looks not like anything I expected. Could you file an issue with opdenkamps git tree?

For a really first look, it seems like a race condition between different threads (waiting forever) - but I am not really sure - too many threads invoked I do not know of (vdr stuff) and how they interact.

Btw. you could run xbmc without gdb, when it hangs you can use gdb to attach to this pid. gdb must be run as superuser, eg sudo gdb xbmc.bin

set logging on lala.txt
attach $PID
thread apply all bt

For a first look it does not seem to be vaapi related in anyway. I am looking again in some hours - have to go to work :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
fritsch Wrote:I am afraid this looks not like anything I expected. Could you file an issue with opdenkamps git tree?

For a really first look, it seems like a race condition between different threads (waiting forever) - but I am not really sure - too many threads invoked I do not know of (vdr stuff) and how they interact.

Btw. you could run xbmc without gdb, when it hangs you can use gdb to attach to this pid. gdb must be run as superuser, eg sudo gdb xbmc.bin

set logging on lala.txt
attach $PID
thread apply all bt

For a first look it does not seem to be vaapi related in anyway. I am looking again in some hours - have to go to work :-)

Ok, maybe this is related to the epg crashes I have with the Nov 20 pvr-ppa git - wasn't the problem before.

If I can attach to a "freezing" xbmc.bin life is easier for me. I just placed a hook for this - my gf will call me the next time this happens. ;-)

I placed the logs/traces here, looks similar: https://github.com/opdenkamp/xbmc/issues/344
Reply
It happened again. A freeze. But not during any menu drawing, in the middle of a video. The audio continued playing, but input (remote, keyboard) didn't work anymore. Reboot is the only clean way out. (login via ssh, reboot now)

This was using the nightly from nathan-renniewaldock/xbmc-nightly. How did I do that special magic again that is any use to the devs? Was enabling debug mode enough, or did I need a special debug build?
And can I enable the debug logging without that annoying overlay? I mean I have to continue my daily htpc-life until it happens again, who knows how long that takes. Tongue
Try Xubuntu. It's the new Ubuntu.
Reply
@chemical:
As I thought this is a locking problem in pvr, nothing to do with this patch concerning 24p playback. Btw. from reading the bugreport there are patches on their way.

@Redsandro:
It would be interesting to get an xbmc.log with debugging turned on and additionally a gdb backtrace as described some threads above. Thank you in advance.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
BTW What is currently the most stable versión: The opdenkamp ppa or the nathan-renniewaldock ppa?
Reply
@fritsch I am guessing you reply to the email notification and did not see my edit so excuse me for asking again, but can I enable the debug logging without that 3 line text overlay? I have to continue my daily htpc-life until another freeze, who knows how long that takes. Big Grin

@Infinitatus nathan has both a stable and a nightly branch. Stable is more recent than opdenkamp. I have not noticed a difference between the three from an ignorant consumer point of view, so bugwise that is neat. I would go for the newest stable, nathan that is.
Try Xubuntu. It's the new Ubuntu.
Reply
  • 1
  • 48
  • 49
  • 50(current)
  • 51
  • 52
  • 58

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform14