swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.4k stars 1.1k forks source link

Sway freezes/locks up system on login/lauch via tty #7553

Open mfwre opened 1 year ago

mfwre commented 1 year ago

Description: Whether I autostart sway on tty login with

if [ (tty) = "/dev/tty1" ]
    # exec sway
    exec dbus-run-session sway
end

or manually by running sway, Sway starts, freezes and locks up the system. The mouse is still responsive, I can't change to another tty, waybar (swaybar in the default config) keeps working and reacts to clicks.

Only way out is via a hard reboot.

This is my first AMD computer. Since on similar machines, with Intel chips, Sway works flawlessly, I assumed that Sway freezing was due to a faulty video driver installation. So I proceeded with a brand new installation of artix linux on a Lenovo P14s ThinkPad

I use runit as my init system with seatd-runit to provide libelogind. Thinking it was a seatd issue I ran sway with elogind-runit and polkit. Nothing changed. Even without GPU driver sway reproduces the issue.

I tried every single solution that came up with googling Sway freezes system: for instance enabling WLR_EGL_NO_MODIFIERS, setting XDG_RUNTIME_DIR to a temp directory, enabling early kms explicitly (although with mkinitcpio -V > 32 that should be enabled by default) and so on.

I tried with the sway-git and wlroots-git packages available on the AUR but nothing.

To get debug logs I simply logged in via ssh and run sway from there. The machine is still responsive.

Please fill out the following:

mfwre commented 1 year ago

I saw unusual connman startup times and decided to remove it (and wpa_supplicant) entirely in favour of iwd and dhcpcd. Sway froze only once (not at startup however).

I fear this was perhaps a connman issue more than a Sway issue. I'll close this issue in a week if the freezing problem doesn't appear anymore.

mfwre commented 1 year ago

Sadly the issue now presents itself sometimes. I can't really reproduce although I'm still experiencing random freezing at sway launch or after some usage.

Setting

WLR_DRM_NO_ATOMIC = 1
WLR_NO_HARDWARE_CURSORS = 1

apparently improved the situation. I don't have anything objective to prove it.

x10an14 commented 9 months ago

I think I'm experiencing this same issue, due to my Sway instance freezing and all GUI elements becoming unresponsive, including mouse movement and sway keybinds. When this happens, I can still SSH into the computer, and via ssh everything seems responsive.

This seems to happen when I mouse over different elements in Sway. Not yet certain if I can narrow it down to "when moving from one display output to another", or if its also "whenever approaching a nearby button without having left the program GUI".

Not sure if my report belongs to any of #6310, or #6563. I did not run sway with debug/verbose mode enabled.


Below I have the log lines around the time Sway froze/unfroze (used the frozen waybar timestamp to correlate):

@TimeOfFreeze ``` des. 04 10:22:25 home-desktop sway[2960]: 83:19:58.337 [ERROR] [wlr] [xwayland/xwm.c:1522] xcb error: op ChangeProperty (no minor), code Window (no extension), sequence 60476, value 75533597 dec. 04 10:22:25 home-desktop sway[2960]: 83:19:58.338 [ERROR] [wlr] [xwayland/xwm.c:1522] xcb error: op ConfigureWindow (no minor), code Window (no extension), sequence 60478, value 75533597 dec. 04 10:22:25 home-desktop sway[2960]: 83:19:58.338 [ERROR] [wlr] [xwayland/xwm.c:1522] xcb error: op ChangeProperty (no minor), code Window (no extension), sequence 60489, value 75533597 dec. 04 10:22:25 home-desktop sway[2960]: 83:19:58.338 [ERROR] [wlr] [xwayland/xwm.c:1522] xcb error: op ChangeProperty (no minor), code Window (no extension), sequence 60490, value 75533597 dec. 04 10:22:25 home-desktop sway[2960]: 83:19:58.671 [ERROR] [wlr] [libinput] event5 - Logitech G903 LS: client bug: event processing lagging behind by 22ms, your system is too slow ```
@TimeOfUnfreeze ``` dec. 04 10:29:08 home-desktop sway[2960]: 83:26:41.088 [ERROR] [wlr] [xwayland/selection/outgoing.c:285] pipe() failed: Too many open files dec. 04 10:29:08 home-desktop sway[2960]: 83:26:41.088 [ERROR] [wlr] [xwayland/selection/outgoing.c:285] pipe() failed: Too many open files dec. 04 10:29:08 home-desktop sway[2960]: 83:26:41.088 [ERROR] [wlr] [xwayland/selection/incoming.c:466] convert selection failed dec. 04 10:29:08 home-desktop sway[2960]: 83:26:41.088 [ERROR] [wlr] [xwayland/selection/incoming.c:466] convert selection failed dec. 04 10:29:08 home-desktop sway[2960]: 83:26:41.095 [ERROR] [wlr] [libseat] [libseat/backend/logind.c:199] Could not close device: Device not taken ```

EDIT: Formatting