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

High CPU when using an application in full screen #339

Closed
peppy opened this issue Dec 12, 2019 · 8 comments
Closed

High CPU when using an application in full screen #339

peppy opened this issue Dec 12, 2019 · 8 comments
Labels
bug Something isn't working

Comments

@peppy
Copy link

peppy commented Dec 12, 2019

On one of my PCs, I can reproduce yabai using insanely high CPU while focused on a fullscreen app.

Profile sample: yabai.txt
Configuration: yabairc.txt (may be related to my custom rule, requires further testing)

➜  ~ yabai --version
yabai-v2.1.3
➜  ~ uname -a
Darwin ppybook 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64

macOS 10.15.1 (19B88)

Please let me know if more information is required.

@koekeishiya
Copy link
Owner

Are there any differences in configuration between your machines, if it only happens on one of them? Does the high CPU usage persist if you switch away from the fullscreen space?

Is this happening for all applications or only for specific applications?

Can you try to reproduce this after disabling focus_follows_mouse and/or certain rules that you think could interfere?

@koekeishiya koekeishiya added the bug Something isn't working label Dec 14, 2019
@peppy
Copy link
Author

peppy commented Dec 14, 2019

The CPU usage immediately drops on switching away from the fullscreen application. I had to take the profile sample from an ssh session to capture it due to this.

I'll see if I can narrow it down any further.

@koekeishiya
Copy link
Owner

I assume that the issue is that the following spin-lock triggers incorrectly in this case: https://github.com/koekeishiya/yabai/blob/master/src/event.c#L672

So what is supposed to be happening here, is that this specific code-path should only trigger when an application exits fullscreen-mode. The spin-lock is in place because we have to wait until the animation finishes before we can interact with the window again.

koekeishiya added a commit that referenced this issue Dec 14, 2019
@koekeishiya
Copy link
Owner

I've made some adjustment on the master branch. Can you run that version and see if you are able to reproduce the issue?

@peppy
Copy link
Author

peppy commented Dec 15, 2019

Thanks for the quick changes!

I've been trying to repro it before updating to master but can't seem to make it happen again. I'll continue with my daily use on master and let you know if it appears again.

@peppy peppy closed this as completed Dec 15, 2019
@peppy
Copy link
Author

peppy commented Dec 15, 2019

Just an aside, the brew install --HEAD yabai package doesn't seem to be tracking beyond the last release.

@dominiklohmann
Copy link
Collaborator

Just an aside, the brew install --HEAD yabai package doesn't seem to be tracking beyond the last release.

That's a Homebrew thing, you'll have to uninstall before installing from HEAD.

koekeishiya added a commit that referenced this issue Dec 15, 2019
@peppy
Copy link
Author

peppy commented Dec 15, 2019

Thanks, that worked.

I managed to repro again before updating, and find a relatively reliable repro case. It does look to be resolved on head!

@koekeishiya koekeishiya added the addressed not released Fixed upstream, but not yet released label Dec 16, 2019
@koekeishiya koekeishiya removed the addressed not released Fixed upstream, but not yet released label Jan 19, 2020
brorbw pushed a commit to brorbw/yabai that referenced this issue Jan 28, 2020
brorbw pushed a commit to brorbw/yabai that referenced this issue Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants