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-01

Drag0nFly

I can't find anything in the Intel gfx doc that it supports multiple X screens.
Why do you want to set up multiple X screens? Have you tried extended desktop? This works well on AMD. On NVidia you need separate X screens in order to prevent from tearing.


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

@FernetMenta – unsure what you mean with extended desktop. Do you mean spanning desktop? One large res. for X?
I didn't realize that multiple X screens was something the Intel driver would have to support explicitly, thought it certainly explains why no
matter how much the X config was tweaked it still was using one, i.e ":0.0" display.

However, the reason I wanted it to be separate is because –

a) window focus (for keyboard input) gets lost. This is one of the minor issues, as it can be fixed by simply clicking on the minimized XBMC instance.
b) XBMC (or X) is grabbing the pointer (even when passing the '-nocursor' option) and trying all kinds of workarounds (wmctrl, etc.) to prevent this behaviour is ineffective

and most importantly–

c) The screens get switched around–i.e, although the xbmc.bin process is running (with the -standalone -fs opts), X tends
to want to show a basic screen backdrop if you try to do anything useful on the other display.

So there really is no way to run separate X screens on Intel? Since I was seeing (major) tearing when using the most recent HD4000 01.org drivers,
it looks like the resolution for the old LCD is interfering in some way.

Really can't see why this should be so hard on Linux (which is what I use the most). However, I did run XBMC 12.2 on OSX with another built in Intel GPU (HD3000) and it works flawlessly–simply start XBMC once, tell it to use HDMI2, then every time that port is connected it launches seamlessly and lets you use the regular desktop as usual.

Maybe I'll have to switch to Wayland. Wink


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

b) xvba version does not grab the pointer. you can have XBMC fullscreen on one monitor and move the mouse out. Once the window has lost focus, the keyboard in ungrabbed.

c) you certainly can't launch XBMC standalone when using multiple monitors.
EDIT: of course you can, but makes no sense

we do easier when using correct terms here:
- a display device spans a virtual screen
- an output (Monitor) defines a view to that screen

So having only one screen should work ok (not on NVidia because of tearing). use xrandr an set out outputs leftOf or rightOf the other.

You can run xbmc-xrandr to see the information XBMC gets. (please post this output).

Quote:Really can't see why this should be so hard on Linux

Don't blame Linux Smile I have tested this on AMD and NVidia where it works.


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

@FernetMenta–Thanks for your input; I'll do some more tests on this later in the week and let you know (a little busy with work outside of weekends).
Guess what I really want to do is to simply run XBMC as a daemon during bootup Wink, but hopefully there is some workable solution to play alongside the
DE. I am starting to think that Cinnamon (the Mint DE) is not playing nice either as I seem to recall the pointer behaviour was different using XFCE & Enlightenment.


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

Note that XBMC depends on the X session, hence you can't launch it as a daemon. If you want to use a multi-monitor setup, you should launch XBMC in autostart of your window manager.


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

Of course. But it can be launched as an upstart job/rc-script or via inittab by spawning an X server along with it using xinit. This was actually halfway working–I was able to start one screen on :0 (for desktop usage) and another on :2, for XBMC. But once the second instance was started, VT-switching prevented use of the first screen (despite passing '-novtswitch' to X). Which is why it feels–to me at least–like the general X design might be a little archaic for these purposes.

Then again the DRM-locking would probably prevent any real use on all but one of the X instances (whichever one is talking directly to the GPU at any given point); the machine is obviously more than powerful enough to run most things without GFX optimization.

It would be interesting if this would be workable using DirectFB/EGL or Wayland (whenever that is ready for production use). But anyway, this is a little off-topic. Smile


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

Here is some reading, I guess this is the same use case you are looking for:
https://github.com/FernetMenta/xbmc/pull/119

NVidia has no problem configuring multiple X-screens. It's been a while as I did testing on AMD but it worked well with a single X screen and multiple monitors. Unfortunately my Intel system is broken.

Wayland and this upcoming Mir crap will make our lives harder. How should we keep audio/video in sync with deferred rendering of video. The current code won't work well with those technologies.


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

Interesting. Yes, it appears that this functionality is similar to what I am trying to achieve (minus the dual GFX cards, which shouldn't make much difference to XBMC anyway). Also didn't realize that the default behaviour was to revert to a 2nd display if the main display timed out.

btw. – I certainly don't know the details regarding the rendering mechanism for Wayland, but at least from looking at the various FAQs it appears that this is quite flexible (using Cairo either to purely software-render or render via OpenGL or 'true' hw-accelerated OpenGL). There also was (as I'm sure you are aware of), an initial port of XBMC to Wayland published here: http://smspillaz.wordpress.com/2013/02/27/hello-from-xbmc-on-wayland/)

It sounds strange if both Mir & Wayland would impose these limits on a next-gen display server.(?) I know there has been some controversy with the whole Mir vs. Wayland debacle initiated by Canonical though; and not all changes they bring forth are always welcomed (to put it mildly). But whichever implementation they choose will probably end up being the default.


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

NVidia and AMD won't support Wayland or Mir in the near future. Hence users who rely on hw acceleration on those platforms can't move to Wayland.
What is the benefit of those architectures for HTPC and video playback? I don't see any. They move away from a direct rendering context to a more complex solution. It may be useful for desktop apps but I don't see any advantage for this domain here.


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

(2013-07-01, 12:08)wsnipex Wrote: /wsnipex hands fernetMenta a bronze medal Smile

and since there were no updates in the xbmc-xvba ppa for 2 months, it really was time for a new version, so there it is:

version: 2:13.0~git20130627.0500-9372af7-0raring
notable changes:
- ffmpeg 1.2
- X11, multimonitor improvements and fixes
- video renderer improvements

I updated my install on Ubuntu 12.10 to this build (using apt-get dist-upgrade as otherwise the update of XBMC was held back). I use TVHeadend as PVR backend and the add on stayed at version 1.7.19 which failed as XBMC requires 1.8. All fine having built version 1.8.19 but not sure whether I did something wrong when I updated or if the PPA needs to be updated to include a newer build of TVH add on.


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

(2013-07-01, 12:08)wsnipex Wrote: /wsnipex hands fernetMenta a bronze medal Smile

and since there were no updates in the xbmc-xvba ppa for 2 months, it really was time for a new version, so there it is:

version: 2:13.0~git20130627.0500-9372af7-0raring
notable changes:
- ffmpeg 1.2
- X11, multimonitor improvements and fixes
- video renderer improvements

Somehow this update removed all the advanced options in System ->Video->Playback Sad

If I play a video it uses XVBA, that is for certain (my CPU is incapable of doing 720p), however, for some videos (mostly WEB-DLs and high quality 720p/1080p) I get rendering artifacts using XVBA, and I have to switch back to VAAPI (which strangely enough works perfectly, albeit a bit less 'smooth' in my experience).
But now I can't switch back because all the VDPAU, VAAPI, XVBA, sync etc. options have gone missing Sad

Anyone know what is going on?


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

There are switches now for advanced settings, if you can't open the left hand side menu for it if you're in the video settings your skin probably doesn't support that yet switch to confluence, turn on expert settings and switch back to your skin afterwards.

Also sadly this build is missing some fixes regarding random pvr channel switching, if anybody is using pvr it's probably a good idea to wait with updating.


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

(2013-07-03, 09:44)ursli Wrote: There are switches now for advanced settings, if you can't open the left hand side menu for it if you're in the video settings your skin probably doesn't support that yet switch to confluence, turn on expert settings and switch back to your skin afterwards.

Also sadly this build is missing some fixes regarding random pvr channel switching, if anybody is using pvr it's probably a good idea to wait with updating.

Thanks for your quick reply, solved my problem! Smile


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

Allright, I did some more tests yesterday after upgrading XBMC Xvba to 13.0-ALPHA5 Git:9372af7 and also after making sure the Intel drivers were up-to-date as well.

It looks like the '-standalone' option caused the erratic mouse behaviour I was seeing, since after removing it XBMC launches the same way as on OSX (i.e, immediately grabs the correct output port, HDMI2, and leaves it minimized in the dock.)

However–and this is a big however–the video playback now behaves as if the window is just running maximized. The output is extremely juddery with tearing all over the place. The XBMC settings do tell me that it is running in fullscreen as opposed to in a window (also tried changing this+re-launching and also moving the output from HDMI1 to HDMI2 to see if it detected it correctly the second time around.)

This also made me remember why I was using the '-standalone' option to being with: without it all but the most basic video options are unavailable. That is, no refresh-rate setting (although I verified it was using 23.99Hz which was set previously), no hw acceleration settings (VAAPI, VDPAU), no sync settings, etc. One can only see the resolution and the fullscreen/window setting + output device.

Relevant logs from this test session–

XBMC log: http://pastebin.com/v7D7rjjF
Xorg log: http://pastebin.com/423VPxEr


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

Hi guys,
I have some questions about the advanced settings:
Code:
<advancedsettings>
   <loglevel hide="false">0</loglevel>
  <cputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
  <gputempcommand>/usr/bin/aticonfig --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,," | sed 's/$/ C/'</gputempcommand>
  <gui>    
    <algorithmdirtyregions>3</algorithmdirtyregions>
    <nofliptimeout>0</nofliptimeout>
  </gui>    
<video>
  <latency>
    <delay>0</delay>
    <refresh>
      <min>23</min>
      <max>24</max>
      <delay>175</delay> <!-- set to zero or adjust if audio seems out of sync with 24p movies -->
     </refresh>
  </latency>
</video>
</advancedsettings>

For example, the way used for getting the temperature doesn't work, as
/usr/bin/aticonfig --od-gettemperature
always prints out something odd
neither I can get any reasonable value for CPU temperature with my A10.
Then I'd like to know about the <video> section, what is the reason for that?

Thanks,
Claudio