Raspberry Pi Kernels (2.0)

I reply to myself:

this entropy pool size limited to 256 does not seem to be a concern anymore because they change the way it works.

For further explanations, you can have a look at these commits (and their comments): kernel/git/torvalds/linux.git - Linux kernel source tree
and
kernel/git/torvalds/linux.git - Linux kernel source tree

@tartanpion Just an FYI. Upstream kodi-rpi upgraded today and I built and pushed version 19.4.1-3 packages to the unstable branch. There was no code changes but had some compiler flag changes. The new kodi-rpi did well with all of my test videos using linux-rpi4 5.15.43 and the latest raspberrypi-bootloader packages in the unstable branch. The h.265 issue is still there with the 5.18 kernel.

kodi-rp 19.4.1-3
kodi-rpi-dev 19.4.1-3
kodi-rpi-eventclients 19.4.1-3
kodi-rpi-tools-texturepacker 19.4.1-3

Arch’s kodi package were updated this night. If i read correctly the pkgbuild :

So unless a portage of kodi-rpi-git no hardware acceleration with 5.18 ?

I will do this within the next couple of days and test. My time is limited today as I am rebuilding all rpi kernels with gcc12 in the unstable branch and today is my day to go to town for groceries which is an over 100 mile trip.

The linux-rpi4 packages built with gcc12 has been pushed to the unstable branch when the mirrors sync.

I ran into an issue with the linux-mainline as there was a change since the one in the repo was built and it has an issue with rebooting. If you power off first it seems to be ok but if rebooting some times I immediately get a blank screen. One time it tried to download and install a boot image. The linux-mainline 5.18.0 in the unstable repo seems to be ok. I suspect this last commit is causing the issue but they also had a related commit with the last raspberrypi-bootloader packages. I have run out of time today to investigate.

https://github.com/raspberrypi/linux/commit/bedcc63080fbf1c7a80eb7e70b4b64eadd8bf3cb

linux-rpi4 5.15.43-2
linux-rpi4-headers 5.15.43-2

@tartanpion I have pushed kodi-rpi-git to the unstable branch for you to test. It does seem better here. I was able to play all of my hevc test vids except jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv. Guessing it does not like 10bit. It still crashes kodi with 5.18 but plays fine with kernel 5.15.y. The kodi-rpi4-git package plays well with kernel 5.15.y in all of my tests with no issues. I would like to point out and guess you know that RPi recommends the 5.15.y kernel wit kodi as they consider it as their “Stable”
kernel.

Notes:

Use the linux-rpi4-mainline 5.18.0-1 currently in unstable when you test.

Since this is kodi v20 the API has changed so none of my compiled addons work. I will have to build new ones.

You might as well get used to using KMS instead of FKMS if you have not made the switch as it is dying on the vine. The libcec-rpi package should replace libcec-rpi-fkms with the kodi-rpi-git install.

These kodi-rpi-git packages are built against the latest libs in the unstable branch so would be best to upgrade there before installing them.

kodi-rpi-gi 20.x.60448.26e7070ac9-1
kodi-rpi-git-dev 20.x.60448.26e7070ac9-1
kodi-rpi-git-eventclients 20.x.60448.26e7070ac9-1
kodi-rpi-git-tools-texturepacker 20.x.60448.26e7070ac9-1

i will wait a few days before using 5.18… But just for this evening my test :

  • kodi 20 and 5.15 and hevc ( jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv include) :ok:
  • kodi 20 and 5.18 :same for me.:ok:
    just one second in the beginning with a black screen.
    but no pipewire in the sound configuration.
    My DE is gnome and i use kodi in a tty
    my screen is 1920x1200. and i have a little overclocked

over_voltage=6
arm_freq=2100
gpu_freq=750

so when i play a movie

vcgencmd measure_clock core
frequency(1)=749988288

It’s steady since 1,5 years and the last commit is about a core frequency of 600 for 4K
And no pb with chromium or mpv (mpv-pipewire) like i have seen in another post. just no hardware acceleration.

what is best gcc12 flags for aarch64?

I am not sure what you are trying to say as I have not checked kodi’s config but I am using pipewire and the sound is working here.

I am not an expert but makflags have been all over the place depending on what package is being compiled.

These new kernels have been upgraded today and I have pushed the packages to the unstable branch when the mirrors sync.

linux-rpi4 5.15.44-1
linux-rpi4-headers 5.15.44-1
linux-rpi4-mainline 5.18.1-1
linux-rpi4-mainline-headers 5.18.1-1

@tartanpion More kodi packages for you to play with as they also have new version upgrades.

Kodi v19:
 
kodi-rpi 19.4.1-4
kodi-rpi-dev 19.4.1-4
kodi-rpi-eventclients 19.4.1-4
kodi-rpi-tools-texturepacker 19.4.1-4
 
Kodi v20:
 
kodi-rpi-git 20.x.60452.e76baeac66-1
kodi-rpi-git-dev 20.x.60452.e76baeac66-1
kodi-rpi-git-eventclients 20.x.60452.e76baeac66-1
kodi-rpi-git-tools-texturepacker 20.x.60452.e76baeac66-1

Pipewire is just for testing because it’s a new feature in kodi 20 .
KODI_AE_SINK=PIPEWIRE kodi does nothing. perhaps it’s need pipewire in optdepends
And the only mystery is why i can play jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv and not you.

I was actually able to play it today for some reason using the latest 5.18 kernel and kodi v20.

Added:

Here is what I have installed here:

[root@pi4 kodi]# pacman -Ss pipewire | grep installed
extra/gst-plugin-pipewire 1:0.3.51-1 [installed]
extra/pipewire 1:0.3.51-1 [installed]
extra/pipewire-alsa 1:0.3.51-1 [installed]
extra/pipewire-media-session 1:0.4.1-2 [installed]
extra/pipewire-pulse 1:0.3.51-1 [installed]
extra/pipewire-v4l2 1:0.3.51-1 [installed]
extra/pipewire-zeroconf 1:0.3.51-1 [installed]

Looking over the packages it looks like pipewire-v4l2 might be important to this kodi install.

@tartanpion I have made some common additional addons packages for kodi v20. Download the tarball from my googledrive and unpack and install the packages you may need with pacman -U.

The screensavers package has 24 screensavers. I found that 4 of them do not work here:

Hyperspace
Hufo Tunnel
Matrix View
Plasma

After installing the screensavers and rebooting you will be asked which screensavers to enable so say no to the ones above.

Packages in the tarball:

kodi-addon-inputstream-adaptive-gi 20.2.1.Nexus.r2.gf51c648-1
kodi-addon-inputstream-rtmp-git 20.2.0.Nexus.r0.gd3be647-1
kodi-addon-pvr-iptvsimple-git 20.3.0.Nexus.r0.gf050a34-1
kodi-addon-screensavers-rsxs-git 20.1.0-1

md5sum kodi-20-nexus-addons.tar:
ca4c54e0dec96e2f0746b437d0058705

https://drive.google.com/file/d/1J005cL0ZREKWA0xvygg6fq8GFOTBG5S4/view?usp=sharing

Update July 9:

I was not aware until today starting with kernel 5.18 the ashmem module had been removed by upstream → RPi tree so it has broken anbox. I did some research on the anbox git and they are aware of it but up in the air on how to deal with it. So today I have patched both kernels linux-rpi4-mainline and linux-rpi4-rc to temporarily get anbox working until they come up with a game plan to fix it. The linux-rpi 5.15 kernel still works ok as is.

New kernels patched for working anbox and pushed to unstable:

linux-rpi4-mainline 5.18.9-2
linux-rpi4-mainline-headers 5.18.9-2
linux-rpi4-rc 5.19.rc5-2
linux-rpi4-rc-headers 5.19.rc5-2

Update July 18:

All linux-rpi4 kernels and the 2 raspberrypi-bootloader packages have been upgraded and have been pushed to the unstable branch when the mirrors sync.

linux-rpi4 5.15.55-1
linux-rpi4-headers 5.15.55-1
linux-rpi4-mainline 5.18.12-1
linux-rpi4-mainline-headers 5.18.12-1
linux-rpi4-rc 5.19.rc7-1
linux-rpi4-rc-headers 5.19.rc7-1
raspberrypi-bootloader 20220718-1-
raspberrypi-bootloader-x 20220718-1

I also compiled and tested the latest 5.19.0-rc7-1-next-20220718 upstream kernel and the new V3D addition is still doing good.

1 Like

Update July 19:

All RPi kernels have been upgraded with an ext4 bug fix and pushed to the unstable branch when the mirrors sync:

https://github.com/raspberrypi/linux/issues/5097

linux-rpi4 5.15.55-2
linux-rpi4-headers 5.15.55-2
linux-rpi4-mainline 5.18.12-2
linux-rpi4-mainline-headers 5.18.12-2
linux-rpi4-rc 5.19.rc7-2
linux-rpi4-rc-headers 5.19.rc7-2

Updated July 22:

The linux-rpi4 kernel upgraded today and packages pushed to the unstable branch when the mirrors sync.

linux-rpi4 5.15.56-1
linux-rpi4-headers 5.15.56-1

Updated July 23:

The rpi-eeprom package has been upgraded and pushed to the unstable branch with a bug fix for usb nvme ssd and loading large initramfs files. This was only an issue if someone added a lot to the initramfs file. This issue did not seem to affect booting on a sdcard.

rpi-eeprom 20220723-1

Updated Jul 27:

More testing today with the upstream linux-next kernel with V3d.

Fish tank:

It was solid at 26 FPS but it peaked regularly to 30.

glmark2-es2:

2 Likes

download link…?

@Rip2 Here is the link to the upstream kernel that will have V3d for the rpi4 with 5.20 when it hits. I do not use uboot booting the upstream kernels; too many issues pop up from time to time.

Procedure:

Back up your cmdline.txt and config.txt so they can be restored later and use these configs instead. Write down your root= in cmdline.txt and replace it below. If you have any custom monitor settings in cmdline.txt and or config.txt also copy them over.

cmdline.txt:

root=PARTUUID=PUT-YOUR-CONFIG-HERE-02 rw rootwait console=ttyS1,115200 console=tty1 audit=0 snd_bcm2835.enable_headphones=1 usbhid.mousepoll=8 cma=512M

config.txt:

arm_freq=2000

device_tree=dtbs/broadcom/bcm2711-rpi-4-b.dtb
gpu_mem=64    # You have to have some gpu_mem here or it will lock up at the login
initramfs initramfs-linux.img followkernel
kernel=Image
arm_64bit=1
disable_overscan=1

#enable sound
dtparam=audio=on
hdmi_drive=2

avoid_warnings=2
enable_uart=1

Download, unpack and install the linux-rpi4-upstream kernel packages. They will unpack and be in the upstream-v3d folder.

md5sum upstream-v3d.tar:
637d567a9bca7279d1a411e1239b6ae5 upstream-v3d.tar

https://drive.google.com/file/d/1G0qAIQLeyjLZhP3NWRfxatSoWttkr7Xc/view?usp=sharing

Sudo pacman -U linux-rpi4-upstream*.zst

Reboot the pi4. Report back and let me know what you think.

[ray@pi4 ~]$ uname -a
Linux pi4 5.19.0-rc8-1-next-20220727 #1 SMP PREEMPT Wed Jul 27 12:57:50 CDT 2022 aarch64 GNU/Linux

follow procedure, kernel panic, how to fallback?

I have been testing this kernel every day for 2 weeks on each daily update with no issue except 1. I would guess you have not quite followed the procedure. You had pretty much the same issue the last time you tried to install upstream kernel on the pi4.

You can mount your drive in a chroot and install the last kernel you had installed or you can disect the last kernel package (should be in /var/cache/pacman/pkg/) and copy the boot files in /boot/* and the /usr/lib/modules/* on another computer to your drive. Then copy back your original config.txt and cmdline.txt files you saved. The remove the /boot/dtbs directory and /boot/Image file. Then boot it up.

procedure only some word, how can be miss?

You and I are never on the same page with a language barrier.

OK fallback, done.