Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pi5 16K PageSize Kernel Incompatible Software #107

Closed
theofficialgman opened this issue Oct 21, 2023 · 27 comments
Closed

Pi5 16K PageSize Kernel Incompatible Software #107

theofficialgman opened this issue Oct 21, 2023 · 27 comments

Comments

@theofficialgman
Copy link

theofficialgman commented Oct 21, 2023

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)
@ghollingworth
Copy link
Contributor

ghollingworth commented Oct 21, 2023

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

kernel=kernel8.img

in config.txt

@popcornmix
Copy link

Scratch 3. #91

@theofficialgman
Copy link
Author

unable to systemd-nspawn 32bit image #120

@retropieuser
Copy link

Flycast

@lurch
Copy link
Collaborator

lurch commented Nov 10, 2023

btrfs-convert #136

@Botspot
Copy link

Botspot commented Nov 14, 2023

MuseScore. Botspot/pi-apps#2480

@Botspot
Copy link

Botspot commented Dec 1, 2023

Minecraft Pi

@JamesH65
Copy link

JamesH65 commented Dec 1, 2023

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.

@theofficialgman
Copy link
Author

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.

@JamesH65
Copy link

JamesH65 commented Dec 2, 2023

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.

@pelwell
Copy link

pelwell commented Dec 2, 2023

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.

@vanfanel
Copy link

vanfanel commented Dec 3, 2023

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

@pelwell
Copy link

pelwell commented Dec 3, 2023

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.

@JamesH65
Copy link

JamesH65 commented Dec 3, 2023

@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.

@theofficialgman
Copy link
Author

theofficialgman commented Dec 3, 2023

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.

@pelwell
Copy link

pelwell commented Dec 3, 2023

Understood (it wasn't my comment)

@mnorrsken
Copy link

jemalloc - bitnami/redis docker image

@Botspot
Copy link

Botspot commented Dec 18, 2023

Cura slicer AppImage https://github.com/smartavionics/Cura

@dstumbo
Copy link

dstumbo commented Dec 19, 2023

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.

@Widge-5
Copy link

Widge-5 commented Jan 16, 2024

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).

@koverg70
Copy link

koverg70 commented Apr 24, 2024

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.

@popcornmix
Copy link

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?

@koverg70
Copy link

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!

@popcornmix
Copy link

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

@basisbit
Copy link

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).

@Botspot
Copy link

Botspot commented May 27, 2024

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

@lurch
Copy link
Collaborator

lurch commented Sep 30, 2024

maxima #297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests