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

Alacritty/winit event loop stalls and delays keyboard events #7948

Open
awused opened this issue May 4, 2024 · 2 comments
Open

Alacritty/winit event loop stalls and delays keyboard events #7948

awused opened this issue May 4, 2024 · 2 comments
Labels

Comments

@awused
Copy link
Contributor

awused commented May 4, 2024

Since upgrading to Fedora 40 and Alacritty 0.13.2 I've been dealing with frequent keyboard stalls, where I will type characters but nothing will happen, but only in Alacritty. They can be several seconds long and, though I didn't time it, I think I've had one or two over ten seconds long.

Mouse events are not affected, and if I'm quick I'm able to scroll windows that are experiencing keyboard stalls with the mouse wheel while they remain stuck. They happen regardless of the application running in the terminal. Having activity in other terminals (cat /dev/random) seems to cause them much more frequently.

System

OS: Fedora 40
Version: alacritty 0.13.2

Linux/BSD: x11, i3, picom at first but then no compositor (did not make a difference)

Logs

Keyboard and bindings:

I caught a few of the stalls, but this one is definitely the cleanest:

[118.792198856s] [INFO ] [alacritty] winit event: AboutToWait
[118.796161403s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10512, tv_nsec: 3108315 }, requested_resume: None })
[118.796180619s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: CursorLeft { device_id: DeviceId(X(DeviceId(2))) } }
[118.796191389s] [INFO ] [alacritty] winit event: AboutToWait
[118.805209435s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10512, tv_nsec: 7098463 }, requested_resume: None })
[118.805236506s] [INFO ] [alacritty] winit event: AboutToWait
[118.869164706s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10512, tv_nsec: 16145212 }, requested_resume: None })
[118.869183922s] [INFO ] [alacritty] winit event: AboutToWait
[118.885150626s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10512, tv_nsec: 80089914 }, requested_resume: None })
[118.885171204s] [INFO ] [alacritty] winit event: AboutToWait
[119.125184420s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10512, tv_nsec: 96077116 }, requested_resume: None })
[119.125207593s] [INFO ] [alacritty] winit event: AboutToWait
[119.205177047s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10512, tv_nsec: 336114797 }, requested_resume: None })
[119.205195772s] [INFO ] [alacritty] winit event: AboutToWait
[119.325185499s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10512, tv_nsec: 416101753 }, requested_resume: None })
[119.325212088s] [INFO ] [alacritty] winit event: AboutToWait
[122.029282210s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10512, tv_nsec: 536120024 }, requested_resume: None })
[122.029337544s] [INFO ] [alacritty] winit event: AboutToWait
[122.157192181s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10515, tv_nsec: 240246010 }, requested_resume: None })
[122.157219441s] [INFO ] [alacritty] winit event: AboutToWait
[123.456324058s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10515, tv_nsec: 368126485 }, requested_resume: None })
[123.456398297s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyD), logical_key: Character("d"), text: Some("d"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("d"), text_with_all_modifiers: Some("d") } }, is_synthetic: false } }
[123.456425217s] [INFO ] [alacritty] winit event: AboutToWait
[123.457810507s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 667340206 }, requested_resume: None })
[123.457852385s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyS), logical_key: Character("s"), text: Some("s"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("s"), text_with_all_modifiers: Some("s") } }, is_synthetic: false } }
[123.457869056s] [INFO ] [alacritty] winit event: AboutToWait
[123.458543226s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 668787411 }, requested_resume: None })
[123.458571659s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyA), logical_key: Character("a"), text: Some("a"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("a"), text_with_all_modifiers: Some("a") } }, is_synthetic: false } }
[123.458580245s] [INFO ] [alacritty] winit event: AboutToWait
[123.459007674s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 669489633 }, requested_resume: None })
[123.459036468s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyD), logical_key: Character("d"), text: Some("d"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("d"), text_with_all_modifiers: Some("d") } }, is_synthetic: false } }
[123.459044874s] [INFO ] [alacritty] winit event: AboutToWait
[123.459425345s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 669953701 }, requested_resume: None })
[123.459451424s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyF), logical_key: Character("f"), text: Some("f"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("f"), text_with_all_modifiers: Some("f") } }, is_synthetic: false } }
[123.459459699s] [INFO ] [alacritty] winit event: AboutToWait
[123.459868814s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 670365070 }, requested_resume: None })
[123.459894452s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyF), logical_key: Character("f"), text: Some("f"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("f"), text_with_all_modifiers: Some("f") } }, is_synthetic: false } }
[123.459902457s] [INFO ] [alacritty] winit event: AboutToWait
[123.460317522s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 670810913 }, requested_resume: None })
[123.460342058s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyA), logical_key: Character("a"), text: Some("a"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("a"), text_with_all_modifiers: Some("a") } }, is_synthetic: false } }
[123.460350214s] [INFO ] [alacritty] winit event: AboutToWait
[123.460716839s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 671255544 }, requested_resume: None })
[123.460743198s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyS), logical_key: Character("s"), text: Some("s"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("s"), text_with_all_modifiers: Some("s") } }, is_synthetic: false } }
[123.460751253s] [INFO ] [alacritty] winit event: AboutToWait
[123.460764177s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 671658878 }, requested_resume: None })
[123.460770760s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(6291461))), payload: Terminal(Wakeup) })
[123.460778013s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: RedrawRequested }
[123.461128108s] [INFO ] [alacritty] winit event: AboutToWait
[123.461142665s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 672037135 }, requested_resume: None })
[123.461264442s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyD), logical_key: Character("d"), text: Some("d"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("d"), text_with_all_modifiers: Some("d") } }, is_synthetic: false } }
[123.461272998s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(6291461))), payload: Terminal(Wakeup) })
[123.461278128s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(6291461))), payload: Frame })
[123.461283388s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: RedrawRequested }
[123.461561498s] [INFO ] [alacritty] winit event: AboutToWait
[123.461572488s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 672468201 }, requested_resume: Some(Instant { tv_sec: 10516, tv_nsec: 679662769 }) })
[123.461579371s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(6291461))), payload: Terminal(Wakeup) })
[123.461584010s] [INFO ] [alacritty] winit event: AboutToWait
[123.461653690s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 672489160 }, requested_resume: Some(Instant { tv_sec: 10516, tv_nsec: 679662769 }) })
[123.461765419s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyF), logical_key: Character("f"), text: Some("f"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("f"), text_with_all_modifiers: Some("f") } }, is_synthetic: false } }
[123.461773905s] [INFO ] [alacritty] winit event: AboutToWait
[123.462166428s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 672679846 }, requested_resume: Some(Instant { tv_sec: 10516, tv_nsec: 679662769 }) })
[123.462187047s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyF), logical_key: Character("f"), text: Some("f"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("f"), text_with_all_modifiers: Some("f") } }, is_synthetic: false } }
[123.462193529s] [INFO ] [alacritty] winit event: AboutToWait
[123.462527052s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 673101374 }, requested_resume: Some(Instant { tv_sec: 10516, tv_nsec: 679662769 }) })
[123.462549063s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyF), logical_key: Character("f"), text: Some("f"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("f"), text_with_all_modifiers: Some("f") } }, is_synthetic: false } }
[123.462555496s] [INFO ] [alacritty] winit event: AboutToWait
[123.462893397s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 673460035 }, requested_resume: Some(Instant { tv_sec: 10516, tv_nsec: 679662769 }) })
[123.462916941s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyF), logical_key: Character("f"), text: Some("f"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("f"), text_with_all_modifiers: Some("f") } }, is_synthetic: false } }
[123.462923443s] [INFO ] [alacritty] winit event: AboutToWait
[123.463286512s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 10516, tv_nsec: 673830757 }, requested_resume: Some(Instant { tv_sec: 10516, tv_nsec: 679662769 }) })
[123.463313142s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(6291461)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), event: KeyEvent { physical_key: Code(KeyF), logical_key: Character("f"), text: Some("f"), location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { key_without_modifiers: Character("f"), text_with_all_modifiers: Some("f") } }, is_synthetic: false } }

I was tapping the f key at a fairly consistent pace. Almost every single one of those WaitCancelled events was a physical key press on my keyboard, but the characters were not visible for nearly 5 seconds and then a backlog of characters all came at once in a very short burst.

@kchibisov
Copy link
Member

Do you have any input method running or other input software? It just sounds like IME issue or something.

@awused
Copy link
Contributor Author

awused commented May 4, 2024

Disabling my IME (ibus) seems to have fixed it, at least no stalls in the last ~20 minutes, which is probably good enough given how common they were. Though no other applications (including other terminals, but I have nothing else using winit) have been affected. I've been using my IME unchanged for nearly a decade now, and it wasn't updated in the system upgrade, so I'm not actually confident that it's the root of the issue.

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

No branches or pull requests

2 participants