Kodi Community Forum

Full Version: Hardware acceleration not working after upgrade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello again!

I recently upgraded from an old Ubuntu (12.something) running XBMC Gotham (13.something) to Linux Mint 17.1 (Rebecca), and I've run into a couple of issues to which I not only have no solution, but also not much of a clue where to even start looking. Maybe somebody here can give me a hint or point me into the right direction? (Wouldn't even surprise me if a single checkbox could help me out… ;-) )

So Kodi was easy enough to install and get working, and works great as expected—with two exceptions. This post's about the second one: I can't seem to get hardware video acceleration working again as it did before.

A couple of years ago, I decided that my home server would become the hub in my living room: a big TV would be its monitor and XBMC was the software of choice. Since the CPU is probably under-powered when it comes to decoding full-HD video and such, I installed a graphics card (I opted for a Radeon HD 6450 because of external factors and constraints) to offload the decoding.
And it worked great: after activating VDPAU and VAAPI, I've never had any issues with any video again!

That changed after my upgrade. Of course, I installed the proprietary driver for the graphic card (not sure how far along the open source ones are, but I remember having had trouble with those earlier) and played around with the settings under "System -> Settings -> Video -> Acceleration", but alas, to no avail: Even "easier" videos which I just last week watched without issues, now jerk and stutter as soon as the camera moves around a bit…

Did I forget to switch something on (or off)? Or does the issue lie with the OS, or maybe the (proprietary) drivers?
(Is there a way to check if the decoding is being done via software or hardware, maybe through some debugging option?)
I know it's not the hardware since, as I said, the exact same hardware used to work a couple of days ago before the upgrade.

Any ideas?

Thanks for your help!
Nicola

PS: One more thing that might be of interest: With the old setup, when I would connect via VNC, I would stare at a black screen when XBMC was running—it seemed that when XBMC started, something "took over" the rendering (the graphic card or, rather, its drivers?) so that my VNC client couldn't display anything anymore. When XBMC wasn't running, VNC worked flawlessly. On the new system, VNC works just fine and is displayed correctly even with Kodi running: Is this maybe a sign that something is indeed set up and running differently? That hardware decoding isn't running and thus the graphics card isn't "taking over" the decoding?
Re: VNC
I don't use VNC, but I do use Teamviewer, and in my experience using "Fullscreen" (not use a fullscreen rather then true fullscreen) when remoting in would be a black screen, until you hit "\" and used window mode. (I use Windows though).

Are you sure your sound settings are correct? This can cause video jerkyness as well.

Check to see if hardware acceleration is being used when you play a movie and hit the "o" button.
(2015-01-09, 19:26)helta Wrote: [ -> ]Re: VNC
I don't use VNC, but I do use Teamviewer, and in my experience using "Fullscreen" (not use a fullscreen rather then true fullscreen) when remoting in would be a black screen, until you hit "\" and used window mode. (I use Windows though).

Thanks for the tip: Though to be honest, I try to avoid closed-source software as much as I can. Also, as I wrote, VNC works for me. (I had issue previously, but then only when XBMC was in full screen—and in those cases I wouldn't need to use VNC to begin with. ;-) )

Quote:Are you sure your sound settings are correct? This can cause video jerkyness as well.

Sound is fine; I double-checked, just to be sure. Audio goes trough HDMI, so it's correct.

Quote:Check to see if hardware acceleration is being used when you play a movie and hit the "o" button.

Thanks! "o", that's what I was looking for!
So now I have a bunch of data—how do I interpret it?

I'll copy an example output:
Code:
D(Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 b/s)
P(aq:99%, Kb/s:1653.28, att:0.0 dB)

D(Video: h264 (High), yuv420p, 1280x720 [SAR: 1:1 DAR 16:9])
P(fr:25.000, vq:99%, dc:ff-h264, Mb/s:2.02, drop:0, skip:4, pc:none)

C( ad: 0.000, a/v:-0.014, edl:-, dcpu: 1%acpu: 0% vcpu: 0% cache:0 B 97%)
W( fps: 37.94 CPU0: 82% CPU1: 80% )

Can anybody help me decode this information? Is the hardware (-> GPU) or the software (-> CPU) decoding it?

Nicola
It's me again,

after trying out all three available graphic drivers and toying around with any display setting I could find, I had the glorious idea to try out a different media player. (Shouldn't that have been my first approach? Oh man… xD )

Anyway, I was surprised at how bad not only the video jerked (even videos I watched flawlessly just last week), but also how bad the quality was in general. I looked through the video settings (from the overlay), but nothing wrong jumped at me.
So I played the same video file through VLC. Video is flawless.

Forget that the quality of the video is kinda crappy; also, it's a crop of a badly taken up-close photo of my TV—you can still see quite a difference!
This is what Kodi renders:
Image
And this is VLC:
Image
Again, same machine, same video file.

What's going onHuh :-(

Nicola
Ask the Debug Log please.
Hello!

I'm in a bit of a rush, but I managed to post a copy of the log right here.

Do you see any indication of any issue?

Nicola
UDATE: Since it seems not to be related to hardware acceleration (at the very least it's an issue internal to Kodi), I updated and started a new thread.

You can find it here.

Nicola
Quote:Of course, I installed the proprietary driver for the graphic card

that was probably your biggest mistake in setting up this machine. The proprietary ATI gfx driver for Linux is a big piece of crap. I bothered with this shit for quite some time as I implemented hw acceleration for xvba (which I never submitted to the mainline repository). This driver should be banned from earth. Don't waste any time with it.

EDIT: I forgot to mention that you won't get any hw acceleration with this driver when using Kodi.
Hey!

(2015-01-11, 21:59)FernetMenta Wrote: [ -> ]
Quote:Of course, I installed the proprietary driver for the graphic card

that was probably your biggest mistake in setting up this machine. The proprietary ATI gfx driver for Linux is a big piece of crap. I bothered with this shit for quite some time as I implemented hw acceleration for xvba (which I never submitted to the mainline repository). This driver should be banned from earth. Don't waste any time with it.

EDIT: I forgot to mention that you won't get any hw acceleration with this driver when using Kodi.

I'm sorry, but I have to disagree with you.

I'm 100% on your side about the proprietary driver being (not only in principle because of its proprietary nature) to be "less than ideal", but it did solve a bunch of issues I had with the open source one. (Mainly, it was impossible for me to make it so I would see the whole displayed image—about 15px per side were "out of range" from my monitor—out of the box, without installing the proprietary driver.)

Also—when it used to work correctly—XBMC wouldn't do hardware acceleration with the open source driver, while it worked perfectly after installing the closed source driver. So it did more than do wonders for me (the CPU is not powerful enough to decode 1080p stuff, which is a joke for the graphics adapter…).

Cheers,
Nicola
In what topic do you disagree with me? That the driver is crap or that you won't get any hw acceleration wit this driver and Kodi?
Hi!

(2015-01-11, 22:42)FernetMenta Wrote: [ -> ]In what topic do you disagree with me? That the driver is crap or that you won't get any hw acceleration wit this driver and Kodi?

With this one:
(2015-01-11, 21:59)FernetMenta Wrote: [ -> ]EDIT: I forgot to mention that you won't get any hw acceleration with this driver when using Kodi.

I do get hardware acceleration with this driver when using VLC.
I do get hardware acceleration with this driver when using XBMC Gotham.

Are you telling me the the combination of "this driver" and "Kodi" is what's stopping me from getting hardware acceleration?! :-o
That would be…a pity. :-( Do you have a source for this information?

Nicola
(2015-01-12, 00:09)NicApicella Wrote: [ -> ]Are you telling me the the combination of "this driver" and "Kodi" is what's stopping me from getting hardware acceleration?! :-o
That would be…a pity. :-( Do you have a source for this information?

Consider me as the source of information. I am the main developer of this part of the application.
There is no glory history with this Catalyst driver. In case I did not make myself clear what I think about this piece of crap: it is just crap when it comes to the use case of video playback. Catalyst has an API for hw acceleration called XvBA, actually and API nobody was in need for because there is already VDPAU (created by NVidia) and VAAPI (created by Intel).
Application developers did not embrace XvBA and a someone crated a wrapper around VAAPI to use XvBA. This has never worked reliably and we made XBMC support XvBA directly. This worked much better then the VAAPI wrapper but because of some missing pieces in the driver we never merged this work into our main repository.
In the meantime AMD decided to assimilate this wrapper and Catalyst has become a bigger piece of shit. With availability of VDPAU in the Radeon OSS driver I stopped installing Catalyst on my systems. Since there is no testing on this platform which never has worked, I have disabled VAAPI support for non-Intel drivers. Nevertheless fritsch has a heart for the misguided Catalyst users and created an advanced setting to allow this combination: https://github.com/xbmc/xbmc/commit/bfd9...3386cbd565

Please don't complain about anything not working when using this.
Hey!

Wow, that's awesome! Finally all the information I need to understand what's going on! Thank a lot for it!!
Things are finally starting to make sense. ;-)

Thanks also for the link—I'll keep that in mind, but as per your advice, I'll first explore other avenues.


Being a thorough person, after reading your reply, letting it sink in, and toying around with a couple of ideas in my head, I do have some follow-ups. :-)

OK, so if the driver appears to be the culprit, I thought I could give the open source one another shot. So I disabled the Catalyst driver and activated `xserver-xorg-video-ati` (version 1:7.30-1ubuntu3.1). I then proceeded to see how well upscaled video would play back. To my surprise: with VLC and mplayer videos run nice and smooth—Kodi still looks terrible.
So…what's the deal? I thought it was the driver? :-?

Confused (and before turning to the option provided in your link), I started looking around to maybe try and install Gotham (since that used to work) by building from source and give it a shot on the newly upgraded system. Since I was pressed for time, I tried another way: I set up a multiboot system with YUMI with both `xbmcbuntu-13.0~gotham_am64.iso` as well as `kodibuntu-14.0~helix_amd64.iso`. I also copied one 540p video (of a concert) as well as an action-loaded 720p video (a trailer) onto a usb drive.
Well, now it got interesting. On a "blank" system, would any difference show up between XBMC and Kodi?

Turns out, both xbmcbuntu and kodibuntu ran both files perfectly. Smooth and nicely scaled and everything.
Even the RSS-feed that stutters on Kodi/Mint scrolled smoothly!


So again, I'm at a loss.
On the same hardware, video files:
  • run smoothly on xbmcbuntu,
  • run smoothly on kodibuntu,
  • run smoothly in VLC and mplayer on Linux Mint,
  • DO NOT run smoothly in Kodi on Linux Mint.

Is it maybe possible that Kodi's settings have been corrupted? Do you think erasing them and starting from a blank slate would help at all?
Is Kodi broken? Or Mint's support for it?
Did I install a "wrong version" of Kodi?


Regards,
Nicola
Did you follow all the steps as described here? http://forum.kodi.tv/showthread.php?tid=174854

You did not mention that you installed vdpau with the Radeon driver. Neither you gave any info about versions.
Hello!

(2015-01-13, 09:03)FernetMenta Wrote: [ -> ]Did you follow all the steps as described here? http://forum.kodi.tv/showthread.php?tid=174854

You did not mention that you installed vdpau with the Radeon driver. Neither you gave any info about versions.

Ehm…I don't really understand what you're getting at. I did not "install vdpau with the Radeon driver"—my issue seems to lie somewhere else.

As a matter of fact, on the same machine and hardware without changing any settings from the defaults (in particular, WITHOUT installing ANY drivers or patches or third-party tools):
  • If I start xbmcbuntu (13.0 Gotham), playback is fine.
  • If I start kodibuntu (14.0 Helix), playback is fine.
  • If I start Linux Mint (17.1 Rebeca) and run VLC (2.1.4-0ubuntu14.0), playback is fine.
  • If I start Linux Mint (17.1 Rebeca) and run Totem (3.10.1-1ubuntu4), playback is fine.
  • If I start Linux Mint (17.1 Rebeca) and run Kodi (2:14.0~git2014122), PLAYBACK HAS ISSUES.

What does this have to do with any drivers, patches, or even the link you provided?

Thanks and regards,
Nicola
Pages: 1 2 3