Kodi Community Forum
How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs (/showthread.php?tid=116996)



RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - FernetMenta - 2013-07-03

Drag0nFly:

Use the blade lhs on the settings page for changing to advanced or expert mode. This will bring back settings like vdpau, sync, etc.

Yes, the standalone option enables to set refresh rate for desktop resolution. When running in a window manager, you can either preset desktop resolution or use xrandr and change while xbmc is running.

As already mention I currently don't have an Intel system for testing. NVidia system show tearing as well when having more than one monitor (and both on) on a single X Screen. Works on AMD, fglrx.

Please enable debug logging in advances setting. Your log does not show very much.


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - Drag0nFly - 2013-07-03

@FernetMenta–thanks for the quick reply. I will do some more testing (with debug enabled–sorry, forgot to activate that as I grabbed the logfile after the fact), but it is curious that XBMC does not set the optimal config when starting it without the '-standalone' option. It would be useful if these options were displayed by default when running it non-standalone.

I am also a little unclear as to which acceleration it is supposed to be using. The X server activates SNA by default, and then you have the VAAPI stuff in addition to Xvba. Should this be disabled/accel changed to uxa?

The Intel driver does have a "TearFree" option which I havent properly tested yet, btw., but it appears that something else is fundamentally wrong here. The acceleration stuff is working on the desktop-side, so it is either an incompatibility with XBMC or XBMC itself.

Hopefully we'll figure what is going on soon, as I really want the new XBMC box up and running!


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - FernetMenta - 2013-07-03

Quote:but it is curious that XBMC does not set the optimal config when starting it without the '-standalone' option.

The application which controls your desktop is supposed to set desktop resolution. When running xbmc in standalone mode, xbmc is the desktop. Otherwise your window manager is your desktop and should have control.


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - digi_joe - 2013-07-03

(2013-07-01, 11:41)Crypdos Wrote: I'm a bit confused about the graphics driver I need. I installed the 13.6 beta driver by "wgetting" the zip, unzipping and running the .run file. If i'm right I installed the proprietary driver instead of the fglrx driver, right?

Movies are working great, but TV channels are giving me problems. Especially SD channels. Every ~2-3 seconds the picture speeds up to catch up, and fast scenes generally don't look smooth at all (I did enable deinterlacing). I don't know what phenomenon this is? Smile

Is this caused by getting the wrong driver? And what settings do I need to enable? Just XVBA, or do I still need VDPAU or VAAPI?

Ubuntu 12.04, Radeon HD6450 with latest xbmc-xvba "tested" version.


I had exactly the same behaviour when I installed the new 13.6 driver. Since I need the 3.8 Kernel to get the suspend to work I couldn't switch bach to an older driver. Changing to the testing repo of xbmc did solve the problem. So probably the new update in the xmbc-xvba repo also solves the problem.


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - metheos - 2013-07-04

Just updated to 2:13.0~git20130627.0500-9372af7 and am having an audio problem that I did not have with the previous version.

On startup from boot using lightdm the audio does not play. In the settings at this point the wrong audio device is selected and pass-through is disabled.

after executing a `killall xbmc` lightdm relaunches xbmc and everything goes back to the way it should be with the correct device selected for both audio and pass-through (which is now enabled).

I saw some things in the forums about lightdm not waiting for audio devices to initialize, so I tried the suggestions of adding some conditions to the lightdm startup script as well as a `sleep` before it executes lightdm. This made no difference, even with a sleep of 5 minutes.

It seems all that is required is to kill xbmc and let it relaunch, for the time being I have added a shortcut to the programs section to let me kill xbmc with my remote when I need to reboot, any thoughts on how to automatically accomplish this, or better yet to fix it?

I've linked to the failed and successful runs below.
I'm not sure what additional logs would be relevant, so let me know which, if any, would be helpful.

Failed: http://pastebin.com/3hG0zY1a
Successful: http://pastebin.com/BDgFY5eW

You'll notice that there are audio devices detected in the second run that are not shown in the first, remember these are seconds apart.

I'm guessing something to do with HDMI 'hotplug' detection?

Update:
Removing pulseaudio seems to have fixed the issue. Thanks wsnipex!


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - wsnipex - 2013-07-04

it is exactly the problem with xbmc starting too soon. The "failed" log is missing the hdmi device.
Double check the workarounds, they DO work.
You also might want to get rid of pulseaudio...


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - Drag0nFly - 2013-07-04

Some progress to report now for my Intel HD4000 setup. The 'TearFree' option did indeed do what it was supposed to, so the excessive tearing is now gone.
However, the video is still far from smooth. A constant judder is happening every second on the otherwise 'fluid' video. The CPU utilization is constant at around 30% when viewing 1080p video (tested with several source MKVs and MP4/M4V streams.), so it is not caused by decoding bottlenecks. (The CPU is an i3-3225, running at 3.5Ghz)

It also appears that the tearfree option depends on SNA acceleration, as the tearing was re-introduced using UXA with TearFree=1.

So basically what I've now done is–

o Disabled pulseaudio

o Ensured that HD audio codecs are disabled (since I know this can affect the decoding and sync of the streams). I'm using audio pass-through to the S/PDIF toslink (optical) device. Audio (DD5.1/DD2.0) is flawless and in-sync.

o Tried basically every combination of acceleration methods–VAAPI, Xvba, VDPAU – running with just VAAPI or just Xvba enabled produces an identical result (which I found curious). Naturally the XBMC instance has been restarted after these changes have been made.

o Played with different A/V sync options, no change.

o Tried running XBMC under the following DEs–Cinnamon (default), Cinnamon 2D (XBMC doesn't work at all), Enlightenment DR17 (same behavior), XFCE4 (same behavior)

The affected videos are not only 24Hz streams–50Hz is being displayed non-smoothly as well

Logs:

XBMC log: http://pastebin.com/tzAkQMvd
Xorg log: http://pastebin.com/siqTSbd7
xbmc-xrandr -q: http://pastebin.com/c2UnApDX

vainfo:

libva info: VA-API version 0.33.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_33
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.33 (libva 1.1.1)
vainfo: Driver version: Intel i965 driver - 1.0.20
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD

btw., after the driver upgrade the XBMC startup is now perfect; both running without the '-standalone' option and with it enabled (only way to see the refresh rate). It is also staying on HDMI2 when that display is powered off, which is good.


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - metheos - 2013-07-04

(2013-07-04, 10:18)wsnipex Wrote: it is exactly the problem with xbmc starting too soon. The "failed" log is missing the hdmi device.
Double check the workarounds, they DO work.
You also might want to get rid of pulseaudio...

Here is my lightdm.conf file.
http://pastebin.com/fv0qVpAM
As suggested in the workarounds I added 'and stopped udevtrigger' to the conditions and a 'sleep' command (currently at 300 seconds....) before lightdm is started. As I stated before, this appears to have no effect.

I'm not convinced this is the same issue those people are having, I still have audio devices being detected where the error they are stating is 'Under Settings/System/Audio output it says "Error - no devices found" for Audio output device and Pasthrough output device.'

I'll look around and see about removing pulseaudio.

Update:
Removing pulseaudio seems to have fixed the issue. Thanks wsnipex!

Here is the log from the now working first run
http://pastebin.com/jqPNUM0S


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - FernetMenta - 2013-07-04

Disable xvba and vdpau, you are on Intel platform which uses (should use) VAAPI. Your log shows it doesn't. Maybe the log is from an attempt with xvba.

Cinnamon is a bad choice, like all window managers using composition. You don't get smooth playback on other platforms either using those.


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - deadite66 - 2013-07-04

open source UVD (ubuntu saucy drm-next 2013-07-04) is getting much better, video appear to play at the correct speed now but the graphical glitches are still there.


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - Drag0nFly - 2013-07-04

I have disabled Xvba and VDPAU. As mentioned I have tried all combinations of those three acceleration engines. VDPAU obviously doesn't start since I'm not on Nvidia.
I've also tried running with none of these enabled–same result. The same goes when just using VAAPI (see below log). I notice also that the log does not reflect which type of acceleration is being used when using Xvba, which as you correctly noticed is the latest log, so this was verified using the settings menu. I've also tried using the different rendering mechanisms (even software) to no avail.

Which DE do you recommend using? As I mentioned, I've tried XFCE4, E17 and Cinnamon 2D with no graphics effects–which didn't even work. So far running it from the normal Cinnamon DE works well and behaves the same as the others (even better in some cases)

However–why shouldn't a modern compositing window manager play along with XBMC on Linux? I'm running all kinds of composite effects with Quartz Extreme/Core Image when running XBMC on OSX with my HD3000 box, and it certainly does not impact performance at all; even for high-bitrate pure Blu-Ray rips. I have six separate desktops on that system with about 30 Safari instances + other apps running at the same time.

Log using VAAPI: http://pastebin.com/x1ZCbZUR (truncated in the middle due to pastebin file size limits)

There has got to be something else going on here. The judder behavior is constant, so it looks to me like the video processing is being hindered somehow. If this was a system or DE problem I should be seeing this behavior when running VLC or MPlayer as well, which I am not.


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - FernetMenta - 2013-07-04

Now the logs stats that vaapi is used. No dropped/skipped frames are indicated in the log, so I think the issue which causes judder must occur after xbmc has rendered.

With a light weight WM and a direct rendering context there's not much after XBMC hands over to OpenGL. With composition we have no influence on what's happening after.

Video playback is real-time processing and has other requirements as fancy desktops. Those desktops require lots of resources which are not available for video then.

I use Fluxbox for use with XBMC.


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - wsnipex - 2013-07-04

with the current settings, login to the xbmc standalone session. it should not stutter there


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - Drag0nFly - 2013-07-04

I will test again with Fluxbox and the standalone session (obviously that cannot be used on a day-to-day basis as I need the desktop for other purposes as well)
It may well be a deficiency in the Intel Linux drivers for all I know. I don't know when the TearFree option was introduced by Intel, but it made a night-and-day difference on the playback.

Since I am a Linux user at heart I am hoping to have this solution working as well as the one on my hackintosh (which required little tinkering apart from disabling VAAPI, due to a flaw in Apple's drivers which sometimes exhibits graphical glitches in certain scenes.)


RE: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - fritsch - 2013-07-04

xbmc does not need this "TearFree" option. Intel uses VerticalBlank Sync without any further tuning. Just set "Vertical Blank Sync" to "Let Driver choose" in xbmc settings. Intel has a bug of causing high load, when Always Enabled is chosen there.

For amd / nvidia choose instead Always enabled.