Kodi package crash after the update of libdrm-amdgpu1

Bug #1837170 reported by Tom Lake
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Greetings,

The last update of libdrm-amdgpu1 caused a bug on Kodi package, making it to crash after loading any video or reproduce a black image.

Version: 2.4.97-1ubuntu1~18.04.1 2019-07-03 15:07:54 UTC

  libdrm (2.4.97-1ubuntu1~18.04.1) bionic; urgency=medium

  * Backport to bionic for 18.04.3 HWE stack update. (LP: #1824111)

 -- Timo Aaltonen <email address hidden> Wed, 10 Apr 2019 13:54:06 +0300

Kodi gives this error:

#3 0x00007f47676c60aa in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4 0x00007f47676c5dd7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so

Repeated several times

#3 0x00007f475ce2c5a6 in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-8.so.1
#4 0x00007f475ce2c425 in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-8.so.1

Team-Kodi stated these errors are in relation to 'Not supported GPU drivers', when Kodi can't find these files.

I've found the cause, and a temporary solution:

This bug was caused after an update for the latest version of libdrm-amdgpu1 2.4.97-1ubuntu1~18.04.1

So I grabbed the previous version from
https://mirror.transip.net/ubuntu/ubuntu/pool/main/libd/libdrm/

installed libdrm-amdgpu1_2.4.95-1~18.04.1_amd64.deb

and now Kodi returns.

I created a bug report, the problem affects multiple users.

https://bugs.launchpad.net/ubuntu/+source/kodi/+bug/1836828

We have a PointRelease coming soon, would we have time to fix this package?

Thank you for your assistance.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libdrm (Ubuntu):
status: New → Confirmed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

radeonsi_dri.so comes from mesa, so please try with ppa:ubuntu-x-swat/updates, which has mesa 19.0.8

which one do you have currently installed? 'apt-cache policy libgl1-mesa-dri' should tell.. I'm assuming it to be 19.0.2

Changed in libdrm (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
status: Confirmed → Incomplete
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

also, this bug should happen with 19.04 too, but so far I haven't seen anyone file it

just for reference, the downgrade of libdrm probably helps because the new version enabled a new feature which the new mesa supports. With old libdrm the new DRI driver probably can't trigger the failure path.

so, pull all updates with that ppa enabled to see if it helps

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

another idea is to test the new kernel, linux-image-hwe-edge (should be 5.0 from disco)

Revision history for this message
Tom Lake (tmlake) wrote :

I've found a different problem situation:

I first applied the downgrade of libdrm-amdgpu1 2.4.97-1ubuntu1~18.04.1 to 2.4.95-1ubuntu1~18.04.1, on the first launch of a newly installed Ubuntu 18.04.2 without any of the 400 updates packages available.
This way I got package Kodi working.

Now, after I update everything to the latest version, with libdrm-amdgpu1 as well, I can no longer downgrade it. If I force it, the system will crash.

I've figured that the removal of mesa-vdpau-drivers (which also removes vdpau-driver-all) gets kodi running normally again, even with VDPAU activated on settings/player.

So that's the new solution for kodi's bug.

If I downgrade
mesa-vdpau-drivers_19.0.2-1ubuntu1.1~18.04.1_amd64.deb
mesa-vdpau-drivers_18.2.8-0ubuntu0~18.10.2_amd64.deb
kodi still won't run, only removing mesa-vdpau-drivers. This package didn't receive any update since 18.04.1 and had always been working.

I detected that the only packages required for kodi that received upgrades is libllvm8 (has no issues) and libdrm-amdgpu1, giving me the conclusion that the bug really is with libdrm-amdgpu1.

Trying your advices with mesa-vdpau-drivers installed:

Yes, the currently installed version of libgl1-mesa-dri is 19.0.2.

Installing the repo didn't work
sudo add-apt-repository ppa:ubuntu-x-swat/updates

The following packages will be upgraded:
  libegl-mesa0 libegl1-mesa libgbm1 libgl1-mesa-dri libgl1-mesa-glx
  libglapi-mesa libglx-mesa0 libwayland-egl1-mesa libxatracker2
  mesa-va-drivers mesa-vdpau-drivers

kodi's bug still remains.

I've also heard from a 19.04 user that kodi runs, maybe it's a bug caused with some hardware models or to 18.04 specific.

Is that correct?
sudo apt install --install-recommends linux-image-generic-hwe-18.04-edge

I tried it and still nothing man.
Once again, kodi will only run with the removal of mesa-vdpau-drivers.

Thank you for your time, I really appreciate your assistance.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

does it work with linux-image-hwe-edge, which should pull the 5.0 based kernel backported from disco?

Revision history for this message
Tom Lake (tmlake) wrote :

As I said, the closest package to linux-image-hwe-edge I found for installation is:

sudo apt install --install-recommends linux-image-generic-hwe-18.04-edge

That gives me the Kernel version
uname -r 5.0.0-20-generic

Unfortunately kodi didn't work, only with the removal of mesa-vdpau-drivers.

Revision history for this message
Tom Lake (tmlake) wrote :

I've tested Ubuntu Studio Bionic Beaver 18.04, and since it receives all the same updates from default Ubuntu, the results were identical.
As to disco dingo, I really prefer to go with the more polished LTS versions as a personal choice of mine.

Revision history for this message
Tom Lake (tmlake) wrote :

How could I make mesa-vdpau-drivers work?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

if you can't get it to work with the backport stack from 19.04, then I don't know what else could help

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

also, sounds like you didn't test 19.04 yourself? It's very much tied to radeon hw, so you really should test disco..

Revision history for this message
Tom Lake (tmlake) wrote :

Currently I found that downgrading these packages:

libgl1-mesa-dri_18.2.8-0ubuntu0~18.10.2_amd64.deb
mesa-vdpau-drivers_18.2.8-0ubuntu0~18.10.2_amd64.deb

I can run Kodi with every single Ubuntu package updated, including libdrm-amdgpu.

**Note: from oibaf's ppa I need only libdrm-amdgpu1 libdrm-common libdrm2 libgl1-mesa-dri vdpau-driver-all mesa-vdpau-drivers upgraded to have it running well.

I'll give disco a try, but personally I prefer LTS versions for a more solid UI experience.

I'll be here, patiently waiting for the next updates to see if I got it fixed. ;)

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

You won't be getting it fixed unless someone tells me what's needed from mesa upstream which is missing from 19.0.8. 19.0.x series is dead and won't get new upstream versions anymore...

affects: libdrm (Ubuntu) → mesa (Ubuntu)
Revision history for this message
Tom Lake (tmlake) wrote :

Timo, I think the problem is with xorg-server,
along with mesa, it was present on the latest updates when the crash came up.

When kodi tries to load a video, its window simply closes.

If switch to Wayland, it works.
But everything is very buggy with this server, it's inoperable.

Maybe there are missing guidelines for my specific AMD APU?

Revision history for this message
Tom Lake (tmlake) wrote :

Solution's found:

 ubuntu-meta (1.417.3) bionic; urgency=medium

  * Added dbus-x11 to wsl-recommends (LP: #1837466)

 -- Balint Reczey <email address hidden> Wed, 24 Jul 2019 01:21:39 +0200

I found in the server this latest version of ubuntu-desktop and installed the .deb file.

Indeed we see a correction for X11/xorg and everything works now.

However, I find odd that this package was uploaded on Thu Jul 25 21:52:21 to be sent as an update:

https://lists.ubuntu.com/archives/bionic-changes/2019-July/021433.html
http://mirrors.edge.kernel.org/ubuntu/pool/main/u/ubuntu-meta/

But I received on my system this one

[ubuntu/bionic-updates] ubuntu-meta 1.417.2 (Accepted)

Uploaded on Thu Jul 25 19:44:55 UTC 2019

And probably everyone else!

Revision history for this message
Tom Lake (tmlake) wrote :
Revision history for this message
Tom Lake (tmlake) wrote :

Please ignore the solution I commented, I committed a mistake and had vdpau disabled.

But there's this update that hasn't been released by the server.

Revision history for this message
Tom Lake (tmlake) wrote :

What's happening here?

Everything I download from this server

http://mirrors.edge.kernel.org/ubuntu/pool/main/u/ubuntu-meta/

Firefox accuses of having a virus or malware and eliminate the files.

It's an official Ubuntu North America server.

Revision history for this message
Tom Lake (tmlake) wrote :

Oh, I see incoming updates for mesa 19.0.8 in bionic as well. They're still under final adjustments then, I hope it fix my issue.

Revision history for this message
Tom Lake (tmlake) wrote :

I've tested Ubuntu 18.04.2 on 2 machines with different hardware:

- One Laptop with Intel CPU integrated graphics, it works well.

- A Laptop with an AMD APU, the problem is the same.

I use a Kaveri AMD APU on my main PC and the other person affected on this bug, another AMD APU.

So we have 3x problematic APU vs. 1x working Intel.

Recent updates came misconfigured for AMD APUs, and we're running our entire systems without VDPAU hw acceleration, not only kodi.

FYI: I've tested Disco Dingo, it has not problem with my APU.

Revision history for this message
Tom Lake (tmlake) wrote :

Should I create a new bug report on linux-firmware package?

Revision history for this message
Tom Lake (tmlake) wrote :

Please Timo, there's really a problem with AMD APUs

We are running our systems without HW Acceleration support

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I don't have a silver bullet to fix this, but you can try ppa:ubuntu-x-swat/updates which has mesa 19.1.4

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

actually, test this ppa instead:

https://launchpad.net/~canonical-x/+archive/ubuntu/x-staging

I suspect this was caused by mesa being built with assertions turned on (due to a meson bug), while disco was still fine (with a newer meson)

Revision history for this message
Tom Lake (tmlake) wrote :

Not yet mate.
Installing the packages from this ppa have the same effect of downgrading them. Kodi responds better, still there's no HW Acceleration.

I've just tested a Nvidia card using noveau and proprietary drivers, it worked well.
But it was borrowed, I'll have to return it unfortunately ;(

Revision history for this message
Tom Lake (tmlake) wrote :

I suggest you mark the importance of this bug as Critical, because it affects every single user of AMD APUs.

We have no HW Acceleration.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

what do you mean "downgrade"?

I don't see you ever tested 19.04 as I asked?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

and which ppa did you test with?

Revision history for this message
Tom Lake (tmlake) wrote :

Using Kodi as reference for the behaviour of VDPAU hw acceleration on the system:

The latest version of mesa doesn't work and makes Kodi crash when opening any video.
I figured that when I downgrade every package of mesa to version 18.2.8, kodi is now able to
run videos, but still without vdpau. The behaviour improved, but without hw acceleration.

https://launchpad.net/~canonical-x/+archive/ubuntu/x-staging

I meant that when I upgrade mesa with this package, I encounter the same behaviour of the version 18.2.8 I downgraded.

Using Oibaf's ppa is the only to get vdpau acceleration working, but the image is too dark,
it doesn't have the bells and whistles specifically optimized for Ubuntu.

I wrote earlier that I tested disco with success, vdpau runs well and nothing's necessary to add.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

so if disco works, then the bug is somewhere else than the HWE stack (kernel, xorg, mesa), and if vaapi works then you should be using that until it's known what needs backporting

Revision history for this message
Tom Lake (tmlake) wrote :

Thank you for your assistance.

Let me know when it's figured out.

Revision history for this message
dunc (dunchann) wrote :

When can we expect any update on this issue?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

no-one knows what to backport

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

please test mesa 19.2.1 from ppa:ubuntu-x-swat/updates

Revision history for this message
Tom Lake (tmlake) wrote :

Just tested your ppa with mesa 19.2.1-1ubuntu1~18.04.1~ppa2, thank you

Since mesa 19.0.8-0ubuntu0~18.04.2 the image produced by Ubuntu with all media players and browsers is very dark, like the contrast and black levels were adjusted at a very low value. It became worse than before, including yours from x-swat.

I noticed this contrast darkness increases progressively with each kernel upgrade, starting from 5.0.0-27 to 5.0.0-32; I'm using 4.18.0-15 to minimize this effect.

I tested a Radeon R7 250 card, compatible with A-10 series APUs, and got the exact same bug. So the problem is not only with AMD APUs, but with the entire AMD R7 Graphics series, if not all AMD stack.

You guys need to test more AMD hardware.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

This bug is about kodi crashing, so does it crash with 19.2.1 or not?

If you have other issues, test with 19.10 and then file them upstream.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

as for testing more AMD hw, (accelerated) media decoding is not within the scope of hw enablement as required by the OEM's (on any GPU)

Revision history for this message
Tom Lake (tmlake) wrote :

No, Kodi does not crash anymore with x-swat and since official mesa 19.0.8-0ubuntu0~18.04.2

But it's followed by another problem, it's not 100% solved.

Revision history for this message
Tom Lake (tmlake) wrote :

Kodi devs-team were very conservative they would not help and asked me to wait Ubuntu fix the bug.

Kodi is a reference to a bug that affects every graphical software installed.

I'm observing every new mesa and kernels upgrades, I'll keep informing.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

thanks for confirming that 19.0.8-0ubuntu0~18.04.2 fixed it, the reason was due to meson not using -DDEBUG before, and it is forced in this version and should avoid known assertions in the drivers

since you have some other issue now, you should file a new bug and against the kernel if it's a regression there

Changed in mesa (Ubuntu):
status: Incomplete → Fix Released
assignee: Timo Aaltonen (tjaalton) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.