raspberrypi/bookworm-feedback

Pi5 16K PageSize Kernel Incompatible Software

theofficialgman opened this issue ยท 26 comments

This issue will be a public tracker for 16K pagesize incompatible software. I made a similar post in the bookworm beta forum thread but that is still not public.

Feel free to add your own incompatible software as a comment and I will add it to this post.

Much of this list is thanks to Asahi linux wiki https://github.com/AsahiLinux/docs/wiki/Broken-Software

Broken software:

  • f2fs
  • FEX
  • hardened_malloc
  • jemalloc
    • Geekbench 6 (< 6.2.2)
    • Minecraft Java (on versions and launchers without the <3.3.2 lwjgl native jemalloc patch)
    • rust
  • fd
  • Wine ARM64
  • Wine x86_64 through Box64
  • Box86
  • Zig
  • All Chromium based applications (pre-102)
    • qt5-webengine
    • qt6-webengine (QtPdf)
  • libvirt/QEMU/KVM (fixed in versions newer than bookworm has)
  • All Android applications (only 4k header compatible, https://reviews.llvm.org/D55029)
    • Minecraft Bedrock Launcher
  • Most armv6/armv7 software
  • Scratch3
  • Flycast
  • DOSBox
  • btrfs (should be fixed in newer linux kernels or with newly generated btrfs storage I think.. https://www.spinics.net/lists/linux-btrfs/msg120249.html)
  • Musescore - (< 4.2.0)

If you find this is a problem, switch to the 4k page size using:

kernel=kernel8.img

in config.txt

Scratch 3. #91

unable to systemd-nspawn 32bit image #120

Flycast

btrfs-convert #136

Minecraft Pi

Minecraft Pi

Doesn't minecraftPi use Dispmanx for its display, or has that been updated? If it is still Dispmanx, then I am not sure it will work on Bookworm/Pi5 even with 4k pages.

Minecraft Pi

Doesn't minecraftPi use Dispmanx for its display, or has that been updated? If it is still Dispmanx, then I am not sure it will work on Bookworm/Pi5 even with 4k pages.

I think what Botspot is referring to is the project based on Minecraft Pi edition called and Minecraft Pi Reborn. It still run the original binary but patches it (somehow, don't really know the technical details) to use more modern display stacks (I think glfw is used), add features and mods, and native arm64 support without armhf multiarch. I can confirm that Minecraft Pi Reborn works on Pi5 Bookworm with 4K pagesize.

Thanks for the update, I did wonder what had happened to Minecraft Pi. Bizarre that an app like that has some dependency on page size.

Any app that tries to mmap something (hardware, for example, or perhaps RAM that is shared with the firmware) has to ensure that the base address that is mmaped is aligned to the OS page boundaries, and that alignment has now jumped from 4k to 16k.

@pelwell So that means there is no possible fix at the kernel level, but software has to be adapted instead, right?

The fix at the kernel level is to not use 16kB pages, which you can do with the addition of kernel=kernel8.img to config.txt.

@pelwell So that means there is no possible fix at the kernel level, but software has to be adapted instead, right?

The best fix would be for people to write software that was page-size independent. Just requires a bit more effort/thinking when writing it. I think there may be some very edge cases where it's difficult to deal with (Looking above, perhaps file systems with block size < page size), but they are few and far between.

Bizarre that an app like that has some dependency on page size.

@JamesH65 Every single executable file has a dependency on page size (see asahi wiki page on the subject https://github.com/AsahiLinux/docs/wiki/Broken-Software#why-does-not-work-sometimes-mean-instantly-segfault). Older versions of the gold linker only produced 4K pagesize compatible binaries though this was corrected in 2015 https://sourceware.org/legacy-ml/binutils-cvs/2015-10/msg00050.html some old software is of course still affected by that gold linker issue even 2023. Some software manually overwrite the pagesize and that is the list of software you see above.

Understood (it wasn't my comment)

jemalloc - bitnami/redis docker image

Polars (python module) because it uses jemalloc. ghollingworth's suggestion of using kernel8.img fixed it for me. I have read elsewhere that ubuntu uses a different page size and does not have the jemalloc issue, but I have not verified it.

libretro flycast.
(the flycast already mentioned and fixed was flyinghead flycast known as lr-flycast-dev in retropie-setup. I'm referring specifically to lr-flycast which is still affected).

noip.com duc
https://www.noip.com/support/knowledgebase/install-linux-3-x-dynamic-update-client-duc

But you can build it from source using cargo and rust, and it just works.

Are you saying if you install it by downloading the linked deb file, it works with kernel8.img, but not with kernel_2712.img?
But if you build from source (presumably a newer version?) it works on both?

Are you saying if you install it by downloading the linked deb file, it works with kernel8.img, but not with kernel_2712.img? But if you build from source (presumably a newer version?) it works on both?

Yes indeed!

Sounds like it's best reported to noip that updating their deb files would solve this issue.

OvenMediaEngine, because it uses jemalloc (and the RaspberryPi 5 even with 8GB RAM doesn't have enough RAM to fully recomplie it and test if the jemallow configure option fixes all issues).

OvenMediaEngine, because it uses jemalloc (and the RaspberryPi 5 even with 8GB RAM doesn't have enough RAM to fully recomplie it and test if the jemallow configure option fixes all issues).

Maybe try fewer threads, if possible. Also ZRAM should fix that for you. https://forums.raspberrypi.com/viewtopic.php?t=327238