VDPAU + Adjust refresh rate == crash on stop playback
#1
Hello.

I just got two ASRocks delivered to home. So thought I'd try them out. I have before this been running XBMC on a C2D @ 3GHz doing all decoding on the CPU instead of GPU. Whilst this has been working great I thought I'd go for something smaller.

The basic setup is to ouptut 1080p with VDPAU video decoding and to sync it at 24Hz when doable.

So. First off I installed a Live version of 9.04. Updating the drivers to the latest 185.xx, and got VDPAU working. I only play contents off SMB mounts. Whilst playing works fair stopping the video is another matter. It *always* results in an XBMC crash / reload.

I have located it down to this behavior when enabling "Auto adjust refresh rate". Having this unticked does not cause the problem. The video syncs at 24Hz during playback. Turning off VDPAU also resolves the issue. However playback drops to ~11FPS for 1080p contents Wink

So on the other ASRock I installed a Hardy 8.04 server, switched to a -generic kernel, built the Nvidia stuff required and updated ALSA. Got it working. And it's exhibiting the exact same behavior.

I see that all guides recommend to set the menu resolution to 1080x1920@24Hz per default. This is not desirable for me as I experience menu lagging whist having this mode. And whilst it seems to be the combination of VDPAU + auto adjust refresh rate and the fact that it only appears while VDPAU is activated I would presume it's a bug.

The relevant part of my xorg.conf:

Code:
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"

#Workaround for visible X cross
        Option "HWCursor" "false"

#Adjusting general font size in X
        Option "UseEDIDDpi" "false"
        Option "DPI" "96 x 96"

#Regarding following option: Without this Auto Adjust Refresh Rate
#has no effect. Probably related to others setting the 24Hz mode
#hard in the XBMC menu.
        Option "FlatPanelProperties" "Scaling = Native"

#Disabling TwinView for 24Hz
        Option "DynamicTwinView" "False"

EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes   "1920x1080"
    EndSubSection
EndSection

NVidia driver versions tested:
  • 185.13
  • 185.18.14
  • 185.18.36
  • nvidia-glx-180.XX (ubuntu's restricted glx)
  • latest 190.xx

Ubuntu releases tested:
  • XBMC Live (9.04.1)
  • Hardy 8.04 (with all relevant drivers updated manually)

XBMC Versions tested:
  • XBMC Live 9.04
  • XBMC 9.04 built from source (for VDPAU enabled under hardy)
  • XBMC latest SVN as of yesterday

More filled out surveys from the "Posting problems in a useful manner":

Linux Distribution and Version: Ubuntu 8.04 & 9.04 (Live 9.04.1) all 32-bit
Architecture: Intel ATOM 330 1.6GHZ ION platform
Install Method: PPA, Source, Live included version
SVN Revision: 9.04.3+svn23164 (for the SVN attempt I did)
Detailed Instructions to Reproduce the Problem:

1. Enable VDPAU and Auto Refresh rate in combination with my xorg.conf settings and a menu of 1080p at auto detected rate
2. Play back contents over SMB
3. Stop content, XBMC crashes.

FULL Debug Log:

http://www.pastie.org/639150

GUI Problems: N/A
Skin name: PM3 HD

Playback Problems:
Video: mkv h264 file
Audio codec: DTS/AC3

Other things that may be useful:
System hardware specs (CPU, RAM, Chipset, etc.): Atom 330 ION ASROCK 2GB RAM
Kernel Version: 2.6.24-24-generic & 2.6.28-15-generic

Core dump: Did actually Not find a core dump from xbmc. This was the 9.04.1 built with debugging etc. (ran ulimit -c unlimited before aswell)

If you got a suggestion for an applicable workaround other than setting system menu to a hard 1920x1080@24Hz I'd love to hear it! :-)
Reply
#2
Please see the sticky about posting problems in a useful manner.
Reply
#3
althekiller Wrote:Please see the sticky about posting problems in a useful manner.

Filled in some extra material taken from this sticky in the original post.

Thanks for the notice. Hope it's sufficient.
Reply
#4
Quote:#hard in the XBMC menu.
Option "FlatPanelProperties" "Scaling = Native"

#Disabling TwinView for 24Hz
Option "DynamicTwinView" "False"

Are in wrong section
Reply
#5
I have almost identical setup (ZOTAC ION330, XBMC Live 9.04.1) and I see exactly the same problem. I only added "DynamicTwinView" "False" to my xorg.conf (in the correct section, of course) to make auto refresh rate work. I've also observed that the crash only occurs if a video was played using vdpau, some old PAL mpeg2 which also triggers a mode change but is decoded in software doesn't lead to the crash.

I compared xbmc.log for both cases and found the following difference, notice the mode change via xrandr and then the bad mutex:

Code:
23:38:58 T:3049285520 M:1463500800  NOTICE: ~CDVDPlayerVideo - uninitting video device
23:38:58 T:3049285520 M:1463500800   DEBUG: CGUIWindowManager::PreviousWindow: Deactivate
23:38:58 T:3049285520 M:1463500800   DEBUG: ------------------- GUI_MSG_WINDOW_DEINIT
23:38:58 T:3049285520 M:1463500800   DEBUG: Fullscreen video
23:38:58 T:3049285520 M:1463500800   DEBUG: -------------------
23:38:58 T:3049285520 M:1466368000    INFO: XRANDR: /usr/share/xbmc/xbmc-xrandr --output default --mode 0x148
23:38:58 T:3049285520 M:1465896960    INFO: GL: ReleaseContext
23:38:58 T:3049285520 M:1464705024   ERROR: (pthread_mutex_destroy(&m_mutex)): [XCriticalSection.cpp:83] 16
23:38:58 T:3049285520 M:1464705024 WARNING: Cleanup: Having to cleanup texture pointer-nofocus.png
23:38:58 T:3049285520 M:1464705024 WARNING: Cleanup: Having to cleanup texture pointer-focus.png
23:38:58 T:3049285520 M:1464705024 WARNING: Cleanup: Having to cleanup texture pointer-focus-drag.png
23:38:59 T:3049285520 M:1464705024 WARNING: Cleanup: Having to cleanup texture pointer-focus-click.png
23:38:59 T:3049285520 M:1464705024 WARNING: Cleanup: Having to cleanup texture ProgressBack.png

The log ends there suddenly because of the crash. In comparison, correct termination of the player when vdpau isn't used looks like this:

Code:
00:03:48 T:3049183120 M:1462390784  NOTICE: ~CDVDPlayerVideo - uninitting video device
00:03:48 T:3049183120 M:1462390784   DEBUG: CGUIWindowManager::PreviousWindow: Deactivate
00:03:48 T:3049183120 M:1462390784   DEBUG: ------------------- GUI_MSG_WINDOW_DEINIT
00:03:48 T:3049183120 M:1462390784   DEBUG: Fullscreen video
00:03:48 T:3049183120 M:1462390784   DEBUG: -------------------
00:03:48 T:3049183120 M:1465257984    INFO: XRANDR: /usr/share/xbmc/xbmc-xrandr --output default --mode 0x148
00:03:48 T:3049183120 M:1464852480    INFO: GL: ReleaseContext
00:03:48 T:3049183120 M:1463427072   DEBUG: Asking to resize surface to 1920 x 1080
00:03:48 T:3049183120 M:1463427072    INFO: GL: Maximum texture width: 8192
00:03:48 T:3049183120 M:1463427072   DEBUG: CGUIWindowManager::PreviousWindow: Activate new
00:03:48 T:3049183120 M:1463427072   DEBUG: ------------------- GUI_MSG_WINDOW_INIT
00:03:48 T:3049183120 M:1463427072   DEBUG:
00:03:48 T:3049183120 M:1463427072   DEBUG: -------------------
00:03:48 T:3049183120 M:1463427072    INFO: Loading skin file: MyVideo.xml
Reply
#6
Its been fixed on SVN for several days - give it a shot.
Reply
#7
Thanks. Installed 9.04.3+svn23481-jaunty1 from ppa.launchpad.net/team-xbmc-svn and the crash is gone. However, now the performance for h264@1080p24 playback degraded significantly. With 9.04.1 it had worked flawlessly, but this versions sometimes drops down to 20fps with massive audio desync. Also the CPU load has gone up to around 50% on two cores. Did I miss something?
Reply
#8
You're not still on the 180 driver series by any chance.
Reply
#9
Yes, I was ... with 185 it's back to normal. Thanks for your fast help.
Reply
#10
kolja Wrote:Thanks. Installed 9.04.3+svn23481-jaunty1 from ppa.launchpad.net/team-xbmc-svn and the crash is gone.

Upgrading my XBMC was my remedy to the problem aswell.

vikjon0 Wrote:Are in wrong section

No, they are not. They are nvidia options in the Device section for nvidia.
Reply
#11
Quote:No, they are not. They are nvidia options in the Device section for nvidia.

I do not know NVIDIA or Linux like you. I have just followed the instructions on this and other forums.

Put the lines in any secton you want. My Asrock ION 330 is working with autorefreshrate and I though you wanted some suggestions.
Reply
#12
vikjon0 Wrote:I do not know NVIDIA or Linux like you. I have just followed the instructions on this and other forums.

Put the lines in any secton you want. My Asrock ION 330 is working with autorefreshrate and I though you wanted some suggestions.

1. I think you missed the point that this was a reproducible bug that was fixed in a SVN

2. I think you missed the point that both I and the other person got a remedy from upgrading

And for the placement; both probably works placement wise. But since you said it was wrong I thought you would find it nice to be correctly informed so that you don't think this is the problem in the future again. Some one else may actually believe that you know what you are saying holding back the debugging because of it. All in all you will slow down the solution process.

I did/do want suggestions, I do not however not want guesses. Refer to the nvidia manual for options and how to apply them.
Reply
#13
Ok, fair is fair. I tested to move the lines to device and it still works. I guess it is possible to set these option per card or per screen.
Reply

Logout Mark Read Team Forum Stats Members Help
VDPAU + Adjust refresh rate == crash on stop playback0