dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5805
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Last big update for Rasbian - 4h 30/07/2021

Tue Aug 03, 2021 10:09 am

Yabbie wrote:
Tue Aug 03, 2021 1:02 am
Just now, I did a sudo apt update, but all packages are up to date. Does that mean the fix hasn't gone 'live', or is there some other way/thing I need to update?
It's currently just available by runnning rpi-update (used for testing). It should appear in apt in the next few days.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5805
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Last big update for Rasbian - 4h 30/07/2021

Tue Aug 03, 2021 10:29 am

Yabbie wrote:
Tue Aug 03, 2021 1:18 am
Are you able to tell me what what value I should have for gpu_mem to get the best performance for 4K playback with my setup?
On the 5.4 kernel using Kodi 18 (Leia) hevc buffers were allocated from gpu_mem, and as such you needed this to be large (e.g. > 256M) for 4K video.
The 5.10 kernel moves this allocation to cma, which removed the need for a large gpu_mem setting.
Unused gpu_mem is wasted, whereas unused cma can be used by normal linux apps, so moving to cma is beneficial.

3d using the legacy driver on pi0-3 uses gpu_mem, but the new arm driver (using kms or fkms) doesn't use gpu_mem. Pi4 has only ever supported the arm driver.

The gpu codecs (h264 on Pi4 and h264, mpeg4, mpeg2, vc1) also use gpu_mem, but as they don't support 4K, the amount needed is smaller.

On Kodi 19 (matrix) the default gpu_mem of 76M is enough (that is LibreELEC is using). Kodi 18 (leia) may need a bit more.

So, if you are using Kodi 18 (the default in repo currently), I'd expect gpu_mem=128 to be enough on Pi4.
If you only play hevc, then I believe you can use the default.

Yabbie
Posts: 11
Joined: Mon Oct 12, 2020 5:02 am

Re: Last big update for Rasbian - 4h 30/07/2021

Wed Aug 04, 2021 1:27 am

Thank you so much for the clarification dom, I truly appreciate it.

I'm using the latest kernel (5.10) with the latest Kodi 18 from the repo.

Everything seems to have improved with the latest update (I used to have issues playing back some h265 mkv files), apart from now, playback of mp4 files doesn't seem to work at all. I only have a couple, so it's not the end of the world, but I'd love to know what's going on? Used to work fine before the update.

Thanks again.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5805
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Last big update for Rasbian - 4h 30/07/2021

Wed Aug 04, 2021 10:24 am

Yabbie wrote:
Wed Aug 04, 2021 1:27 am
Everything seems to have improved with the latest update (I used to have issues playing back some h265 mkv files), apart from now, playback of mp4 files doesn't seem to work at all. I only have a couple, so it's not the end of the world, but I'd love to know what's going on? Used to work fine before the update.
Posting mediainfo of one of the files would help (mp4 is a container, it can contain different codecs, which is more likely the relevant thing).

Yabbie
Posts: 11
Joined: Mon Oct 12, 2020 5:02 am

Re: Last big update for Rasbian - 4h 30/07/2021

Thu Aug 05, 2021 2:07 am

dom wrote:
Wed Aug 04, 2021 10:24 am
Yabbie wrote:
Wed Aug 04, 2021 1:27 am
Everything seems to have improved with the latest update (I used to have issues playing back some h265 mkv files), apart from now, playback of mp4 files doesn't seem to work at all. I only have a couple, so it's not the end of the world, but I'd love to know what's going on? Used to work fine before the update.
Posting mediainfo of one of the files would help (mp4 is a container, it can contain different codecs, which is more likely the relevant thing).
Mediainfo below, this used to work fine before the update.

Code: Select all

Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/iso2/mp41)
File size                                : 245 MiB
Duration                                 : 47 min 36 s
Overall bit rate                         : 720 kb/s
Encoded date                             : UTC 2019-09-13 13:10:08
Tagged date                              : UTC 2019-09-13 13:10:08
Writing application                      : HandBrake 1.2.2 2019022300

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main@L4@Main
Codec ID                                 : hvc1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 47 min 36 s
Bit rate                                 : 456 kb/s
Width                                    : 1 436 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Variable
Frame rate                               : 23.976 (24000/1001) FPS
Minimum frame rate                       : 15.873 FPS
Maximum frame rate                       : 23.981 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.012
Stream size                              : 155 MiB (63%)
Encoded date                             : UTC 2019-09-13 13:10:08
Tagged date                              : UTC 2019-09-13 13:10:08
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Menus                                    : 3
Codec configuration box                  : hvcC

Audio
ID                                       : 2
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo
Codec ID                                 : mp4a-6B
Duration                                 : 47 min 36 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Compression mode                         : Lossy
Stream size                              : 87.2 MiB (36%)
Title                                    : Stereo
Writing library                          : LAME3.100
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
Encoded date                             : UTC 2019-09-13 13:10:08
Tagged date                              : UTC 2019-09-13 13:10:08
Menus                                    : 3

Menu
ID                                       : 3
Codec ID                                 : text
Duration                                 : 47 min 36 s
Language                                 : English
Encoded date                             : UTC 2019-09-13 13:10:08
Tagged date                              : UTC 2019-09-13 13:10:08
Menu For                                 : 1,2
00:00:00.000                             : Blue Harvest
00:05:42.113                             : Vader's Gamble
00:09:19.705                             : Rebel Without a Rebellion
00:14:01.237                             : Off on an Adventure
00:21:34.439                             : So Long Alderaan
00:27:07.189                             : Getting Trashed
00:32:56.788                             : Run Luke Run
00:38:09.308                             : X-Wing-Ing It
00:43:39.471                             : "Use the Force"
00:46:41.779                             : End Credits
Bit rate mode                            : VBR

tom56
Posts: 2
Joined: Mon Dec 16, 2019 12:51 am

Re: Last big update for Rasbian - 4h 30/07/2021

Thu Aug 05, 2021 4:37 pm

jamesh wrote:
Mon Aug 02, 2021 4:34 pm
Yabbie wrote:
Mon Aug 02, 2021 2:08 pm
Why did having the large gpu_mem (I had 360) break everything? Was there any warning????

I think this is what frustrates many beginners with linux based systems - they are so easy to break, and rarely do things "just work".
A corollary of this is why did you change the gpu_mem setting away from the default? We know default setting work, so in effect you broke the system by changing it. So it would be interesting to know why you changed it so we can fix whatever documentation cause you to change it.
Not OP but I've seen it recommended many times for Kodi - e.g. viewtopic.php?t=251645 suggests a setting of 320MB for the Pi 4. I could be wrong but I vaguely remember that the poster there is the package maintainer.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5805
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Last big update for Rasbian - 4h 30/07/2021

Thu Aug 05, 2021 6:56 pm

tom56 wrote:
Thu Aug 05, 2021 4:37 pm
Not OP but I've seen it recommended many times for Kodi - e.g. viewtopic.php?t=251645 suggests a setting of 320MB for the Pi 4. I could be wrong but I vaguely remember that the poster there is the package maintainer.
It's different with 5.10 kernel. hevc buffers are allocated from cma rather than gpu_mem, so having a large gpu_mem specified is harmful.
RPiOS Buster has been on 5.10 for some months.

max11
Posts: 72
Joined: Tue May 14, 2019 12:48 pm

Re: Last big update for Rasbian - 4h 30/07/2021

Tue Sep 14, 2021 7:50 pm

As i think this update is also to blame for my problems... here my case:

Raspi3b+ … TV streams problem

Alfter some time not using My Raspi 3b+ I switched it on today, making before
an update/upgrade.

There are now horrible artefacts (showing / not showing / showing …). These artefacts appear with 1080 and also with 720. With 720 the stream sometimes even stops As ‘O' shows the system cpu usage goes up to #0: 41% #1:100% #2:35% #3 100% and the TV hangs.
Only a cold boot helps then.

This is new to me.

My system:

uname -a
Linux raspberrypi 5.10.60-v7+ #1449 SMP Wed Aug 25 15:00:01 BST 2021 armv7l GNU/Linux

vcgencmd version
Aug 31 2021 14:55:00
Copyright (c) 2012 Broadcom
version 67615e950e1e28b92dfae6303cf7a8b879a8908f (clean) (release) (start)

Kodi info:
Kodi 18.7 Git: 20200612-e2aefdbee4
Compiled 2020-06-12

Dmesg is added,

config.txt:

hdmi_ignore_edid=0xa5000080

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1 # set to 1 to disable

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes 1=DVI 2=normal HDMI
hdmi_drive=1

# uncomment to force a specific HDMI mode (this will force VGA) 0=automatic 1=CEA 2=DMT. mode=4 =720p mode =5 1080i
# hdmi_group:0=1
# hdmi_mode:0=4

hdmi_group=2
hdmi_mode=35

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#
# dtparam=i2s=on
# dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
enable_uart=1
gpu_mem=320

Will there be changes to the handling of video? The 'update' was so far for me a downgrade.

Max11

Btw: I wanted to upload screenshots (png or png.zip : I always receive an error :(
Attachments
dmesg.zip
(9.67 KiB) Downloaded 2 times


Return to “Troubleshooting”