-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
Long delay until Alt-Tab opens #3845
Comments
Hi, Could you please share a video of this issue? Does it happen on v7.3.0? You mentioned that the issue seems related to issue #3839. What makes you think that? The symptoms you described seem different than this other ticket. Do you experience the selection going to the last item without you holding Thank you 🙇 |
Hard to share a video of something that is not happening. But the description is: I press Cmd+Tab (my hotkey), nothing happens immediatley (I wait) sometimes alt-tab opens. Or I start pressing Cmd+Tab till finally it opens. 7.3.0 was the version I finally gave up and reverted back to 6.73. But it was happening for a couple of weeks now, 7.3.0 just made it unusable to me. Problem is, it coinsided with multiple changes - Sequoia, Unity new versions... that's why I didn't pay much attention initially. But with the same OS, with the same programs and back to 6.9 I don't notice the problem anymore. Why I think it might be related to #3839? If this was Windows, I would say "it feels like other programs are taking priority over the processor (or keyboard interrupts?) and Alt-Tab gets stuck waiting for GPU or CPU time". But I have no clue how internally Mac (or Windows, for that mater) works. Just a hunch. Sorry for the long-winded (and dyslexic) answer, trying to provide more info :). |
Added screen recording. |
Some more info: switched to 7.2, and dont notice the effects I was commenting about in 7.3. |
Hi, |
@Bacto , I wonder if yor care to rolback to 7.2, would it work better? In my experience it is Ok, but I use it without window previews. |
7.2 seems to work great. |
Thank you @vladunev-tomtom for the great info 🙇 @vladunev-tomtom @Bacto Could you please run these commands in Terminal.app and share the results?
Thank you |
I got same issue, here is my results
|
Thanks @lwouis for you follow-up. Here is the result:
|
defaults read -g KeyRepeat |
I'm experiencing the same issue with 7.3.0 and it goes away when reverting to 7.2.0 My key repeat values are 2 and 15 like others have shown. |
Hi, Could you please test this local build, and let me know if the issue happens with it? Thank you 🙇 |
I'm able to reproduce this somewhat, suing I press and release the shortcut quickly, then there is a delay to show AltTab UI, then sometimes the UI stays open even though I released the keys. I'll dig deeper into this issue now that I can somewhat reproduce the issue 👍 |
I've been using the special build for about an hour and havent seen it. I have alot of browsers and tabs open so there is memory pressure but CPU usage is not too stressed, fwiw. |
Hi everyone, Could you please try out this build? I think I've nailed down the data-race, and that this build will never leave the switcher UI open if the keys are released. At least, I can't reproduce any issue with this build. If it helps you, you can run the same command I use to generate load artificially in my machine: Thank you 🙇 |
I'll give it a try... the previous special build has shown the problem at least once since I've been using it for a few hours. |
Thank you @stevehoek
The previous build was me reverting one commit from v7.3 to how the code was in v7.2. I wanted to narrow down if that commit was the root cause of your issues. Your results seems to confirm that the problem was also happening in v7.2, and was perhaps worsened in v7.3, but not introduced there. Ideally, if the build I shared works for everyone, we can move forward to the next release with it, and forget about this issue 👍 |
@lwouis |
@lwouis does the new 7.4.0 include this fix? |
Sorry to say that both new builds, while feeling somewhat better, does not solve the issue for me. For comparison, 6.9 still continues to work for me even with heavy load, even with window previews. Window previews are big nono for the 7.x versions - not that it can't display them, but it hickups much more often with window previews. In icon-only mode, I notice with both new builds that when it does not respond to hotkey, I wait, then start alt-tabbing multiple times, and in goes through a strange process of drawing the icons - they first appear blurry and slightly larger, then snap to the right size and get crisp. |
Hi, There are multiple different issues in this thread, I think. Here's what I gather from everyone has shared so far:
So far, I've identified 1 issue on the tech side: under heavy load, macOS can send key events in the wrong order. It can also not send some key events. I'm planning to add support for this. It will not work for every case, but should handle most cases. This should fix issue number 1 listed above. I'm not sure what root causes lie behind issues 2, 3, and 4. Thank you |
@lwouis the most recent special build is working well for me for 2 days now... does 7.4.0 include its fixes? or should I not update |
@stevehoek no. These changes are not in any released build |
@lwouis the change in the most recent special build from this thread is still working well for me. It would be nice to have the change in a public build. |
# [7.8.0](v7.7.0...v7.8.0) (2024-12-06) ### Features * bring back the cursor follow focus feature ([#3882](#3882)) ([73382db](73382db)) * improve display of very small windows (closes [#3902](#3902)) ([9bafd03](9bafd03)) * improve irish localization ([89c02c9](89c02c9)) * switcher will show faster (closes [#3845](#3845)) ([b694c83](b694c83))
I hope it's okay to still comment on this issue given that it's been closed, but feel free to redirect me if needed. I have been using 7.8 for two days now and I'm afraid that I am still experiencing the issue. It can take up to 20 seconds for AltTab to react when the keyboard shortcut is used; though it happens only a few times a day, after the shortcut has not been used for a longer time. Feel free to let me know if there is any information I can provide to help figure out where the cause may lie (as it might thus not be with the thumbnails...) |
To support what @timothyvermeiren wrote: First, the good news are that the update solved most of the problem. Alt-Tab reacts immediatly now. No more unpredictable delays before it opens, and it seems to work well under load. I think this is the async windows display working as it should. Thank you @lwouis! That said, in 10 hours I've experienced twice a situation as described by @timothyvermeiren. Both times the situation arose at the first Alt-Tab use after the machine was left untouched for a relatively long time - 20-30 minutes. So, the problem might be related to not accepting keyboard keys after idle. Or might be related to some behavior of Alt-Tab where it waits for stored images of the windows, which are no longer available in memory? At any rate, this feels like a new problem. Question to @timothyvermeiren: do you have some potentially conflicting programs like Karabiner or BetterTouchTool running? I have both, and while Karabiner has never caused me a problem in 6 years of usage, I don't have extensive experience with BTT. Alt-Tab v.7.10 |
Please @timothyvermeiren @be9em0t, disable all remapping software, use internal laptop keyboard, etc, in your tests. This way we can isolate if the issue is actually with AltTab, of if it's with something else that gets in the way. Thank you 🙇 |
Yes, @be9em0t, what you say all aligns with my experience! I do have BTT, so I'll disable that now as suggested. @lwouis, to ensure testing goes well:
I'll report back on the situation later... |
Ok, here is the result of one more day of testing 7.10:
My feeling still is that the problem with waiting for window previews to display is solved by the async fix, and this bug here is caused by something else. One thing to try is using Option+Tab to invoke it instead of Command-Tab, as I usually do. Maybe it's just some bug in Sonoma that randomly blocks Command-Tab, being internal macos hotkey? One final note, in my experience Adobe programs are very agressive both on Mac and on Windows , breaking other programs in subtle ways. That said, I haven't noticed this kind of problem on AltTab 6.xx. |
@be9em0t thank you. Maybe Karabiner is interfering |
@lwouis I agree with @be9em0t that the preview update is solved but this issue is a different bug that causes the preview window to not show in a timely fashion after pressing alt-tab. As a user if you don't get the result you expect you press the key combo again. Worst case I've had to wait 30-45sec before it shows. It is usually when my machine is under stress (M3 Max but 100's of tabs open, spreadsheets, remote desktop, etc) |
@lwouis so I just had it happen that I had to hit alt-tab 5 times before the preview came up. The machine is not loaded right now, but there are two full screen remote desktop sessions open (but not the currently focused "window/space"). |
Thank you @stevehoek. An issue we face is that if everyone who faces the new issue has Karabiner running, then we can't be sure that it's not a Karabiner issue. It's reasonable to expect that it is indeed a Karabiner issue if few people face it, and all of them run the app. I'm not sure what I can do to debug this issue further. Indeed, I've never reproduced it on my machine. |
@lwouis that is understandable, but i have been running the same verrsion of Karabiner for quite awhile and didnt have this problem until recently, the 7.x timeframe for AltTab I'd guess. |
@lwouis On the latest version, I'm still experiencing the long 10s delay until it finally shows up, and I don't have or use Karabiner. So this isn't tied to Karabiner interference, per se. |
Yes. It came back to me too. |
@imkebe - do you happen to have Karabiner too? I looked up at Karabiner site and they appear to have some problem with Karabiner behavior after wake up from sleep. So I've took to restarting Karabiner after heavy load or after wake. Everything behaves perfectly now, as opposed to earlier when AltTab plainly refused to open on multiple occasions. It would be nice if the solution is so simple, though this does not explain why this became a problem only in 7.xx |
@Koolstr do you have any software interfering with keyboard input (e.g. BTT)? Do you use an external keyboard? Non-English keyboard layout? Etc |
Yes. I have Karabiner installed. Nothing fancy. ISO Keyboard. Some complex modifications for Dev related tools to use Fn keys. Etc. About the keyboard... Whole day i'm using external BT Logitech Keyboard. Now on MacBook internal one - no issues so far. |
Thanks, @imkebe. This starts to look like a pattern. |
Karabiner-Elements 15.3.0 Karabiner is installing an system extension - org.pqrs.Karabiner-DriverKit-VirtualHIDDevice I've opend the Karabiner-EventViewer and it shows a Unknown Events when I've activated the Alt+Tab on my external keyboard.
Maybe this help a little. Also I've maped the native Alt+Tab to be used for AltTAb. |
Ok so everyone is using Karabiner. It's clearly an issue on their side, or in your particular setups then. I'm sorry but i can't help with external tools. I'll close the ticket. Please discuss this on the Karabiner repo. Thank you 🙇 |
I do not have Karabiner (sorry 😬) but I do have BetterTouchTool and Expanso. Same symptoms as described the others (very long delay before any reaction). I'll try another day with these two disabled and see if there's any difference. |
@timothyvermeiren With Karabiner I find that restarting it automaticaly on wake makes the problem go away (they even have shell script to do this for you). |
I can try that, thanks @vladunev-tomtom. One more thought here @lwouis: I am not sure the keyboard shortcut is effectively intercepted by another program. I found that it's effectively AltTab become unresponsive, because when I try to e.g. access its preferences with the icon in the menu bar, it shows the spinning beach ball icon. This lasts for as long as the delay we experience, and as soon as that's over, AltTab shows up and the icon becomes available again. Is there something else I can do to troubleshoot this particular situations? Would logs of any sort be relevant here? |
Thank you @timothyvermeiren |
I had the same experience, icon not responding! |
Ah, excellent! Alright, I'll run the app with debug logging for a while. |
Hey everyone, |
Since version 7.x the time between pressing the hotkey (sey Cmd+tab) and Alt-Tab actually showing can take long time - 5, 10 seconds and more. Usually after the 5th second I start repeating the hotkey and Alt-Tab appears. This seems related to issue #3839.
Steps to reproduce the bug
Your environment
The text was updated successfully, but these errors were encountered: