alacritty: Alacritty randomly slow under wayland
I was very happy with Alacritty but one week ago it started to become randomly slow on stratup (like around 2 to 5 seconds slow!) and it happens 3 out of 5 times.
System
- OS: archlinux (up to date)
- Version: alacritty 0.9.0 (fed349aa)
- WM: sway (wayland)
Logs
I didn’t take too much time on this but looks like it always happens at the same place in the code
> alacritty -vv
Created log file at "/tmp/Alacritty-23048.log"
[2022-01-07 21:24:09.984295467] [INFO ] [alacritty] Welcome to Alacritty
[2022-01-07 21:24:09.984487710] [INFO ] [alacritty] Configuration files loaded from:
"/home/tristan/.config/alacritty/alacritty.yml"
[2022-01-07 21:24:10.006877162] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Regular, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[2022-01-07 21:24:10.008529453] [DEBUG] [alacritty] Estimated DPR: 1
[2022-01-07 21:24:10.008553067] [DEBUG] [alacritty] Estimated window size: None
[2022-01-07 21:24:10.008561891] [DEBUG] [alacritty] Estimated cell size: 10 x 19
# .... here is the waiting ..... #
[2022-01-07 21:24:13.001497507] [INFO ] [alacritty] Device pixel ratio: 1
[2022-01-07 21:24:13.008826232] [INFO ] [alacritty] Initializing glyph cache...
[2022-01-07 21:24:13.011231745] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Regular, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[2022-01-07 21:24:13.013900328] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Bold, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[2022-01-07 21:24:13.016729254] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Italic, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[2022-01-07 21:24:13.019498723] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Bold Italic, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 }
[2022-01-07 21:24:13.032866251] [INFO ] [alacritty] ... finished initializing glyph cache in 0.024012796s
[2022-01-07 21:24:13.032900227] [INFO ] [alacritty] Cell size: 10 x 19
[2022-01-07 21:24:13.032908865] [INFO ] [alacritty] Padding: 0 x 0
[2022-01-07 21:24:13.032914981] [INFO ] [alacritty] Width: 800, Height: 600
[2022-01-07 21:24:13.034169407] [INFO ] [alacritty] PTY dimensions: 31 x 80
[2022-01-07 21:24:13.036361771] [INFO ] [alacritty] Initialisation complete
[2022-01-07 21:24:13.040945677] [DEBUG] [alacritty_terminal] New num_cols is 91 and num_lines is 52
[2022-01-07 21:24:13.043638242] [INFO ] [alacritty] Padding: 0 x 0
[2022-01-07 21:24:13.043695028] [INFO ] [alacritty] Width: 919, Height: 994
> strace alacritty
...
openat(AT_FDCWD, "/sys/bus/pci/devices/0000:00:1c.0/config", O_RDONLY) = 16
read(16, "\206\200\20\235\7\4\20\0\361\0\4\6\0\0\201\0\0\0\0\0\0\0\0\0\0\2\2\0\320\320\0 "..., 48) = 48
close(16) = 0
openat(AT_FDCWD, "/sys/bus/pci/devices/0000:00:08.0/config", O_RDONLY) = 16
read(16, "\206\200\21\31\0\0\20\0\0\0\200\10\0\0\0\0\4\0%\355\0\0\0\0\0\0\0\0\0\0\0\0"..., 48) = 48
close(16) = 0
openat(AT_FDCWD, "/sys/bus/pci/devices/0000:09:00.0/config", O_RDONLY) = 16
read(16,
# .... here is the waiting ..... #
"\206\200\277\25\6\4\20\0\1\0\200\10 \0\0\0\0\0\0\352\0\0\4\352\0\0\0\0\0\0\0\0"..., 48) = 48
close(16) = 0
openat(AT_FDCWD, "/sys/bus/pci/devices/0000:00:1f.0/config", O_RDONLY) = 16
read(16, "\206\200N\235\7\0\0\2!\0\1\6\0\0\200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 48) = 48
close(16) = 0
openat(AT_FDCWD, "/sys/bus/pci/devices/0000:02:00.0/config", O_RDONLY) = 16
read(16, "\336\0203\35\6\0\20\0\241\0\2\3\0\0\0\0\0\0\0\354\f\0\0\220\0\0\0\0\f\0\0\240"..., 48) = 48
close(16) = 0
...
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 23 (11 by maintainers)
For anyone else suffering from this issue, I had fixed it once, and then tried the proprietary nvidia driver again fairly recently. After switching back to nouveau, I forgot to uninstall
egl-wayland
, and while I had that installed, I suffered the slow alacritty startup time. Removing this package fixed the startup times for me. (also, to note @1995parham I also have both an intel and nvidia gpu, and a similar setup).(I believe this is actually the second time I experienced this, so had to try and remember what it was last time. I should remind myself to never try the proprietary nvidia driver, but I do it again once every 6 months or so to see if things have gotten any better).
You’re right, thank’s for the help anyway.
I have the same issue when trying to use the newly implemented GBM in the proprietary Nvidia driver on Sway.
What’s strange is that if I open multiple terminals in succession then the startup time is somewhat normal. But if I open a new terminal after a few minutes of not having opened one, it consistently hits me with the long start up.
For the record; I believe alacritty actually uses the Intel GPU for me as renderer. Even though I use sway via Nvidia since my laptop’s display is hooked directly to the Nvidia card. So this could be some weird interaction caused by that.
This does not happen with other applications, only alacritty.
Sway on Void Linux alacritty 0.9.0 GPU0: Intel TigerLake-H GT1 GPU1: NVIDIA GeForce RTX 3050 Ti Mobile Nvidia driver version 495.46
I didn’t have to mesure it really, before that alacritty was starting instantly. Today I have to wait 3 seconds.
If it helps, it looks like a sort of cache problem ? When I open alacritty after using some other apps for several minutes, the bug is present but when I’m openning multiple terminals one after another, the first one is slow but the others are as fast as before.
Unfortunately yes, I’m running nvidia but after installing from source I still have the exact same behaviour.