Kodi Community Forum

Full Version: XBMC for Linux VDPAU - NVIDIA GPU video decoding support (now in the mainline SVN)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Thread looks like the right one...

On an Aspire Revo, XBMC 9.04.1 *and* from svn (currently built from r21096). I think the svn build *reduced* the problems but did not eliminate them. VDPAU is enabled, (VDPAU)Temporal interlacing is enabled, "Resolution" is set to "Auto", adjust refresh rate is enabled (tried it disabled too). Source material is 1080i from BBC HD at 25fps (50Hz). X config is set to use 50Hz.

Two problems:

1: What *looks* a bit like vsync "tearing", occasional during motion and confined to about the top eighth of the screen. Vertical blank sync *is* enabled though. (And in fact if I turn it off, as you'd expect, tearing is much more pronounced and all over the screen.)

2: Skipped frames or judder visible on continuous motion shots.

I tried upping the GPU memory to 512MB in the bios; no apparent difference to playback.

What can I try next? :-) As this is Atom-based I don't think cpufreq/clocking settings can be addressed, can they?

I downloaded killa.sampla.x264.mkv - it exhibits the judder problem too. No sign of the 'tearing' problem but that was occasional enough that that could just be chance. (BTW, sound is broken on that file, is that normal?)
Rachel Wrote:Thread looks like the right one...

On an Aspire Revo, XBMC 9.04.1 *and* from svn (currently built from r21096). I think the svn build *reduced* the problems but did not eliminate them. VDPAU is enabled, (VDPAU)Temporal interlacing is enabled, "Resolution" is set to "Auto", adjust refresh rate is enabled (tried it disabled too). Source material is 1080i from BBC HD at 25fps (50Hz). X config is set to use 50Hz.

Two problems:

1: What *looks* a bit like vsync "tearing", occasional during motion and confined to about the top eighth of the screen. Vertical blank sync *is* enabled though. (And in fact if I turn it off, as you'd expect, tearing is much more pronounced and all over the screen.)

2: Skipped frames or judder visible on continuous motion shots.

I tried upping the GPU memory to 512MB in the bios; no apparent difference to playback.

What can I try next? :-) As this is Atom-based I don't think cpufreq/clocking settings can be addressed, can they?

I downloaded killa.sampla.x264.mkv - it exhibits the judder problem too. No sign of the 'tearing' problem but that was occasional enough that that could just be chance. (BTW, sound is broken on that file, is that normal?)

Hi Rachel !

Are you completely sure that your videocard does change the refresh rate or it just tries to...

I am telling this because the default xorg.conf does not allow the nvidia cards to change the resolution. You have two options to really enable that.

1. option: use fullpanelscaling option set to NATIVE. Here is an example of a working xorg.conf with auto modelines, panelscaling set to native:

http://pastebin.com/f3c527e02

2. option: use custom modelines disabling resolution detection. Here is an example of a working xorg.conf with manual modelines, 24, 50, 60hz:

http://pastebin.com/d6bb0fbd2

Note that the hwcursor false option is only needed becasue for me in Jaunty when coming back from suspend i have the cursor "left" on the screen.
alanwww1 Wrote:Hi Rachel !

Are you completely sure that your videocard does change the refresh rate or it just tries to...

I am telling this because the default xorg.conf does not allow the nvidia cards to change the resolution. You have two options to really enable that.

I don't have the default xorg.conf; rather I have one generated and saved by nvidia-settings, where I absolutely specified 50Hz.

Here it is:

Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildd@palmer)  Sun Feb  1 20:21:04 UTC 2009

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder63)  Tue Apr 21 15:39:54 PDT 2009

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Panasonic-TV"
    HorizSync       15.0 - 68.0
    VertRefresh     23.0 - 61.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Unknown"
EndSection

Section "Screen"

# Removed Option "TwinView" "1"
# Removed Option "metamodes" "CRT: nvidia-auto-select +1680+0, DFP: nvidia-auto-select +0+0"
# Removed Option "metamodes" "1920x1080 +0+0; nvidia-auto-select +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "1920x1080_50 +0+0; nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

So even if XBMC isn't able to change the refresh rate, it should be right to start with. :-)

Quote:1. option: use fullpanelscaling option set to NATIVE. Here is an example of a working xorg.conf with auto modelines, panelscaling set to native:

http://pastebin.com/f3c527e02

I think that one might have helped. Just pasted in your screen-section Option lines instead of mine. First thing was that XBMC with resolution set to "Auto" chose to start up in 720p, but forcing resolution to "1920x1080 @ 50Hz (Full Screen)" put that right... Interestingly the Resolution menu doesn't include any "1080p" options any more, which I suppose is why it dropped to 720p on auto.

I think it's better. I'm not sure as my eyes may simply not be sufficiently concentrating after a day of staring at a computer screen for work, and a little posh cold cider to relax probably isn't helping... but on material that I was definitely having issues with before it looks almost clear. Far fewer skipped frames (I think I noticed literally just one or two), not seen the tearing effect at all.

So I'll try living with these settings for a bit and see how things go.

Skipping frames still quite noticeable on killa.sampla.x264.mkv, but I suppose that's what it's for...

TBH seeing as I have Planet Earth on Blu-Ray viewable on my PS3 and I sometimes see *that* struggle, I'm wondering if I'm just being hypercritical. :-) I think we're kind of *supposed* to be hypercritical here though. If we put up with stuff the developers don't know there's something needs fixing. :-)

Quote:2. option: use custom modelines disabling resolution detection. Here is an example of a working xorg.conf with manual modelines, 24, 50, 60hz:

http://pastebin.com/d6bb0fbd2

Note that the hwcursor false option is only needed becasue for me in Jaunty when coming back from suspend i have the cursor "left" on the screen.

Oh I don't even let it suspend. :-) Wouldn't be a way of waking it without getting up and digging out the keyboard.
Code:
Section "Extensions"
    Option         "Composite" "Disable"
EndSection

Add that to your xorg.conf and you'll probably get rid of the tearing.
bobo1on1 Wrote:
Code:
Section "Extensions"
    Option         "Composite" "Disable"
EndSection

Add that to your xorg.conf and you'll probably get rid of the tearing.

If I spot the tearing again I will. :-) So far I *think* the former changes fixed that. I didn't spot it while testing afterwards, but it is very content-dependent.
Rachel Wrote:I think that one might have helped. Just pasted in your screen-section Option lines instead of mine. First thing was that XBMC with resolution set to "Auto" chose to start up in 720p, but forcing resolution to "1920x1080 @ 50Hz (Full Screen)" put that right... Interestingly the Resolution menu doesn't include any "1080p" options any more, which I suppose is why it dropped to 720p on auto.

I think it's better. I'm not sure as my eyes may simply not be sufficiently concentrating after a day of staring at a computer screen for work, and a little posh cold cider to relax probably isn't helping... but on material that I was definitely having issues with before it looks almost clear. Far fewer skipped frames (I think I noticed literally just one or two), not seen the tearing effect at all.

So I'll try living with these settings for a bit and see how things go.

After "a bit"... it's definitely still skipping frames, at least as often as before, which makes for a bit of a jittery viewing experience, but the tearing in the top eighth of the screen seems to have gone.
pat1975 Wrote:/etc/init.d/cpufrequtils is there, if you install package cpufrequtils with apt-get.

How do I make the cpufrequtils to run to set the correct speed when I start XBMC with the ubuntu xbmc gdm session... =\ XBMC SVN 21

It's falls back to 1GHz after reboot
..Look inside /etc/init.d/cpufrequtils MIN_SPEED & MAX_SPEED and governor settings can be made there.
or better in /etc/default/cpufrequtils
Great now it works perfekt, thanks!
alanwww1 Wrote:You should try to enable resample audio option as the way xbmc syncing audio to video playback.

this way your 24fps movie will be sped up to 25fps with audio resampled. this way you can have stutterfree (just the little stutter you also see in the cinamas) playback on 50hz refresh rate. This way when you press "o" you should see the movie played back at 25fps.

You have to have the SVN version of xbmc for that and note that you can't use passthrough with this option so you have to untick the ac3 dts passthrough options in the sound hardware setup screen.

First sorry for late reply...

I read at this post => http://forum.xbmc.org/showthread.php?tid=46091
about this feature... and you can read:
Quote:Does it work with Adjust refresh rate?
Yes, it should work fine, except if you use vdpau.
Vdpau without adjust refreshrate works ok.

That works with VDPAU or not?
Would it be possible to have a setting in advancedsettings.xml to fallback to GLSL in case of quicktime .mov media?

The reason why I am asking is, that huge amount of trailers available in good quality in mov, has various playback issues(as far as I understood this is a known and common issue) with vdpau.
Rachel Wrote:If I spot the tearing again I will. :-) So far I *think* the former changes fixed that. I didn't spot it while testing afterwards, but it is very content-dependent.

Thanks to this thread I've managed to get 1920x1080@50hz working and thus enable "just scan" / 1:1 pixel mapping on my Samsung LE40A656. Previously no matter what settings I had in XBMC the Samsung would report 60Hz. Nod

Things look smooth but I still notice tiny juddering every now and then when playing 1080p content that has continous motion.

- Rachel, could you post your xorg.conf?

- Alan, did you say you had a Samsung A656?
works like a charm with my asus m3n78-em (GeForce8300 onboard). My Bios config is default (no overclocking). Using latest Nvidia driver.

My AMD Phenom X4 810 @ 2.6Ghz is totaly bored now, scaled down to 800Mhz with an average of less than 10% CPU usage while playing a 1080p movie. Woohoo!

This really kicks ass. I never had such good results on windows with the MPC HC dxva mode.

Thx so much for making this possible!!

Greetz

Doemer
It works now, yes. I don't remember which svn update fixed it, but any new build from here on out will work.

sexus6 Wrote:First sorry for late reply...

I read at this post => http://forum.xbmc.org/showthread.php?tid=46091
about this feature... and you can read:


That works with VDPAU or not?