yabai
yabai copied to clipboard
yabai causing browser tabs to crash
Hi - I've been using yabai on an intel based mac for around 4 months. It's been great except a small bug where it would occasionally cause a newly created tab on firefox to crash.
There isn't any consistency in terms of the type of websites I am visiting when the crash occurs - this would occur between 5-20 times a day depending on browser usage. I searched through the issues and couldn't find anyone else with the problem so I just lived with it as the productivity boost gained from having a nice tiling window manager outweighed this inconvience.
However I've recently gotten a new m1 macbook, I've configured it the same way as my intel (except for the additional step when disabling SIP) and I am still getting the browser tab crashes, except now they are so frequent it becomes unusable really.
The behaviour I am seeing is; -only the individual tab crashes, not firefox itself -cmd + t to open a new tab, sometimes would cause the tab to crash -new tab, google search works fine then clicking on a link in the results causes a crash -browsing a site fine and then it will crash randomly
I'm currently using yabai + skhd + spacebar (I'm on yabai-v4.0.1 ). The reason I think yabai is causing this issue is because I used the laptop vanilla for a while with no issues, installed yabai, skhd and spacebar but only started the yabai service and then saw the issue. If I disable yabai the issue goes away.
I'm assuming because no one else is having this issue and I can replicate it from one mac to another that it's something to do with my configuration.
output of csrutil status
csrutil status
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: disabled
Authenticated Root Requirement: enabled
This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.
Here is my configs;
.yabairc
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
yabai -m config layout bsp
# Set all padding and gaps to 20pt (default: 0)
yabai -m config top_padding 30
yabai -m config bottom_padding 20
yabai -m config left_padding 20
yabai -m config right_padding 20
yabai -m config window_gap 20
yabai -m config mouse_follows_focus on
yabai -m config focus_follows_mouse autoraise
yabai -m config window_placement second_child
yabai -m config window_topmost off
yabai -m config window_shadow float
yabai -m config window_opacity on
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.90
yabai -m config window_border on
yabai -m config window_border_width 6
yabai -m config active_window_border_color 0xff3e5ea3
yabai -m config normal_window_border_color 0xff555555
yabai -m config insert_feedback_color 0xffd75f5f
yabai -m config split_ratio 0.50
yabai -m config auto_balance off
yabai -m config mouse_modifier cmd
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
yabai -m config mouse_drop_action swap
# create spaces
yabai -m space --create 1
yabai -m space --create 2
yabai -m space --create 3
yabai -m space --create 4
yabai -m space --create 5
yabai -m space --create 6
yabai -m space --create 7
yabai -m space --create 8
yabai -m space --create 9
# label spaces
yabai -m space 1 --label web
yabai -m space 2 --label code
yabai -m space 3 --label term
yabai -m space 4 --label scratch
yabai -m space 5 --label notes
yabai -m space 6 --label zoom
yabai -m space 7 --label mail
yabai -m space 8 --label slack
yabai -m space 9 --label music
# app space rules
yabai -m rule --add app=Firefox space=web
yabai -m rule --add app=Subl space=code
yabai -m rule --add app=Terminal space=term
yabai -m rule --add app=zoom space=zoom
yabai -m rule --add app=Outlook space=mail
yabai -m rule --add app=Slack space=slack
yabai -m rule --add app=Spotify space=music
yabai -m rule --add app=Xcode space=code
yabai -m rule --add app=Emacs manage=on space=notes
yabai -m rule --add title='mylauncher' manage=off sticky=on layer=above border=off
yabai -m rule --add app="^System Preferences$" layer=above manage=off
yabai -m rule --add app="^Zoom Meeting$" layer=above manage=off
yabai -m rule --add app="Cisco AnyConnect Secure Mobility Client" layer=above manage=off
yabai -m config debug_output on
# spacebar padding on top screen
SPACEBAR_HEIGHT=$(spacebar -m config height)
yabai -m config external_bar all:$SPACEBAR_HEIGHT:20
echo "yabai configuration loaded"
.spacebarrc
#!/usr/bin/env sh
spacebar -m config position top
spacebar -m config height 35
spacebar -m config title off
spacebar -m config spaces on
spacebar -m config clock on
spacebar -m config power on
spacebar -m config padding_left 20
spacebar -m config padding_right 30
spacebar -m config spacing_left 35
spacebar -m config spacing_right 35
spacebar -m config text_font "Inconsolata:Regular:18.0"
spacebar -m config icon_font "Hack Nerd Font:Bold:20.0"
spacebar -m config background_color 0xff202020
spacebar -m config foreground_color 0xffa8a8a8
spacebar -m config space_icon_color 0xff458588
spacebar -m config power_icon_color 0xffd3d3d3
spacebar -m config battery_icon_color 0xffd75f5f
spacebar -m config dnd_icon_color 0xffa8a8a8
spacebar -m config clock_icon_color 0xffa8a8a8
spacebar -m config power_icon_strip
spacebar -m config space_icon_strip ﱘ
spacebar -m config space_icon
spacebar -m config clock_icon
spacebar -m config dnd_icon
spacebar -m config clock_format "%A %e %b %R"
spacebar -m config right_shell off
spacebar -m config right_shell_icon
spacebar -m config right_shell_command "$HOME/.config/cpu.sh"
spacebar -m config display main
echo "spacebar configuration loaded.."
.skhd
cmd - 1 : yabai -m space --focus web
cmd - 2 : yabai -m space --focus code
cmd - 3 : yabai -m space --focus term
cmd - 4 : yabai -m space --focus scratch
cmd - 5 : yabai -m space --focus notes
cmd - 6 : yabai -m space --focus zoom
cmd - 7 : yabai -m space --focus mail
cmd - 8 : yabai -m space --focus slack
cmd - 9 : yabai -m space --focus music
cmd - 0 : yabai -m space --focus 10
cmd - j : yabai -m window --focus next || yabai -m window --focus first
cmd - k : yabai -m window --focus prev || yabai -m window --focus last
# Move focussed window to space
shift + alt - 1 : yabai -m window --space 1 && yabai -m space --focus 1
shift + alt - 2 : yabai -m window --space 2 && yabai -m space --focus 2
shift + alt - 3 : yabai -m window --space 3 && yabai -m space --focus 3
shift + alt - 4 : yabai -m window --space 4 && yabai -m space --focus 4
shift + alt - 5 : yabai -m window --space 5 && yabai -m space --focus 5
shift + alt - 6 : yabai -m window --space 6 && yabai -m space --focus 6
shift + alt - 7 : yabai -m window --space 7 && yabai -m space --focus 7
shift + alt - 8 : yabai -m window --space 8 && yabai -m space --focus 8
shift + alt - 9 : yabai -m window --space 9 && yabai -m space --focus 9
shift + alt - 0 : yabai -m window --space 10 && yabai -m space --focus 10
# Kill a container
shift + alt - q : yabai -m window --close
shift + alt - w : yabai -m space --destroy
And here are screenshots of the crash - I decided to test on chromium to see if it happened there too and it seems to crash as well, albeit a different error.
Firefox
chromium
Interestingly I have been using safari this morning and haven't had a crash yet - I will update this if that changes.
If there is any additional information I can provide that would help, let me know.
Thanks for any help :)
I continued to use Safari and didn't experience any tab crashes which is quite interesting.
However, I discovered 2 more issues. Firstly, when I opened excel or libre calc, after a few actions it would lock the laptop up and I'd have to restart. Disabling yabai and using those applications works fine.
Secondly, I started to experience a mixmatch of workspaces. I'd select 4 and it would go to 5, or I'd select 5 and it would change to 5 but on spacebar it would display as 9 being selected. Restarting yabai fixed this but then it would occur again. I'm using the exact same config files as I used on my intel where I didn't experience these problems.
I've had to disable yabai for now but if I can provide any more information to help diagnose these issues let me know.
Thanks again
If this is an issue in the latest version of yabai, then there isn't much that can be done from my pov. Hopefully Firefox has improved their handling of AX-API requests since then. See #1344 for issues witih Libreoffice.