-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Apple Silicon M1 #725
Comments
Wow, so quick and nice! Does this 4410fef mean we can run script additions on M1 now? |
I don't even know if the method for code injection is still going to work on the M1, and I can't really verify anything as I don't have one. The above commits are mostly just future notes for myself for when I do end up buying one, or if other members in the community want to do the work required to support the M1. I have made adjustments to the injection process that I believe should work on the M1. If it works; the current master should support things such as window borders, opacity, layers (sticky windows) and such, but none of the spaces functionality will work yet. Edit: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Window borders require the scripting addition to work correctly. The current master should support this, but spaces functionality is not yet implemented for arm. |
I've installed master, I can confirmed that borders are not working (still shows "failed to inject payload into Dock.app!"), but |
Right, so it seems to me like it should be working fine. I'm probably just doing something wrong when setting up the thread state for arm64 here: https://github.com/koekeishiya/yabai/blob/master/src/osax/mach_loader.c#L94 |
Added a commit to master that will print the error; could you fetch that, compile and run |
sudo yabai --load-sa
could not spawn remote thread: (os/kern) protection failure
yabai: scripting-addition failed to inject payload into Dock.app! |
Hmm how about now? I don't think it should matter, but it is my last idea as of now. |
Still the same. |
@cxa Can you try the latest commit? clean, make and reinstall the scripting addition before finally trying to load it. |
I installed latest commit with sudo yabai --uninstall-sa
sudo yabai --install-sa
sudo yabai --load-sa Unfortunately it was still the same result. |
Hmm aight, I give up for now; I don't see what I'm doing wrong. |
Thanks for your hard working! Wish you a good day. |
This seems like it could be relevant for the M1: https://bazad.github.io/2018/10/bypassing-platform-binary-task-threads/ |
Any idea on this? I follow the latest wiki that you mentioned above. |
I am unable to reproduce that error. What's the output of the following:
|
|
Well that is weird, my output is:
|
I have also tried uninstall&install. |
If you use the prebuilt binary I posted in: #923 (comment) to install the scripting-addition. Run the same check as above. Does it show as a universal binary? I suspect there is an issue with brew compilation for whatever reason??? |
I've confirmed installing with |
I enabled window border and there's inner shadows, as I investigated before, |
Fixed by building from source then replacing the binary. |
There are some lines in the |
@cxa Borders cause the window server and/or random applications to crash; you probably should not use these. Regarding the shadow; I'll investigate that if I am able to get borders working properly. Chances are that borders will be removed for Monterey, as I think the API we rely on is just not reliable anymore. @storopoli The yabai binary itself is built as |
Might be something related to this? In my machine homebrew clang takes over as the main compiler:
|
Ok, I think I got this. I've installed with Then I did this (a kinda hack): ❯ cd Desktop/archive/bin/
mv yabai /opt/homebrew/Cellar/yabai/HEAD-6bcf544/bin/yabai
override r-xr-xr-x storopoli/admin for /opt/homebrew/Cellar/yabai/HEAD-6bcf544/bin/yabai? (y/n [n]) y It seem to be working now. |
Closing in favour of #1054. |
file /Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader m1 monterey 12.0.1 why ? |
Because there have been changes since 2021. |
Placeholder to track support for Apple Silicon M1 at some point in the distant future.
Couple of things to be mentioned..
The scripting-addition obviously needs a full rewrite for the ARM architecture and I do not actually have hands on experience with any ARM processor. This should not be a blocker, but will take time as the Dock.app ARM binary needs to be reverse engineered in the same way we did the x86-64 version.The master branch should now compile and run fine on Apple Silicon with Monterey 12.0.0 and 12.0.1.
As this project does not have any external dependencies with the exception of the C standard library and Apple frameworks, I would expect basic support (read: compile and run) for Apple Silicon to work with close to no changes. Considering the performance differences between the models I am also interested in knowing if this will provide a noticeably better user experience when interacting with applications through the accessibility API, as yabai is doing, when managing windows.The master branch should now compile and run fine on Apple Silicon with Monterey 12.0.0 and 12.0.1.
Feel free to discuss potential issues or post notable mentions in this issue.
If you are one of the people that have decided to get a first gen. M1 machine and are a developer, it would be great to see how yabai (or similar software) ends up running.
I'm undecided whether to get one of the new machines, or wait for further adjustments to their high-end machines.Probably won't be getting one any time soon, so don't expect official support for some time.
The text was updated successfully, but these errors were encountered: