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

macOS Monterey and Apple Silicon #1054

Closed
koekeishiya opened this issue Nov 19, 2021 · 188 comments
Closed

macOS Monterey and Apple Silicon #1054

koekeishiya opened this issue Nov 19, 2021 · 188 comments

Comments

@koekeishiya
Copy link
Owner

koekeishiya commented Nov 19, 2021

The previous issues (#923, #725) contain a lot of noise and irrelevant information so I am making this one instead.

You can use the pre-built version I have attached to this post or clone the repository and build from source. To build a universal binary from source, simply run: make clean followed by make for debug build or make install for an optimised build. See the following wiki links for more detailed instructions:

SIP instructions: from the wiki
Installation instructions: from the wiki

Pre-built version (with debug symbols) of commit (91a42e7): yabai-v4.0.0.tar.gz

NOTE: v4.0.0 is a breaking release and your config and related scripts need to be updated to reflect these changes.
See the updated docs and changelog

The yabai binary is built as a universal binary containing two images: arm64 and x86-64.
The scripting-addition is built as a universal binary containing two images: arm64e and x86-64.

I am using Xcode v13.1 (13A1030d) (not command line tools) and Apple clang version 13.0.0 (clang-1300.0.29.3) on macOS Big Sur 11.6.1 (Intel) and macOS Monterey 12.1.0 (Apple Silicon). This commit has been tested and verified on Apple Silicon macOS 12.0.0, Apple Silicon macOS 12.0.1, Apple Silicon macOS 12.1.0 and Intel macOS 11.6.1.

To verify that your installed version conforms to the above, and is built correctly, run the following commands.
(Ignore the scripting-addition if you are not using it; running with SIP enabled):

file $(which yabai)
cat /Library/ScriptingAdditions/yabai.osax/Contents/Info.plist | grep -A 1 CFBundleVersion
file /Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload
file /Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader

This is what it should look like:

~ file $(which yabai)                                                                                        9:57
~/Software/yabai: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
~/Software/yabai (for architecture x86_64):	Mach-O 64-bit executable x86_64
~/Software/yabai (for architecture arm64):	Mach-O 64-bit executable arm64

~ cat /Library/ScriptingAdditions/yabai.osax/Contents/Info.plist | grep -A 1 CFBundleVersion                 9:57
<key>CFBundleVersion</key>
<string>2.0.2</string>

~ file /Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload       9:57
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64e:Mach-O 64-bit dynamically linked shared library arm64e]
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload (for architecture arm64e):	Mach-O 64-bit dynamically linked shared library arm64e

~ file /Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader                                     9:57
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader (for architecture x86_64):	Mach-O 64-bit executable x86_64
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader (for architecture arm64e):	Mach-O 64-bit executable arm64e

Debug loading of the scripting-addition:

Stop yabai and pkill Dock, then delete the temp files for yabai: /tmp/yabai*
Look for logs in Console.app. Select your device on the left, and filter for "Dock" at the right, as shown in the below screenshot. Make sure no previous injection of the scripting-addition has been attempted; run pkill Dock first if it has. Clear the log window first for less noise, then run sudo yabai --load-sa and assuming it returns no error, you should see something like the following:

Screenshot 2021-11-19 at 09 52 49

Known issues:

Window borders are broken; they cause random applications to freeze and also sometimes crashes the WindowServer. I have not found a pattern to this behaviour. Most likely borders will be disabled for Monterey until a solution is found. Limelight needs to be updated for Monterey; I'll look into that at some point, but no ETA. New window borders work differently and will work with SIP enabled.

The API used to detect the height of the menubar is not working on Apple Silicon (but works when running the x86_64 version through Rosetta). The height cannot be hardcoded in Monterey, as the height changes depending on the selected display resolution. Fixed on master and in the pre-built version linked above.

The function display_manager_display_is_animating(uint32_t did) used for validating that the system is in a state where changes to spaces are appropriate to perform, is broken in Monterey. This could also have implications for integration with fullscreen application transitions.

FAQ:

  1. Trying to enable arm64e ABI.

nvram boot-args=-arm64e_preview_abi
Error setting variable - 'boot-args': (iokit/common) not permitted.

To run this command you first need to disable SIP, and reboot. Run the command as the root user, and reboot again.
This should be described in the wiki link referenced above.

  1. Trying to load the scripting-addition, running sudo yabai --load-sa.

could not set thread state: (os/kern) protection failure
yabai: scripting-addition failed to inject payload into Dock.app!

This error is displayed when there is an architecture mismatch upon loading the scripting-addition. Verify the architecture as described above, using the file command.

  1. Loading the scripting-addition appears to succeed, but commands don't work.

yabai -m space --focus commands don't seem to work for me, even though they exit with 0 as does sudo yabai --load-sa. Logs don't show anything.

Check the snippet explaining how to debug loading of the scripting-addition above.

--

Please read the above carefully before posting a comment; I'd like this to be somewhat readable and easy to follow.
If you have a problem that is not described above, feel free to post a comment with as much relevant information as possible:

Intel or Apple Silicon MacBook.
Which macOS version are you on.
What is the output of: csrutil status
For Apple Silicon, is arm64e enabled: nvram -p | grep boot-args
Which Xcode version are you using.
Which clang version are you using.
Output/result of the various debugging mentioned in the steps earlier in this post.

This was referenced Nov 19, 2021
@koekeishiya koekeishiya added the addressed on master; not released Fixed upstream, but not yet released label Nov 19, 2021
@koekeishiya koekeishiya pinned this issue Nov 19, 2021
@Aleppi

This comment has been minimized.

@kola-web

This comment has been minimized.

@koekeishiya

This comment has been minimized.

@koekeishiya

This comment has been minimized.

@rpoovey

This comment has been minimized.

@leftbones

This comment has been minimized.

@net

This comment has been minimized.

@rosenpin

This comment has been minimized.

@koekeishiya

This comment has been minimized.

@dnaaun

This comment has been minimized.

@rosenpin
Copy link

rosenpin commented Nov 19, 2021

@rosenpin Upgrade Xcode.

I'm using the same Xcode version as you (Version 13.1 (13A1030d))
Fixed by running:

sudo rm -rf /Library/Developer/CommandLineTools
softwareupdate --all --install --force

@rpoovey

This comment has been minimized.

@SamHep0803

This comment has been minimized.

@leftbones

This comment has been minimized.

@HosAkh
Copy link

HosAkh commented Nov 20, 2021

I just installed it on an intel machine running Monterey 12.1 (SIP disabled). When connecting my computer to an external monitor it kept disconnecting and reconnecting.

@iwa

This comment has been minimized.

@kola-web

This comment has been minimized.

@SamHep0803

This comment has been minimized.

@SamHep0803

This comment has been minimized.

@SamHep0803

This comment has been minimized.

@CrossR

This comment has been minimized.

@rpoovey
Copy link

rpoovey commented Nov 21, 2021

seems that the comment by @rpoovey was deleted however the gist of it was if you are having issues installing it with brew, compile from source.

@SamHep0803 yeah, sorry, I felt my comment wasn't fully correct and was missing a lot. I decided to remove it so I didn't cause any confusion. But it seems other are having trouble so I'll try and recreate my steps. These are in no way official steps, just what worked for me.

  • Verify that SIP is disabled properly following this link
  • boot back into macOS
  • set boot args with sudo nvram boot-args=-arm64e_preview_abi
  • Stop yabai
  • uninstall yabai brew package with brew uninstall yabai
  • reinstall with brew install yabai --head
  • Delete old scripting additions sudo rm -rf /Library/ScriptingAdditions/yabai.osax
  • Clone repo to Downloads folder
    • cd ~/Downloads/yabai
    • make clean then make install
    • cp bin/yabai /opt/homebrew/bin/
  • yabai --install-sa
  • yabai --load-sa
  • start yabai
  • verify everything with
    • file $(which yabai)
    • cat /Library/ScriptingAdditions/yabai.osax/Contents/Info.plist | grep -A 1 CFBundleVersion
    • file /Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload
    • file /Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader

@dominiklohmann

This comment has been minimized.

@choco
Copy link

choco commented Nov 21, 2021

Just got the following crash today:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               yabai [54851]
Path:                  /Volumes/VOLUME/*/yabai
Identifier:            yabai
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2021-11-21 19:57:35.3288 +0100
OS Version:            macOS 12.0.1 (21A559)
Report Version:        12
Anonymous UUID:        AD43718C-8336-4DFF-8C80-5346CE88A487


Time Awake Since Boot: 18000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x000000019b6cc2cc
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [54851]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   CoreFoundation                	       0x19b6cc2cc CFRelease + 88
1   SkyLight                      	       0x1a084a608 CGSEventReclaimObjects + 44
2   SkyLight                      	       0x1a095282c event_finalize(void const*) + 36
3   CoreFoundation                	       0x19b81d6f4 _CFRelease + 248
4   SkyLight                      	       0x1a0969064 processEventTapData(void*, unsigned int, unsigned int, unsigned int, unsigned char*, unsigned int) + 1392
5   SkyLight                      	       0x1a0b41a94 _XPostEventTapData + 328
6   SkyLight                      	       0x1a09697ac eventTapMessageHandler(__CFMachPort*, void*, long, void*) + 160
7   CoreFoundation                	       0x19b7752d4 __CFMachPortPerform + 308
8   CoreFoundation                	       0x19b745438 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
9   CoreFoundation                	       0x19b7452f4 __CFRunLoopDoSource1 + 596
10  CoreFoundation                	       0x19b743780 __CFRunLoopRun + 2380
11  CoreFoundation                	       0x19b742694 CFRunLoopRunSpecific + 600
12  yabai                         	       0x1000c5270 main + 544
13  dyld                          	       0x1002890f4 start + 520

Thread 1:
0   libsystem_kernel.dylib        	       0x19b669f4c sem_wait + 8
1   yabai                         	       0x1000aa3c4 event_loop_run + 268
2   libsystem_pthread.dylib       	       0x19b6794ec _pthread_start + 148
3   libsystem_pthread.dylib       	       0x19b6742d0 thread_start + 8

Thread 2:
0   libsystem_kernel.dylib        	       0x19b645aa4 __accept + 8
1   yabai                         	       0x1000b47c8 message_loop_run + 60
2   libsystem_pthread.dylib       	       0x19b6794ec _pthread_start + 148
3   libsystem_pthread.dylib       	       0x19b6742d0 thread_start + 8

Thread 3:
0   libsystem_pthread.dylib       	       0x19b6742bc start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	       0x19b6742bc start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib       	       0x19b6742bc start_wqthread + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x000060000235c690   x1: 0x000060000235c620   x2: 0x0000000000000006   x3: 0x000000019b48e23c
    x4: 0x0000000000800000   x5: 0x000000000000003e   x6: 0x0000000000000000   x7: 0x00006000033680d0
    x8: 0x0000000000000000   x9: 0x0000000000610018  x10: 0x0000a5ec0a74c690  x11: 0x007ffffffffffff8
   x12: 0x000000000000000f  x13: 0x00000000cfe42017  x14: 0x00000000d0042800  x15: 0x0000000000042800
   x16: 0x0000a5ec0a74c690  x17: 0x000025ec0a74c690  x18: 0x0000000000000000  x19: 0x0000600003444500
   x20: 0x0000000000000118  x21: 0xffffffffffffffff  x22: 0x00000001f16d0000  x23: 0x0000000100011880
   x24: 0x00000001f16c8e60  x25: 0x0000000100000000  x26: 0xffffffff00000000  x27: 0x000000016fd5b3f8
   x28: 0x000060000066e8b0   fp: 0x000000016fd515e0   lr: 0x85668001a084a608
    sp: 0x000000016fd515e0   pc: 0x000000019b6cc2cc cpsr: 0x20000000
   far: 0x000000016b4b2210  esr: 0xf200c472 (Breakpoint) pointer authentication trap DA

Binary Images:
       0x19b6c0000 -        0x19bc03fff com.apple.CoreFoundation (6.9) <b2ff96d0-ae99-31ef-9014-fc9964b4f3e0> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x1a0835000 -        0x1a0bfcfff com.apple.SkyLight (1.600.0) <c8f2838b-e64c-34db-aca6-1faa164c762a> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
       0x1000a4000 -        0x1000d3fff yabai (*) <ef951829-8596-38fa-a805-12a3d61594f7> /Volumes/VOLUME/*/yabai
       0x100284000 -        0x1002e3fff dyld (*) <86a8ba48-8bb4-3b30-9cda-051f73c74f44> /usr/lib/dyld
       0x19b63c000 -        0x19b671fff libsystem_kernel.dylib (*) <c8524c02-b14f-30bd-a228-c44b4a448e68> /usr/lib/system/libsystem_kernel.dylib
       0x19b672000 -        0x19b67efff libsystem_pthread.dylib (*) <4786e19a-9312-38e6-80ef-9c1394548118> /usr/lib/system/libsystem_pthread.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=766.8M resident=0K(0%) swapped_out_or_unallocated=766.8M(100%)
Writable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
ColorSync                          400K       21 
CoreGraphics                        32K        2 
Kernel Alloc Once                   32K        1 
MALLOC                           268.3M       44 
MALLOC guard page                  192K       10 
MALLOC_MEDIUM (reserved)         720.0M        6         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                       56.1M        6 
Stack                             10.6M        6 
VM_ALLOCATE                        1.0G       42 
VM_ALLOCATE (reserved)              36K        2         reserved VM address space (unallocated)
__AUTH                            1772K      145 
__AUTH_CONST                      9188K      286 
__DATA                            8436K      272 
__DATA_CONST                      9923K      287 
__DATA_DIRTY                       592K       98 
__FONT_DATA                          4K        1 
__LINKEDIT                       570.8M        4 
__OBJC_CONST                      1238K      119 
__OBJC_RO                         81.8M        1 
__OBJC_RW                         3088K        1 
__TEXT                           196.0M      302 
__UNICODE                          588K        1 
dyld private memory               1024K        1 
mapped file                       56.7M       11 
shared memory                      848K       12 
===========                     =======  ======= 
TOTAL                              3.3G     1683 
TOTAL, minus reserved VM space     2.3G     1683 

@shajra-simspace

This comment has been minimized.

@geoboom
Copy link

geoboom commented Mar 11, 2022

@macram1 Just to confirm, you've tried this sequence of commands? I had the same errors, and disabling SIP completely did end up working for me (M1 Air, 12.2.1 21D62)

brew install koekeishiya/formulae/yabai --HEAD
# reboot into recovery
csrutil disable
# reboot
sudo nvram boot-args=-arm64e_preview_abi
# reboot
sudo yabai --uninstall-sa
sudo yabai --install-sa
sudo yabai --load-sa
# the last one failed with "could not locate Dock.app pid," but worked about 1 minute after reboot
yabai -m window --layer above # now works!```

Can confirm these instructions, together with an accidental discovery I had, worked.
I initially had this error "yabai: scripting-addition failed to inject payload into Dock.app!" on Alacritty terminal so I tried repeating the steps on the default Terminal.app and it worked. However, I could only run sudo yabai --load-sa on default Terminal.app and not Alacritty, until I updated it to Alacritty-v0.10.1. Now it works on Alacritty as well!
I think that the issue was due to my previous Alacritty version (forgot what it was) possibly being compiled on x86_64 and was therefore running on Rosetta 2 rather than native arm64 (I had to prefix all my brew installs with arch -arm64).

Huh, that's really interesting. Glad it worked for you though. Did you get a chance to check what type arm or intel (maybe in Activity Monitor) Alacritty was before vs after?

Yep, I believe it was Alacritty-v0.9.0. I'm not sure why but using v0.9.0, brew install would always prompt me to prefix it with arch -arm64 whereas on v0.10.1, it's not necessary. This led me to believe I had the x86_64 version rather than the arm version of Alacritty installed. Didn't occur to me that it'd have anything to do with load-sa failing to communicate with Dock.app until recently when I wondered that perhaps running the x86_64 build of Alacritty on Rosetta 2 was interfering with the IPC.

@dmitrym0
Copy link

I noticed that sometimes when emacs is focused, changing spaces doesn't focus the front most app:

  1. Go to Space 3 (Emacs); emacs becomes focused.
  2. Go to Space 1 (Safari); safari is NOT focused, emacs still focused.
  3. Go to space 3 again (Emacs); emacs still focused.
  4. Go to space 2 (iTerm); iTerm is focused.

Actually now that I write this app, Safari seems to be the only culripit.

@koekeishiya
Copy link
Owner Author

closing as v4.0.0 is released; seems fairly stable as far as I can tell.

@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Mar 16, 2022
@Jonovono
Copy link

Jonovono commented Apr 7, 2022

I'm still having issues, even after following @Tweoss steps

I get this error:

$ sudo yabai --load-sa
could not spawn remote thread: (os/kern) invalid argument
yabai: scripting-addition failed to inject payload into Dock.app!
MacBook Air (M1, 2020) 12.2.1

File Commands:

$ file $(which yabai)
/usr/local/bin/yabai: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
/usr/local/bin/yabai (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/local/bin/yabai (for architecture arm64):	Mach-O 64-bit executable arm64

jordan at MacBook-Air in ~
$ cat /Library/ScriptingAdditions/yabai.osax/Contents/Info.plist | grep -A 1 CFBundleVersion
<key>CFBundleVersion</key>
<string>2.0.4</string>

jordan at MacBook-Air in ~
$ file /Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64e:Mach-O 64-bit dynamically linked shared library arm64e]
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload (for architecture arm64e):	Mach-O 64-bit dynamically linked shared library arm64e

jordan at MacBook-Air in ~
$ file /Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader (for architecture x86_64):	Mach-O 64-bit executable x86_64
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader (for architecture arm64e):	Mach-O 64-bit executable arm64e

Console.app logs:

default	16:39:16.581952-0400	runningboardd	Acquiring assertion targeting [daemon<com.apple.Dock.agent(501)>:2470] from originator [daemon<com.apple.WindowServer(88)>:394] with description <RBSAssertionDescriptor| "AppVisible" ID:414-394-1294 target:2470 attributes:[
	<RBSDomainAttribute| domain:"com.apple.appnap" name:"AppVisible" sourceEnvironment:"(null)">,
	<RBSAcquisitionCompletionAttribute| policy:AfterApplication>
	]>
default	16:39:16.582912-0400	runningboardd	Assertion 414-394-1294 (target:[daemon<com.apple.Dock.agent(501)>:2470]) will be created as active
default	16:39:16.592556-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:16.592758-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:16.592863-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:16.593048-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:17.105830-0400	runningboardd	Invalidating assertion 414-394-1294 (target:[daemon<com.apple.Dock.agent(501)>:2470]) from originator [daemon<com.apple.WindowServer(88)>:394]
default	16:39:17.227613-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:17.228876-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:17.228997-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:17.229378-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:19.145541-0400	Dock	LSExceptions shared instance invalidated for timeout.
default	16:39:19.644987-0400	runningboardd	Acquiring assertion targeting [daemon<com.apple.Dock.agent(501)>:2470] from originator [daemon<com.apple.WindowServer(88)>:394] with description <RBSAssertionDescriptor| "AppVisible" ID:414-394-1322 target:2470 attributes:[
	<RBSDomainAttribute| domain:"com.apple.appnap" name:"AppVisible" sourceEnvironment:"(null)">,
	<RBSAcquisitionCompletionAttribute| policy:AfterApplication>
	]>
default	16:39:19.645126-0400	runningboardd	Assertion 414-394-1322 (target:[daemon<com.apple.Dock.agent(501)>:2470]) will be created as active
default	16:39:19.645662-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:19.645699-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:19.645735-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:19.645939-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:19.705178-0400	runningboardd	Invalidating assertion 414-394-1322 (target:[daemon<com.apple.Dock.agent(501)>:2470]) from originator [daemon<com.apple.WindowServer(88)>:394]
default	16:39:19.823085-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:19.823123-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:19.824892-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:19.825126-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:33.451859-0400	runningboardd	Acquiring assertion targeting [daemon<com.apple.Dock.agent(501)>:2470] from originator [daemon<com.apple.WindowServer(88)>:394] with description <RBSAssertionDescriptor| "AppVisible" ID:414-394-1344 target:2470 attributes:[
	<RBSDomainAttribute| domain:"com.apple.appnap" name:"AppVisible" sourceEnvironment:"(null)">,
	<RBSAcquisitionCompletionAttribute| policy:AfterApplication>
	]>
default	16:39:33.451905-0400	runningboardd	Assertion 414-394-1344 (target:[daemon<com.apple.Dock.agent(501)>:2470]) will be created as active
default	16:39:33.452455-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:33.452486-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:33.452512-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:33.452568-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:33.941010-0400	runningboardd	Invalidating assertion 414-394-1344 (target:[daemon<com.apple.Dock.agent(501)>:2470]) from originator [daemon<com.apple.WindowServer(88)>:394]
default	16:39:34.052510-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:34.052726-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:34.052944-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:34.053616-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:37.828255-0400	runningboardd	Acquiring assertion targeting [daemon<com.apple.Dock.agent(501)>:2470] from originator [daemon<com.apple.WindowServer(88)>:394] with description <RBSAssertionDescriptor| "AppVisible" ID:414-394-1385 target:2470 attributes:[
	<RBSDomainAttribute| domain:"com.apple.appnap" name:"AppVisible" sourceEnvironment:"(null)">,
	<RBSAcquisitionCompletionAttribute| policy:AfterApplication>
	]>
default	16:39:37.828433-0400	runningboardd	Assertion 414-394-1385 (target:[daemon<com.apple.Dock.agent(501)>:2470]) will be created as active
default	16:39:37.829545-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:37.829580-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:37.829613-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:37.829679-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:37.907046-0400	runningboardd	Invalidating assertion 414-394-1385 (target:[daemon<com.apple.Dock.agent(501)>:2470]) from originator [daemon<com.apple.WindowServer(88)>:394]
default	16:39:38.024341-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:38.024780-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:38.025316-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:38.026043-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed

Any ideas?

@theTechGoose
Copy link

theTechGoose commented Apr 19, 2022

Hello, is it safe to update to Monterey 12.3.1?

@koekeishiya
Copy link
Owner Author

yes the latest release supports Monterey 12.3.1

@koekeishiya koekeishiya unpinned this issue Apr 22, 2022
@jaideeprana
Copy link

Hi @koekeishiya , thanks for the awesome work.

The new version of Mac OS Monterey 12.4 is available. Curious to know, is Yabai stable on the new version?
Once you confirm it's stable I will go ahead with the upgrade.

@koekeishiya
Copy link
Owner Author

Yep, Monterey 12.4 works fine.

@mrchoc
Copy link

mrchoc commented Jun 1, 2022

I'm still having issues, even after following @Tweoss steps

I get this error:

$ sudo yabai --load-sa
could not spawn remote thread: (os/kern) invalid argument
yabai: scripting-addition failed to inject payload into Dock.app!
MacBook Air (M1, 2020) 12.2.1

File Commands:

$ file $(which yabai)
/usr/local/bin/yabai: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
/usr/local/bin/yabai (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/local/bin/yabai (for architecture arm64):	Mach-O 64-bit executable arm64

jordan at MacBook-Air in ~
$ cat /Library/ScriptingAdditions/yabai.osax/Contents/Info.plist | grep -A 1 CFBundleVersion
<key>CFBundleVersion</key>
<string>2.0.4</string>

jordan at MacBook-Air in ~
$ file /Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64e:Mach-O 64-bit dynamically linked shared library arm64e]
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
/Library/ScriptingAdditions/yabai.osax/Contents/Resources/payload.bundle/Contents/MacOS/payload (for architecture arm64e):	Mach-O 64-bit dynamically linked shared library arm64e

jordan at MacBook-Air in ~
$ file /Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader (for architecture x86_64):	Mach-O 64-bit executable x86_64
/Library/ScriptingAdditions/yabai.osax/Contents/MacOS/mach_loader (for architecture arm64e):	Mach-O 64-bit executable arm64e

Console.app logs:

default	16:39:16.581952-0400	runningboardd	Acquiring assertion targeting [daemon<com.apple.Dock.agent(501)>:2470] from originator [daemon<com.apple.WindowServer(88)>:394] with description <RBSAssertionDescriptor| "AppVisible" ID:414-394-1294 target:2470 attributes:[
	<RBSDomainAttribute| domain:"com.apple.appnap" name:"AppVisible" sourceEnvironment:"(null)">,
	<RBSAcquisitionCompletionAttribute| policy:AfterApplication>
	]>
default	16:39:16.582912-0400	runningboardd	Assertion 414-394-1294 (target:[daemon<com.apple.Dock.agent(501)>:2470]) will be created as active
default	16:39:16.592556-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:16.592758-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:16.592863-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:16.593048-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:17.105830-0400	runningboardd	Invalidating assertion 414-394-1294 (target:[daemon<com.apple.Dock.agent(501)>:2470]) from originator [daemon<com.apple.WindowServer(88)>:394]
default	16:39:17.227613-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:17.228876-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:17.228997-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:17.229378-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:19.145541-0400	Dock	LSExceptions shared instance invalidated for timeout.
default	16:39:19.644987-0400	runningboardd	Acquiring assertion targeting [daemon<com.apple.Dock.agent(501)>:2470] from originator [daemon<com.apple.WindowServer(88)>:394] with description <RBSAssertionDescriptor| "AppVisible" ID:414-394-1322 target:2470 attributes:[
	<RBSDomainAttribute| domain:"com.apple.appnap" name:"AppVisible" sourceEnvironment:"(null)">,
	<RBSAcquisitionCompletionAttribute| policy:AfterApplication>
	]>
default	16:39:19.645126-0400	runningboardd	Assertion 414-394-1322 (target:[daemon<com.apple.Dock.agent(501)>:2470]) will be created as active
default	16:39:19.645662-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:19.645699-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:19.645735-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:19.645939-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:19.705178-0400	runningboardd	Invalidating assertion 414-394-1322 (target:[daemon<com.apple.Dock.agent(501)>:2470]) from originator [daemon<com.apple.WindowServer(88)>:394]
default	16:39:19.823085-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:19.823123-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:19.824892-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:19.825126-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:33.451859-0400	runningboardd	Acquiring assertion targeting [daemon<com.apple.Dock.agent(501)>:2470] from originator [daemon<com.apple.WindowServer(88)>:394] with description <RBSAssertionDescriptor| "AppVisible" ID:414-394-1344 target:2470 attributes:[
	<RBSDomainAttribute| domain:"com.apple.appnap" name:"AppVisible" sourceEnvironment:"(null)">,
	<RBSAcquisitionCompletionAttribute| policy:AfterApplication>
	]>
default	16:39:33.451905-0400	runningboardd	Assertion 414-394-1344 (target:[daemon<com.apple.Dock.agent(501)>:2470]) will be created as active
default	16:39:33.452455-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:33.452486-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:33.452512-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:33.452568-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:33.941010-0400	runningboardd	Invalidating assertion 414-394-1344 (target:[daemon<com.apple.Dock.agent(501)>:2470]) from originator [daemon<com.apple.WindowServer(88)>:394]
default	16:39:34.052510-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:34.052726-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:34.052944-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:34.053616-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:37.828255-0400	runningboardd	Acquiring assertion targeting [daemon<com.apple.Dock.agent(501)>:2470] from originator [daemon<com.apple.WindowServer(88)>:394] with description <RBSAssertionDescriptor| "AppVisible" ID:414-394-1385 target:2470 attributes:[
	<RBSDomainAttribute| domain:"com.apple.appnap" name:"AppVisible" sourceEnvironment:"(null)">,
	<RBSAcquisitionCompletionAttribute| policy:AfterApplication>
	]>
default	16:39:37.828433-0400	runningboardd	Assertion 414-394-1385 (target:[daemon<com.apple.Dock.agent(501)>:2470]) will be created as active
default	16:39:37.829545-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:37.829580-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:37.829613-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:37.829679-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed
default	16:39:37.907046-0400	runningboardd	Invalidating assertion 414-394-1385 (target:[daemon<com.apple.Dock.agent(501)>:2470]) from originator [daemon<com.apple.WindowServer(88)>:394]
default	16:39:38.024341-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring jetsam update because this process is not memory-managed
default	16:39:38.024780-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring suspend because this process is not lifecycle managed
default	16:39:38.025316-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Ignoring GPU update because this process is not GPU managed
default	16:39:38.026043-0400	runningboardd	[daemon<com.apple.Dock.agent(501)>:2470] Skipping AppNap state - not lifecycle managed

Any ideas?

bump

@dmitrym0
Copy link

dmitrym0 commented Jun 1, 2022

@mrchoc I've got the same hardware (MacBook Air, M1) running 12.3 and it's working fine for me. Maybe have another go at it from the top?

@mrchoc
Copy link

mrchoc commented Jun 2, 2022

@mrchoc I've got the same hardware (MacBook Air, M1) running 12.3 and it's working fine for me. Maybe have another go at it from the top?

Okay yabai mostly works now, but for some apps(safari, vscode) they dont seem to respond to yabai -m window --swap or yabai -m window --toggle zoom-fullscreen, while others like terminal do. However, yabai -m window --focus does work on safari & vscode.

@mikeborodin
Copy link

Does space --focus work on apple silicon? For me it would be definitive factor for getting new mac :D

@dmitrym0
Copy link

Does space --focus work on apple silicon? For me it would be definitive factor for getting new mac :D

It does. Quick switching is one of the highlights for me.

@mrchoc
Copy link

mrchoc commented Nov 22, 2022

@mrchoc I've got the same hardware (MacBook Air, M1) running 12.3 and it's working fine for me. Maybe have another go at it from the top?

Okay yabai mostly works now, but for some apps(safari, vscode) they dont seem to respond to yabai -m window --swap or yabai -m window --toggle zoom-fullscreen, while others like terminal do. However, yabai -m window --focus does work on safari & vscode.

I managed to find the issue, nothing wrong with yabai. It was karabiner elements messing with the keybinds. So if you encounter a similar issue and use karabiner, try disabling a few complex keybinds.

@jacobleblanc-cs
Copy link

jacobleblanc-cs commented Sep 27, 2023

I am still having the issue of the scripting addition not functioning on macOS 13. The command sudo yabai --load-sa returns no errors, but there is also absolutely no output in the console when filtering for dock, even after executing pkill dock first. I have SIP disabled with this output:

System Integrity Protection status: unknown (Custom Configuration).

Configuration:
	Apple Internal: disabled
	Kext Signing: enabled
	Filesystem Protections: disabled
	Debugging Restrictions: disabled
	DTrace Restrictions: enabled
	NVRAM Protections: disabled
	BaseSystem Verification: enabled
	Boot-arg Restrictions: disabled
	Kernel Integrity Protections: enabled
	Authenticated Root Requirement: enabled

This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.

And my boot arguments, as found by nvram -p | grep boot-args are:

boot-args	-arm64e_preview_abi

Yabai has accessibility permissions.

Yabai is functioning in other ways, which leads me to believe it's just the scripting extension not loading completely. My sudoers file is set up properly, I've checked it a hundred times and remade it too. Some functionality that is working is bsp tiling, padding, disabling shadows (!! doesn't this require the scripting addition?), and gaps.

I'm using skhd for hotkeys, but I've also tested the yabai -m space --focus commands on the command line directly, and they execute without error but don't do anything, so I'm sure it's a yabai issue.

@jay0ma
Copy link

jay0ma commented Sep 29, 2023

I am also having an issue with the scripting addition on macOS Ventura. My SIP is completely disabled, and my boot args are:
boot-args -arm64e_preview_abi amfi_get_out_of_my_way=0x1 ipc_control_port_options=0

However, for me, most things work except for window opacity ( from what I see )

@koekeishiya
Copy link
Owner Author

#1766

@rickalex21
Copy link

Same here:

#!/usr/bin/env bash

sudo yabai -m --load-sa
yabai -m space --focus 2

Output:

yabai-msg: failed to connect to socket..
cannot focus space due to an error with the scripting-addition.

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