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

[Support request]: Yabai not tiling windows properly after update to ver 3 #524

Closed
BlueDrink9 opened this issue May 15, 2020 · 27 comments
Closed
Labels
help wanted Community help appreciated question Request for information or help, not an issue

Comments

@BlueDrink9
Copy link

Yabai is making single windows take up the full screen fine, but opening new windows via skhd seems to have broken some time after updating to version 3. The second windows are opening either in the top quarter (with blank space below), or bottom quarter (blank above), or sometimes in the middle of the screen. Openign a 3rd window puts it in the blank quarter, but off-center. Running yabai -m space --balance with 2 windows will sometimes mode the quartered window to the center the first time, then to full half-screen the second time.
Sometimes the second window opens fine, but when I open a 3rd, the second window moves to quarter correctly, but the 3rd window opens in the same quarter, again misaligned.

This even happens if I restart with no yabairc. Persisting across restarts.

Downgrading back to 2.4.3 also hasn't helped.

Are there some caches I could look at clearing to help reinstall?

@koekeishiya
Copy link
Owner

New self-signed certificate used to sign the released binaries because the previous one expired at april 21th, 2020. You will have to re-enable accessibility permissions after this install. Sorry about that.

I had to change the certificate for the 3.x.x release so you probably got hit by some accessibility nonsense. Try to first stop the yabai service, uninstall, then remove the yabai entry from the accessibility list. Do a system reboot, install yabai, and accept the accessibility permission followed by an application restart.

@BlueDrink9
Copy link
Author

BlueDrink9 commented May 15, 2020

I got prompted by accessibility when I updated, and gave it permission again. And occasionally yabai does work as intended, for one window. Yabai definitely can move windows around. And I get the notification that the scripting addon loads properly.

Given that, do you still think it would help?

@koekeishiya
Copy link
Owner

Yes, it should still help. The issues you describe sound very much like an inconsistency with the accessibility permission where the system sometimes think you have access, and sometimes it thinks you don't. I don't exactly know the details of why it happens, but I did experience these symptoms a long time ago when I first started doing these things.

@koekeishiya koekeishiya added help wanted Community help appreciated question Request for information or help, not an issue labels May 21, 2020
@koekeishiya
Copy link
Owner

Closing this. My previous comment should resolve the issue for you.

@BlueDrink9
Copy link
Author

I hadn't gotten around to restarting, but I just went through the steps you gave. Still happening, but I noticed the scripting addon gave a warning about an out-of-date payload. Small and easy thing to miss, might be worth making more obvious/documenting somewhere, or even prompting to auto-reinstall. I'm going to reinstall the scripting addon now and see if it fixes it

@BlueDrink9
Copy link
Author

Nope, didn't work, even after multiple restarts and no yabairc. Is there anything else I can clear?

@BlueDrink9
Copy link
Author

Spamming balance eventually gets the spacing right, btw, but almost always takes more than one balance (if that helps you identify possible causes)

@koekeishiya
Copy link
Owner

koekeishiya commented May 23, 2020 via email

@BlueDrink9
Copy link
Author

I'm not suggesting it's a bug, but does Yabai store any other settings/data that I could remove?

@koekeishiya
Copy link
Owner

koekeishiya commented May 24, 2020 via email

@BlueDrink9
Copy link
Author

BlueDrink9 commented May 24, 2020

Bother. Maybe I'll try on a different user and see if it's a software conflict. I'm on Mojave atm.

Edit: Updated to Catalina in the hopes of fixing this. It didn't

@BlueDrink9
Copy link
Author

On a new user with no rc, kitty seemed to tile fine, but finder, chrome don't tile well at all.

@BlueDrink9
Copy link
Author

BlueDrink9 commented Jun 8, 2020

Seems to be working fine again after uninstalling and re-installing the scripting addition, updating catalina, zapping the PRAM, and running manually instead of as a brew service. No idea which part fixed it.

@BlueDrink9
Copy link
Author

Although now windows are tiling veery slowly (iterating size and position about once every 0.5 seconds). Any thoughts on what might be causing that?

@koekeishiya
Copy link
Owner

koekeishiya commented Jun 8, 2020 via email

@BlueDrink9
Copy link
Author

3.1.1

@koekeishiya
Copy link
Owner

koekeishiya commented Jun 8, 2020 via email

@BlueDrink9
Copy link
Author

Yup, back to normal speed. Thank you for your help and work!

All of this stopping and restarting yabai has narrowed it down as a factor in a more serious issue I have been having (since version 3.10). Switching to new windows sometimes crashes windowserver (manifesting as a black screen, then the login screen shows). Focussing the system preferences window for the first time as it opens seems to be a factor, but if it is opened without yabai running then switched to once yabai has started, it seems to be fine.

I'll test with a minimal rc and see if it keeps happening.

@BlueDrink9
Copy link
Author

Update: 3.1.12 seems to have reverted my issue with windows not tiling properly.

@koekeishiya
Copy link
Owner

koekeishiya commented Jun 8, 2020 via email

@BlueDrink9
Copy link
Author

Maybe 3.1.1 didn't fix the bug, but it seemed to for the brief period of time I used it.

Thanks for pointing out 277. For some reason googling "yabai" + "crash" or "black screen" or "windowserver crash" didn't bring it up.

I've been testing with finder, chrome and kitty. I'll test with terminal and safari.

@BlueDrink9
Copy link
Author

Safari and terminal were both fine. I wonder if it has to do with finder, chrome and kitty all being started by skhd (which in turn was started by yabai)

@koekeishiya
Copy link
Owner

It does seem to be something with your setup then, but I don't actually know how to pinpoint what exactly. I tried to run skhd from my .yabairc and then have it launch kitty, and everything worked just fine. Then again, I ran yabai from a terminal session and not through brew services; no idea if that even matters.

What if you quit kitty completely and start it by just double-clicking the icon in /Applications.
Kitty is probably one of my most used applications and I have never had any compatibility issues with it.

@stoffeastrom
Copy link

Then again, I ran yabai from a terminal session and not through brew services; no idea if that even matters.

Recently started using yabai / skhd and one thing that hit me was that I was fiddling around with the fish shell and accidently set it to my default shell. This of course messed it all up since skhd picks upp the $SHELL environment which could be different running from a terminal vs brew services. Don't know if it's a case here but thought I atleast mention it.

@BlueDrink9
Copy link
Author

I got fed up with this again so went on a deep dive fixing things. New user with most things copied = worked. My user with ~/Library renamed = worked.

I think now it is finally fixed, thanks to deleting a bunch of folders in ~/Library/application support/com.apple.*, mostly to do with accessibility (I think com.apple.TCC was the main one). Complete list:

com.apple.CommerceKit.AskPermissionExtension
com.apple.cloudphotosd
com.apple.CloudPhotosConfiguration
com.apple.CloudDocsDaemon.StorageManagement
com.apple.CloudDocs.MobileDocumentsFileProvider
com.apple.ClassKit.diagnosticextension
com.apple.calculator
com.apple.BKAgentService
com.apple.AuthKitUI.AKFollowUpServerUIExtension
com.apple.AuthKitUI.AKAppSSOExtension
com.apple.archiveutility
com.apple.AquaAppearanceHelper
com.apple.AppStoreDaemon.ASDAskPermissionExtension
com.apple.AppSSOKerberos.KerberosExtension
com.apple.AppleMediaServicesUI.SpyglassPurchases
com.apple.AppleMediaServices.FollowUpExtension
com.apple.appkit.xpc.LegacyExternalColorPickerService
com.apple.appkit.xpc.ColorSampler
com.apple.AMPDeviceDiscoveryAgent
com.apple.AMPArtworkAgent
com.apple.amp.devicesui
com.apple.AmbientDisplayAgent
com.apple.AirPlayUIAgent
com.apple.AddressBook.UrlForwarder
com.apple.AddressBook.ContactsAccountsService
com.apple.AddressBook.ABPersonViewService
com.apple.AddressBook
com.apple.accessibility.mediaaccessibilityd
com.apple.accessibility.heard
com.apple..NowPlayingWidgetContainer.NowPlayingWidget
com.apple..NowPlayingWidgetContainer
com.apple.AMPLibraryAgent
com.apple.backgroundtaskmanagementagent
com.apple.TCC

@BlueDrink9
Copy link
Author

Happened again after a recent restart. Just removing com.apple.TCC and logging out didn't fix it, but removing com.apple.* and logging out did.

@BlueDrink9
Copy link
Author

I have identified the cause of this as a clash with a Hammerspoon script.
Removing the above files affected hammerspoon being set or not set to auto-open on login.

Running with just hammerspoon was fine, but when loading dbalatero/VimMode.spoon and reloading the config, this issue occurs again.
I have opened dbalatero/VimMode.spoon#45 to hopefully shed some light on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Community help appreciated question Request for information or help, not an issue
Projects
None yet
Development

No branches or pull requests

3 participants