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

Kitty 0.22.1 hangs on Apple Silicon / M1 #3890

Closed
ahmedre opened this issue Jul 31, 2021 · 19 comments
Closed

Kitty 0.22.1 hangs on Apple Silicon / M1 #3890

ahmedre opened this issue Jul 31, 2021 · 19 comments
Labels

Comments

@ahmedre
Copy link

ahmedre commented Jul 31, 2021

Describe the bug
On Kitty 0.22.1, if I open a terminal and type any two characters, the first character appears and then the terminal just hangs. If I quit and try again, I can repro this 100%. This is only happening on Apple Silicon (on the M1), it works fine on Intel Macs.

This doesn't happen on 0.21.2 nor on 0.22.0, but happens on 0.22.1.

To Reproduce
Steps to reproduce the behavior:

  1. Open a new instance of Kitty
  2. Type any two characters (ls) or hit enter
  3. Kitty hangs

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2021-08-01 at 12 30 05 AM

One of these terminals is after cmd+n after the first one hangs.

Environment details

Press Ctrl+Shift+F6 (cmd+option+, on macOS) in kitty, to copy debug output about kitty and its
configuration to the clipboard and paste it here. 

On older versions of kitty, run kitty --debug-config instead

Shortcut does nothing for me :( Command line parameter says "unknown option."

Additional context

Problem happens withkitty --config NONEalso.

@ahmedre ahmedre added the bug label Jul 31, 2021
@ahmedre
Copy link
Author

ahmedre commented Jul 31, 2021

as an update, on Intel Macs, this same one doesn't happen, but I found a reproducible way to get a similar hang on Intel based Macs (though to be honest, I didn't try the previous versions of Kitty with this repro on Intel Macs yet to see if I can repro with them) -

  1. launch Kitty.
  2. hit ctrl+d so no Kitty terminal is open.
  3. if you have screensavers that a launch when in a corner, go to the corner and let the screensaver start (I wait 1 second usually).
  4. move the mouse or press a key to wake up the computer
  5. tap the Kitty icon in the dock

expected: new Kitty terminal ready to go
actual: new Kitty terminal with no prompt, no cursor, etc.

@kidonng
Copy link
Contributor

kidonng commented Aug 1, 2021

I can confirm Kitty also hangs on Intel Macs. I kept a open Kitty window and closed the lid, and when I open the lid and wake up the laptop this morning, Kitty hangs.

@kovidgoyal
Copy link
Owner

Do a bisect, most likely it is because of #3875

@zzhaolei
Copy link

zzhaolei commented Aug 1, 2021

After the update, enter any character hang in the full-screen

@kovidgoyal
Copy link
Owner

The issue with hanging on sleep/screensaver is a long standing one, its a bug In CVDisplay link, and can be easily worked around, see #2016 that has nothing to do with this issue.

@kidonng
Copy link
Contributor

kidonng commented Aug 1, 2021

The issue with hanging on sleep/screensaver is a long standing one, its a bug In CVDisplay link, and can be easily worked around, see #2016 that has nothing to do with this issue.

Ah OK, this is the first time I experienced this and this new issue immediately caught my eye.

kovidgoyal added a commit that referenced this issue Aug 1, 2021
Try to ensure we have a functioning displaylink always.
GLFW skips over sleeping monitors during a poll and also
had a bug where the display link was not re-created for a monitor
that already had a glfw monitor entry.

Also add a bunch more debug reporting
@kovidgoyal
Copy link
Owner

Doesnt reproduce for me on my Intel mac, but after staring at the code for some time, here is a possible fix: ade4e67

please test it and let me know if it works or not. Build kitty like this: https://sw.kovidgoyal.net/kitty/build/

@ahmedre
Copy link
Author

ahmedre commented Aug 1, 2021

@kovidgoyal thank you - that fixes it for me on the m1 (not sure if it matters or not, but I did not do make app - I only did make and ran ./kitty/launcher/kitty).

@zzhaolei
Copy link

zzhaolei commented Aug 2, 2021

For Me, after compiling the latest code, everything is fine

@kovidgoyal
Copy link
Owner

Closing as fixed.

@zzhaolei
Copy link

zzhaolei commented Aug 3, 2021

@kovidgoyal This issue has been fixed in 0.22.2. However, when setting the attribute hide_window_decorations yes, this problem occurs again.

@kovidgoyal
Copy link
Owner

kovidgoyal commented Aug 3, 2021 via email

@zzhaolei
Copy link

zzhaolei commented Aug 3, 2021

@kovidgoyal

OS:
macOS Big Sur
version 11.5.1

Conf:
Just need this one configuration, then restart the application, set the full screen, you can reproduce

~/.config/kitty/kitty.conf :

hide_window_decorations    yes

@kovidgoyal
Copy link
Owner

Doesn't reproduce for me with the following:

  1. Run: kitty --config NONE -o hide_window_decorations=y
  2. Press ctrl+shift+f11 to toggle full screen
  3. Click inside the full screen window
  4. type something, it shows up

@zzhaolei
Copy link

zzhaolei commented Aug 3, 2021

Reproduce it for me like this:

1.Run: kitty --config NONE -o hide_window_decorations=y
2.Press ctrl+command+f `(System shortcut key)` to toggle full screen
3.This operation is not required
4.I Can’t input anything

@kovidgoyal
Copy link
Owner

You cant input anything because the window doesnt have focus. click in
it
. There was a reason I included step 3 above.

@bitwalker
Copy link

Just wanted to chime in and say that I've been experiencing this as well. I've built v0.22.2 and will report back by tomorrow if it is still happening on my system, fingers crossed its fixed though.

Oddly enough, it seemed to predictably happen after sleep, but there was at least one time where I didn't let my laptop sleep but it still happened. Unfortunately it caught me off guard so I wasn't paying attention to what caused it, but I'm suspecting that the screensaver turned on for a second, or was activating, and that's why. Anyway, if I notice any other root causes I'll follow up.

@zzhaolei
Copy link

zzhaolei commented Aug 3, 2021

I'm sorry. After I've performed step 3, it's working!

@zzhaolei
Copy link

zzhaolei commented Aug 3, 2021

@bitwalker If the program is compiled locally, the old program is started when the first step (kitty --config NONE -o hide_window_decorations=y) is executed.

Maybe you should run ./kitty/launcher/kitty --config NONE -o hide_window_decorations=y?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants