thestinger / termite

Termite is obsoleted by Alacritty. Termite was a keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.
https://github.com/alacritty/alacritty
2.73k stars 240 forks source link

Hanging at startup on x11 (just after switching from a wayland session) #655

Closed nickdiego closed 3 years ago

nickdiego commented 5 years ago

Description:

Not sure if it's something specific to termite (maybe happens to other GTK apps). After switching back from a wayland session (e.g: Gnome on Wayland, Sway, etc) to i3, for example (with no DE), and trying to start termite it gets stuck at startup. Analyzing its strace, I saw this:

 894 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3                                                                                                                                                                                                                            
 895 connect(3, {sa_family=AF_UNIX, sun_path="/run/user/1000/wayland-0"}, 27) = 0
 896 futex(0x7fc9490f7a28, FUTEX_WAKE_PRIVATE, 2147483647) = 0
 897 futex(0x7fc9490f7a28, FUTEX_WAKE_PRIVATE, 2147483647) = 0
 898 futex(0x7fc9490f7a28, FUTEX_WAKE_PRIVATE, 2147483647) = 0
 899 futex(0x7fc9490f7a28, FUTEX_WAKE_PRIVATE, 2147483647) = 0
 900 futex(0x7fc9490f7a28, FUTEX_WAKE_PRIVATE, 2147483647) = 0
 901 stat("/usr/share/X11/xkb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 902 stat("/usr/share/X11/xkb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
...
...
5707 sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\27\0\0\0\2\0\34\0\16\0\0\0nick@mayam: ~\0\0\0", iov_len=28}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 28
5708 poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN|POLLPRI}], 4, 30) = 0 (Timeout)                                                                                                                                           
5709 poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN|POLLPRI}], 4, 492) = 1 ([{fd=3, revents=POLLIN}])
5710 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\22\0\0\0\0\0\f\0\23\0\0\0", iov_len=1636}, {iov_base="", iov_len=2460}], msg_iovlen=2, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 12
5711 poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN|POLLPRI}], 4, 411) = 0 (Timeout)
5712 poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN|POLLPRI}], 4, 600) = 0 (Timeout)
5713 poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, {fd=13, events=POLLIN|POLLPRI}], 4, 600
Workaround:

Setting GDK_BACKEND explictly to x11 works around the issue:

env GDK_BACKEND=x11 termite

System info:

Arch Linux - Kernel 4.19.13-1-lts
Termite: 14-2
Gtk: 3.24.2+7+g43aeb52b73-1
vte-common: 0.54.3-1
markstos commented 4 years ago

I'm trying a "snap" package of termite and am also running into this problem. In my case, explicitly setting the GDK_BACKEND doesn't fix it. It seems that only Wayland backend is considered, but I'm running under X11.

Here's the Snap package I'm trying: https://build.snapcraft.io/user/sd-hd/termite-snap

thestinger commented 3 years ago

Termite is obsolete. Please use Alacritty instead. See https://github.com/thestinger/termite#termite-is-obsoleted-by-alacritty for more details.