-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Redraw randomly hangs until a keypress #824
Comments
I have the same exact bug. Ubuntu 16.04 with X11. However, the interesting thing is this, bug appears only on when working in tmux. |
For me it is the same with and without tmux. I guess it can be hard to debug. Please guide me how can I help with this, I'm familiar with rust. |
We've had a few isolated reports of this since the issue was originally "fixed". It's to the point I can no longer reproduce, but I am happy to advise you on doing the debugging if you're willing to get your hands dirty. There are two primary threads in Alacritty: 1. the parser thread, and 2. the render/input thread. The parser thread reads from the pty asynchronously and locks the terminal struct once it's got some data. With lock in hand, the parser runs and updates what is visible on the screen. After the buffer is drained and terminal updated, this thread sends an event to the render/input thread which should trigger a wakeup. This all happens within You might note that the render/input thread is only notified when the terminal The part where this is consumed on the render thread starts in main.rs. The first line in this loop let mut terminal = processor.process_events(&terminal, display.window()); will usually block and wait for events. Note that further down the loop, there's a check if terminal.needs_draw() {
// draw
} So either this check would be returning false, or control never reaches this point. Looking at I'm happy to help review the logs you generate or guide you through more of the code. Please let me know how else I can help; I would love to fully squash this bug, and I need help from someone like yourself to do it. |
@jwilm Thanks for a great guidance! Will find a spare time and start digging. |
I think I might be hit by the same issue and I have stayed on a rather old version of alacritty because of this (24c32dc). I don't think I can spare much effort right now into digging this as well but I can try to see if any fix helps my case. This is on Ubuntu 16.04 based system as well, with an elderly Intel HD 4000, at least judging by the Xorg.log. |
@jwilm Hey. I made some testing, but didn't figure out the issue. Firstly with debug build the problem is solving. I have an overclocked 4.7ghz cpu, so I guess it is a timing issue, which appears on fast enough cpus. Also commenting out Looks like the Edit: wrong frequency. |
This issue just started happening to me for the first time. I've been using alacritty as my main terminal for about 6 months and haven't seen the problem before, until now. I was able to narrow down the context in which the problem happen, at least for me. It only happens when using a compositor (happens with both mutter/gnome and compton for me), and when there are multiple Alacritty windows open. It does not happen with composition and just one window. PS: Deleted my previous messages since they weren't really accurate |
Might be related to #1227. |
It's happening on my i3-gaps + compton machine too. It seems that switching compton backend from |
same issue:
|
I have a hunch that this issue might be solved with #1518, since another similar issue was fixed with it. I've added this issue to the issues which will be automatically closed once that PR is merged. If anyone is able to reproduce this issue with #1518, please let me know and I'll remove the reference to this issue. |
Hi @chrisduerr I tried #1518 with #1403 and I'm still seeing the issue (randomly). No idea what's going on (is it related to the GPU?). This turns Alacritty a bit unusable :( (the only apparent way to force a redraw in my case by opening a new window and send the current (hanged) alacritty window to the back). @dominik-zeglen the compton change fixes the issue for you? |
Huh, I was never able to reproduce this. But thanks for letting me know that #1518 does not fix this. I'll remove the auto-close message from the comments. |
Not sure if this is the same issue, but on Arch Linux/X11/awesome, current master does not draw characters until a key press, mouse click or resize. Background color + opacity is drawn fine, but shell prompt only shows up after any of the three. I'll be offline until next Saturday but can help debug this next weekend. I don't recall the same issue on 0.2.0, but I might just not have noticed because the tiling modes cause a resize at startup. |
I’m experiencing the same issue with i3-gaps and compton. Switching compton to xrender works, but feels a bit sluggish in general. |
I'm using i3-gaps and compton myself and I've never run into this issue. Which GPU are you using @loewenheim? |
Here’s the output of
|
I'm using i3-gaps with compton on version 0.3.2, this issue appeared when reflow support was added. |
I've faced same problem with Gnome on X11, but when I switch my DE to awesomeWM it's disappearing |
This takes the latest glutin master to port Alacritty to the EventLoop 2.0 rework. This changes a big part of the event loop handling by pushing the event loop in a separate thread from the renderer and running both in parallel. Fixes alacritty#2254. Fixes alacritty#2217. Fixes alacritty#824.
This takes the latest glutin master to port Alacritty to the EventLoop 2.0 rework. This changes a big part of the event loop handling by pushing the event loop in a separate thread from the renderer and running both in parallel. Fixes alacritty#2564. Fixes alacritty#2254. Fixes alacritty#2217. Fixes alacritty#824.
This takes the latest glutin master to port Alacritty to the EventLoop 2.0 rework. This changes a big part of the event loop handling by pushing the event loop in a separate thread from the renderer and running both in parallel. Fixes alacritty#2564. Fixes alacritty#2254. Fixes alacritty#2217. Fixes alacritty#824.
Also seem to have this issue (I think anyways) I noticed long stretches of code like building a fork of aosp for Android or just playing music with mpd + ncmpcpp the terminal & visualizer will appear to hang but keyboard input or mouse movement will have it immediately redraw and catch up. This is on Arch Linux with Nvidia's vulkan beta drivers 418.52.14 on xorg-server 1.20.5-1. |
I have the same issue on Ubuntu 18.04 running i3 (Intel graphics accelerator). Generally occurs when I'm doing anything that prints lines continuously although I just noticed it with a git commit (froze half way through the print). |
Happens to me too. Usually I blamed ssh connection for that, but today it happened twice when running something locally. I don't use tmux or any other terminal multiplexer. Happens much more frequently on my laptop, where I have ubuntu 14.04.6 LTS with Alacritty v0.2.9, but also happens at my workstation/desktop, where I run arch linux and have 0.3.3-2 installed. Always happens when long (but not extremely long) output happening and scrolling the screen (like building something or UPD: |
Happens every 30 seconds or so on my laptop, using arch linux / i3 with Xcompmgr. |
Given that alacritty handles all the windows on the main thread using vsync will result in sequential locks on swap buffers for each window it'll try to draw at the given time, reducing the frame rate by the amount of windows being drawn. Timer based solution solves this since there's no more blocking involved. Fixes alacritty#824.
Given that alacritty handles all the windows on the main thread using vsync will result in sequential locks on swap buffers for each window it'll try to draw at the given time, reducing the frame rate by the amount of windows being drawn. Timer based solution solves this since there's no more blocking involved. Fixes alacritty#824.
Given that alacritty handles all the windows on the main thread using vsync will result in sequential locks on swap buffers for each window it'll try to draw at the given time, reducing the frame rate by the amount of windows being drawn. Timer based solution solves this since there's no more blocking involved. Fixes alacritty#824.
Could someone try #6175. At least it fixes it for me in vm, since I never had it with anything else. |
Given that alacritty handles all the windows on the main thread using vsync will result in sequential locks on swap buffers for each window it'll try to draw at the given time, reducing the frame rate by the amount of windows being drawn. Timer based solution solves this since there's no more blocking involved. Fixes alacritty#824.
@kchibisov, I'm running X11 with tmux and experience the issue mentioned here and in #4362. |
Can confirm this happens with the latest released version of Correction: It still happens, just significantly less often. Puzzling. It now seems to behave like Kitty, where there will be random pauses and it will catch up on its own, or a keypress will refresh it. But not all keypresses, if there is a gap of time since the last update, the next keypress may not have any effect until a second one occurs. I don't have any issues with other graphics programs, so it seems there is something about the way terminal programs work. Although I have a theory... |
Still happens to me with 0.12.2 , on pop-os (based on Ubuntu) 22.04 LTS. I haven't seen it except with tmux as the shell, though I haven't tried very hard. With tmux, every couple of minutes :( |
This is still happening for my on 0.12.2 on pop-os 22.04 as well.
|
Same here! This issue should be reopen or at least considered: $ alacritty --version
alacritty 0.13.0-dev (a58fb39b)
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy |
Same here! I am running
|
This issue comes up on Google search, just adding that this happens on my machine as well:
|
It seems like the maintainers aren't looking at this thread, it might be time to create a new issue and just link to this one. |
We're aware of issue with nvidia/llvmpipe on X11, which is likely not our issue, but just how x11 works. there's #7251. |
Terminals have been working fine on X for decades, and no other programs require a keypress to force a redraw. So I'm confused as to how it's an X11 issue? |
That's completely irrelevant whether they worked or not. The issue is that one frame on X11 is not being presented to the display for whatever reason when we draw and submit it, so for now the only viable solution would be to draw e.g. 3 times last redraw just to ensure that the frame goes to display. X11 is just not great when it comes to hardware acceleration, because it was never designed with it in mind, so things break like that is not surprising. Keep in mind that contiguous redraw generally works, because it's contiguous. For now only nvidia and llvmpipe seems to be broken, and intel using legacy xf86-video-intel(shouldn't be used anyway). |
I have this issue on my laptop, which uses a AMD Ryzen 7 4700U with Radeon Graphics for hardware acceleration |
For me the issue was caused by So the solution for me was to disable the flag. Alacritty version is |
that sounds like a GPU hang to me, maybe you have something in dmesg when such thing happen? |
Turning |
Using Alacritty (commit 6916537) on Ubuntu 16.04 with X11.
It is better described with the following screencast. Here I'm repeatedly opening and closing
tig
, so the output should be the same in each iteration. The screen often stays in a partially redrawed state (marked by mouse cursor movement). Then it finishes redraw correctly when I'm pressing a key.The text was updated successfully, but these errors were encountered: