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

Linux AArch64 build uses wrong page size #107

Open
yuyichao opened this issue Aug 17, 2022 · 5 comments
Open

Linux AArch64 build uses wrong page size #107

yuyichao opened this issue Aug 17, 2022 · 5 comments
Labels
bug Something isn't working right

Comments

@yuyichao
Copy link

(Note that I'm not 100% sure if it's on the repackager or notion upstream since I don't know who created the executable file.)

What is happening?

The executable in the archlinux package (both the vanilla and enhanced version) for aarch64 has a load alignment of 0x1000 (4k). This prevents the executable from being loaded on systems with a large page size (e.g. Apple M1)

What should be happening?

The alignment should be 64k, as is the default for latest binutils. The alignment can be seen using readelf -l <executable> and the alignment for all LOAD program headers should be 0x10000 instead of 0x1000.

Screenshots (if applicable):

Operating system/browser name & version:

ArchLinux, AArch64 on Apple M1 (or any other systems with a page size larger than 4k).

notion-enhancer and/or notion-repackaged version:
Both

notion-enhancer configuration (enabled/disabled mods and their settings):
N/A

@yuyichao yuyichao added the bug Something isn't working right label Aug 17, 2022
@dragonwocky
Copy link
Member

The executable is created by https://www.electron.build/, so this is probably a default from them. Does this only happen with the Linux builds, or with the Mac builds also? I wouldn't recommend running the aarch64 builds on Mac, as they're created specifically for Fedora/Arch/Manjaro -- there are dedicated builds available for Mac.

@yuyichao
Copy link
Author

I don't know how to check it for the Mac build (I assume it's fine) since I'm not under macOS right now. This is on apple hardware but I'm not using the linux build on macOS. I'm running the archlinux build on archlinux running on m1.

@yuyichao
Copy link
Author

Although it is worth noting that pre-19 electron doesn't really support non-4k pages on aarch64 due to chromium issue. Have anyone tested running notion with electron 19? If not, I might also have to do more patching/compile an electron 11 with backport ...

@dragonwocky
Copy link
Member

Gotcha, that makes sense. Over the coming months Notion and the notion-enhancer will hopefully be updating to newer versions of Electron, but for the time being, we are limited by the version the Notion app is built with.

@yuyichao
Copy link
Author

While I was updating the wiki page for software that needs to be fixed, I just noticed that there is already a paragraph describing exactly this https://github.com/AsahiLinux/docs/wiki/Broken-Software#why-does-not-work-sometimes-mean-instantly-segfault and it mentioned that chrome/electron does apply non-default build flags that is causing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

No branches or pull requests

2 participants