[Raspberry Pi 4] KODI problems

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

[Raspberry Pi 4] KODI problems

Postby doragasu1 » Sun Sep 29, 2019 9:42 am

I'm having some problems with my Kodi setup running on a RPi4. I had previously Kodi running on a Pi1 with Libreelec without a problem (other than the slow menu navigation). On the Pi4 under alarm I have everything working, but I have not been able to solve two problems. The first one is specially nasty:

1. Even though I have 300 MiB or more free RAM while running Kodi, the oom_killer is sometimes triggered and kills Kodi. This can happen even when Kodi is sitting idle. For me it seems like a bug in Kodi (maybe it suddenly allocates a big amount of RAM and is killed?). Tips for debugging are welcome.
2. During playback everything runs smooth, but during menu navigation, there is tearing. Sometimes it is barely noticeable, sometimes it is massive. It seems this will be sorted out with Kodi 19, but I am writing here just in case someone has a magic solution.
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: [Raspberry Pi 4] KODI problems

Postby graysky » Sun Sep 29, 2019 11:17 am

Your issues:

1. Never seen that before. How much RAM does your Pi4 have and what else are you running on it? Do you have any swap if you're starving the system of RAM? Post the output your /boot/config.txt

2. Known issue due to gbm rendering which is not unique to pi4. You also see it on x86.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [Raspberry Pi 4] KODI problems

Postby doragasu1 » Mon Sep 30, 2019 7:05 pm

The Pi 4 is a 1 GB model. It runs a bunch of things, most notably Nextcloud and rtorrent client. When kodi is not started, free RAM is about 500 MiB. When I start Kodi, free RAM amount drops to about 300 MiB. I have not seen it drop below that amount.

My config.txt is:

$this->bbcode_second_pass_code('', 'gpu_mem=160
dtoverlay=vc4-fkms-v3d
dtparam=audio=on

# Use HDMI mode even if no HDMI monitor is detected
hdmi_force_hotplug=1
hdmi_force_edid_audio=1

# Doesn't sent initial active source message.
# Avoids bringing CEC (enabled TV) out of standby and channel switch when
# rebooting.
hdmi_ignore_cec_init=1

# Use edid.dat file instead of reading it through HDMI
hdmi_edid_file=1

overscan_left=-48
overscan_right=-48
overscan_top=-48
overscan_bottom=-48

initramfs initramfs-linux.img followkernel')

And I have no swap, but I suppose it should not be needed.
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: [Raspberry Pi 4] KODI problems

Postby graysky » Mon Sep 30, 2019 7:58 pm

160 vram is not enough for kodi... 1080p HEVC needs 280-320. Dunno about 4k but I understand it needs 320+. If you can upgrade your Pi4 to 2G or 4G given your use case, that would be best. If not, add swap and allocate 320 to vram. See if that works.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [Raspberry Pi 4] KODI problems

Postby doragasu1 » Tue Oct 01, 2019 6:38 pm

I appreciate your help, and I might in fact follow your advice and upgrade to a 2GiB model. But I don't think that using 160 MiB video RAM is what is causing my problems. I only play at most x264 FullHD content. I have not played a single HEVC file. And as I stated before, it hapens even when idle, without playing anything and with 300 MiB available RAM...
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: [Raspberry Pi 4] KODI problems

Postby graysky » Tue Oct 01, 2019 6:54 pm

A kodi debug log would be helpful plus seeing any corresponding dmsg/journalctl output.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [Raspberry Pi 4] KODI problems

Postby doragasu1 » Sat Oct 12, 2019 6:39 pm

I have just updated to the latest kodi-gbm and the problems continue.

Here are the logs:
- dmesg showing the oom_killer in action
- Kodi debug log from start to being killed

I see nothing wrong on the Kodi logs, BTW...
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: [Raspberry Pi 4] KODI problems

Postby graysky » Sat Oct 12, 2019 7:00 pm

Recommend you post to the official kodi forums
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [Raspberry Pi 4] KODI problems

Postby doragasu1 » Mon Oct 28, 2019 9:24 am

I finally tried adding 256 MiB swap, and that stopped the oom killer. But since I wanted to have no swap, I ended up following your first advice, and bought a 2 GiB model. The problem is solved, but I'm feeling there must be another, more optimum way.
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: [Raspberry Pi 4] KODI problems

Postby graysky » Mon Oct 28, 2019 9:00 pm

Never used a 1G model. Highly discourage using swap on these things... the uSD cards do not last forever. I had uSD on a Pi2 that had swap on it go bad.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Next

Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 30 guests