swaywm / sway

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

sway crashes when connecting a display with a displaylink docking station #5968

Closed gPirkes closed 3 years ago

gPirkes commented 3 years ago

sway starts and works as intended. plugging in the monitor now:

[2021-01-24 20:44:51.266] [error] Window: Unable to receive IPC header
[2021-01-24 20:44:51.266] [error] Window: Unable to receive IPC header
[2021-01-24 20:44:51.266] [error] Window: Unable to receive IPC header
[2021-01-24 20:44:51.266] [error] Window: Unable to receive IPC header

or (if i leave out the screen resolution definitions, lines 37 through 39 in my config):

[2021-01-24 21:15:29.024] [error] Window: Unable to receive IPC header
[2021-01-24 21:15:29.024] [error] Workspaces: Unable to receive IPC header

and i get thrown back to the tty. If i leave the monitor plugged in and try to start sway through gdm, i can enter my password and get thrown back to the gdm login screen immediately.

emersion commented 3 years ago

This doesn't seem like a Sway log. This seems like a waybar log.

Please post the full Sway debug log.

gPirkes commented 3 years ago

sorry, im an iditot. i didnt realize that sway logs to standard error not standard out. Here is the full sway log (from stderr) Thanks!

gPirkes commented 3 years ago

iditot

Turns out, i cant even spell :roll_eyes: Just as a side note: this log was created by plugging in the monitor and starting sway with the monitor attached (in which case it immediately crashes back to the tty). Also, i disabled waybar and used the default swaybar but the behavior is the same with and without waybar.

emersion commented 3 years ago

Hm, it does look like a crash. Please provide a stack trace. You can do so by compiling from source, reproducing the crash and then running coredumpctl gdb and then bt full.

Here are some instructions to compile from source: https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject

gPirkes commented 3 years ago

hm, I've hit another snag. i built sway with wlroots as a subproject as suggested. when running it from a running graphical dm like ubuntu on wayland or sway itself (the one without debug symbols), sway starts in a separate window in that display manager. If i try to run it from a tty i get this debug log.

It seems like libinput does not recognize the peripherals. If i run export WLR_LIBINPUT_NO_DEVICES=1 and then try to start sway, it starts, but neither the attached keyboard or mouse nor the builtin keyboard and touchpad are responding, so i cannot exit sway. it also doesn't crash when i attach the other monitor to the docking station, but simply does nothing and i cannot interact with it. the same happens if i attach the screen first and then try to start from tty (with the WLR_LIBINPUT_NO_DEVICES flag). Here is the debug log for when i start sway without peripherals and then force restart my PC because i cant get out of the dm any more.

i also got no coredumps, since sway doesn't exactly crash but simply does not identify inputs (coredumpctl list shows the old coredumps, without debug symbols).

emersion commented 3 years ago
00:00:00.003 [INFO] [wlr] [backend/session/direct.c:274] Successfully loaded direct session

It's trying to use the direct session. You want the logind session on Ubuntu. Can you install the missing dependency, probably libsystemd-dev? Then meson setup build/ --wipe and rebuild.

gPirkes commented 3 years ago

okay, i think i managed to get the dump:

[Current thread is 1 (Thread 0x7fcb7e7fc700 (LWP 15017))]
(gdb) bt full
#0  0x00007fcbc6bfb342 in  () at /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#1  0x00007fcbc6bfb65c in  () at /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#2  0x00007fcbc6c8f41f in  () at /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#3  0x00007fcbc6c8eebb in  () at /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007fcbc6c8f64a in  () at /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007fcbc6c8f46b in  () at /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#6  0x00007fcbc8756609 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = 
              {cancel_jmp_buf = {{jmp_buf = {140511977391872, -4974041431880608434, 140730638402894, 140730638402895, 140730638402896, 140511977389440, 5003036655128302926, 5003278463642916174}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#7  0x00007fcbc8892293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Here is the sway log from that core dump as well.

emersion commented 3 years ago

This sounds like a crash in radeonsi, not sure we can do anything about it.

gPirkes commented 3 years ago

all right - thanks for looking into it. if i manage to get it working somehow ill let you know!