Skip to content
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

Sway 1.10 segfault crash in workspace_add_floating #8500

Open
trinitronx opened this issue Dec 13, 2024 · 2 comments
Open

Sway 1.10 segfault crash in workspace_add_floating #8500

trinitronx opened this issue Dec 13, 2024 · 2 comments
Labels
bug Not working as intended
Milestone

Comments

@trinitronx
Copy link

  • Sway Version:

    • sway version 1.10 on Manjaro Sway Edition December 2024
      • Manjaro unstable branch (roughly equivalent to vanilla Arch Linux)
      • Package directly taken from Arch's extra/sway package version 1:1.10-1
      • Build date: Mon 28 Oct 2024 12:56:57 AM MDT
      • Packager: Robin Candau <antiz@archlinux.org>
  • Debug Log:

    • sway.log

    • Note: The full file was 4.3GiB!!

    • Due to this, I have been forced to remove most of the repeating lines described below

    • There were 54018360 instances of a repeating log line from swaylock:

      2024-12-12 08:23:14 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      2024-12-12 08:23:14 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      2024-12-12 08:23:14 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      2024-12-12 08:23:14 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      2024-12-12 08:23:14 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      [...SNIP...]
      2024-12-12 08:27:41 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      2024-12-12 08:27:41 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      2024-12-12 08:27:41 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      2024-12-12 08:27:41 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      2024-12-12 08:27:41 - [swaylock-1.8.0/comm.c:101] Failed to read pw result: Success
      
      • Count of original matching log lines & file size:

        grep -Ec '^.*swaylock-1.8.0.*Failed to read pw result: Success' ~/sway.log
        54018360
        
        ls -lh sway.log
        -rw-r--r-- 1 exampleuser exampleuser 4.3G Dec 13 10:03 sway.log
        
      • The filtering in the log file happened between these delimiters:

        [...SNIP...]
        [...BEGIN FILTERING...]
        #### swaylock messages FILTERED OUT HERE ###
        [...END FILTERING...]
        
    • Due to the unusually large amount of log messages from swaylock, I suspect that sway crashed related to the following state:

      • Multiple HDMI monitors that had gone into standby (sway / kanshi saw them as disconnected or disabled at the time of crash)
      • swaylock was running and the screen was locked at the time of crash
      • I had manually powered back on the HDMI displays, and saw no display output (black screen or "no signal" from both HDMI displays)
  • Configuration File:

    • So far, I've been unable to reproduce with a minimal config. (Crash happened organically after leaving machine unattended & displays went to sleep)
    • However, all my sway configs are in my dotfiles repo here
    • I suspect that the issue has to do with some combination of using:
      • Multiple HDMI monitors that had gone into standby
      • swaylock running on both screens (configs)
      • kanshi managing display/output profiles (configs)
  • Stack Trace:

    • Note: Symbols from debuginfod via URL: https://debuginfod.archlinux.org
    • Short:
Program terminated with signal SIGSEGV, Segmentation fault.
#0  workspace_add_floating (workspace=workspace@entry=0x0, con=con@entry=0x61ffa0e0b310) at ../sway-1.10/sway/tree/workspace.c:822
822             list_add(workspace->floating, con);
[Current thread is 1 (Thread 0x790e4eddce40 (LWP 9708))]
(gdb) bt
#0  workspace_add_floating (workspace=workspace@entry=0x0, con=con@entry=0x61ffa0e0b310) at ../sway-1.10/sway/tree/workspace.c:822
#1  0x000061ff6932e337 in container_set_floating (container=0x61ffa0e0b310, enable=<optimized out>) at ../sway-1.10/sway/tree/container.c:992
#2  0x000061ff69330c3e in container_set_floating (container=<optimized out>, enable=true) at ../sway-1.10/sway/tree/container.c:980
#3  view_map (view=<optimized out>, wlr_surface=<optimized out>, fullscreen=false, fullscreen_output=<optimized out>, decoration=false) at ../sway-1.10/sway/tree/view.c:813
#4  0x000061ff692ef4a6 in view_map (view=0x61ffa0f630c0, wlr_surface=<optimized out>, fullscreen=false, fullscreen_output=0x0, decoration=false) at ../sway-1.10/sway/desktop/xdg_shell.c:463
#5  handle_map (listener=0x61ffa0f632b8, data=<optimized out>) at ../sway-1.10/sway/desktop/xdg_shell.c:486
#6  0x0000790e4fcce47e in wl_signal_emit_mutable (signal=<optimized out>, data=0x0) at ../wayland-1.23.1/src/wayland-server.c:2314
#7  0x0000790e4fc2aa4d in surface_commit_state (surface=0x61ffa10addd0, next=0x61ffa10adf50) at ../wlroots-0.18.1/types/wlr_compositor.c:557
#8  0x0000790e4f2db596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#9  0x0000790e4f2d800e in ffi_call_int (cif=cif@entry=0x7fff9aa7b0d0, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#10 0x0000790e4f2dabd3 in ffi_call (cif=cif@entry=0x7fff9aa7b0d0, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fff9aa7b1a0) at ../src/x86/ffi64.c:710
#11 0x0000790e4fccce85 in wl_closure_invoke (closure=closure@entry=0x61ffa1067b20, target=<optimized out>, target@entry=0x61ffa1074230, opcode=opcode@entry=6, data=<optimized out>, data@entry=0x61ffa0296e00, flags=2)
    at ../wayland-1.23.1/src/connection.c:1228
#12 0x0000790e4fcd1d22 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x61ffa0296e00) at ../wayland-1.23.1/src/wayland-server.c:444
#13 0x0000790e4fcd0112 in wl_event_loop_dispatch (loop=0x61ff9f1f4820, timeout=<optimized out>, timeout@entry=-1) at ../wayland-1.23.1/src/event-loop.c:1105
#14 0x0000790e4fcd21f7 in wl_display_run (display=0x61ff9f1f4730) at ../wayland-1.23.1/src/wayland-server.c:1530
#15 0x000061ff692dadd2 in server_run (server=<optimized out>) at ../sway-1.10/sway/server.c:501
#16 main (argc=<optimized out>, argv=<optimized out>) at ../sway-1.10/sway/main.c:373
    • FULL: export DEBUGINFOD_URLS='https://debuginfod.archlinux.org'; sudo -E coredumpctl debug 9708 and bt full:

                 PID: 9708 (sway)
                 UID: 1000 (trinitronx)
                 GID: 1000 (trinitronx)
              Signal: 11 (SEGV)
           Timestamp: Tue 2024-12-10 10:46:50 MST (3 days ago)
        Command Line: /usr/bin/sway --verbose --debug
          Executable: /usr/bin/sway
       Control Group: /user.slice/user-1000.slice/session-7.scope
                Unit: session-7.scope
               Slice: user-1000.slice
             Session: 7
           Owner UID: 1000 (trinitronx)
             Boot ID: 90d00740d8b74b64b31b68769e016cd3
          Machine ID: 132f3bb4c5df4c7b9bc3e7b3947f4b7a
            Hostname: saturn
             Storage: /var/lib/systemd/coredump/core.sway.1000.90d00740d8b74b64b31b68769e016cd3.9708.1733852810000000.zst (present)
        Size on Disk: 4.1M
             Message: Process 9708 (sway) of user 1000 dumped core.
      
                      Stack trace of thread 9708:
                      #0  0x000061ff6932cf27 n/a (sway + 0x61f27)
                      #1  0x000061ff6932e337 n/a (sway + 0x63337)
                      #2  0x000061ff69330c3e n/a (sway + 0x65c3e)
                      #3  0x000061ff692ef4a6 n/a (sway + 0x244a6)
                      #4  0x0000790e4fcce47e wl_signal_emit_mutable (libwayland-server.so.0 + 0x847e)
                      #5  0x0000790e4fc2aa4d n/a (libwlroots-0.18.so + 0x7aa4d)
                      #6  0x0000790e4f2db596 n/a (libffi.so.8 + 0x7596)
                      #7  0x0000790e4f2d800e n/a (libffi.so.8 + 0x400e)
                      #8  0x0000790e4f2dabd3 ffi_call (libffi.so.8 + 0x6bd3)
                      #9  0x0000790e4fccce85 n/a (libwayland-server.so.0 + 0x6e85)
                      #10 0x0000790e4fcd1d22 n/a (libwayland-server.so.0 + 0xbd22)
                      #11 0x0000790e4fcd0112 wl_event_loop_dispatch (libwayland-server.so.0 + 0xa112)
                      #12 0x0000790e4fcd21f7 wl_display_run (libwayland-server.so.0 + 0xc1f7)
                      #13 0x000061ff692dadd2 n/a (sway + 0xfdd2)
                      #14 0x0000790e4f958e08 n/a (libc.so.6 + 0x25e08)
                      #15 0x0000790e4f958ecc __libc_start_main (libc.so.6 + 0x25ecc)
                      #16 0x000061ff692db275 n/a (sway + 0x10275)
      
                      Stack trace of thread 9711:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9712:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9719:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9714:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9716:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9721:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9743:
                      #0  0x0000790e4fa4a1fd syscall (libc.so.6 + 0x1171fd)
                      #1  0x0000790e4feaff20 g_cond_wait (libglib-2.0.so.0 + 0x8ef20)
                      #2  0x0000790e4fe4698c n/a (libglib-2.0.so.0 + 0x2598c)
                      #3  0x0000790e4fe469fd g_async_queue_pop (libglib-2.0.so.0 + 0x259fd)
                      #4  0x0000790e4f0d65fc n/a (libpangoft2-1.0.so.0 + 0xc5fc)
                      #5  0x0000790e4feb2026 n/a (libglib-2.0.so.0 + 0x91026)
                      #6  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #7  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9722:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9728:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9715:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9720:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9723:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9727:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9717:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9724:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9729:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9725:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9733:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9730:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9734:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9726:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9735:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9732:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9736:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
      
                      Stack trace of thread 9737:
                      #0  0x0000790e4f9c3a19 n/a (libc.so.6 + 0x90a19)
                      #1  0x0000790e4f9c6479 pthread_cond_wait (libc.so.6 + 0x93479)
                      #2  0x0000790e4c9136ee n/a (libgallium-24.3.1-arch1.3.so + 0x5136ee)
                      #3  0x0000790e4c8de6cc n/a (libgallium-24.3.1-arch1.3.so + 0x4de6cc)
                      #4  0x0000790e4c91361d n/a (libgallium-24.3.1-arch1.3.so + 0x51361d)
                      #5  0x0000790e4f9c739d n/a (libc.so.6 + 0x9439d)
                      #6  0x0000790e4fa4c49c n/a (libc.so.6 + 0x11949c)
                      ELF object binary architecture: AMD x86-64
      
      GNU gdb (GDB) 15.2
      Copyright (C) 2024 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
      Type "show copying" and "show warranty" for details.
      This GDB was configured as "x86_64-pc-linux-gnu".
      Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      <https://www.gnu.org/software/gdb/bugs/>.
      Find the GDB manual and other documentation resources online at:
          <http://www.gnu.org/software/gdb/documentation/>.
      
      For help, type "help".
      Type "apropos word" to search for commands related to "word"...
      Reading symbols from /usr/bin/sway...
      
      This GDB supports auto-downloading debuginfo from the following URLs:
        <https://debuginfod.archlinux.org>
      Enable debuginfod for this session? (y or [n]) y
      Debuginfod has been enabled.
      To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
      Downloading separate debug info for /usr/bin/sway
      Reading symbols from /home/trinitronx/.cache/debuginfod_client/f65be6dec09998de77a151404127ca8ff78a525f/debuginfo...
      
      warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
      
      warning: Can't open file /memfd:xwayland-shared (deleted) during file-backed mapping note processing
      
      warning: Can't open file /dev/shm/wob-0 (deleted) during file-backed mapping note processing
      
      warning: Can't open file /memfd:gdk-wayland (deleted) during file-backed mapping note processing
      
      warning: Can't open file /memfd:wayland-cursor (deleted) during file-backed mapping note processing
      [New LWP 9708]
      [New LWP 9711]
      [New LWP 9712]
      [New LWP 9719]
      [New LWP 9714]
      [New LWP 9716]
      [New LWP 9721]
      [New LWP 9743]
      [New LWP 9722]
      [New LWP 9728]
      [New LWP 9715]
      [New LWP 9720]
      [New LWP 9723]
      [New LWP 9727]
      [New LWP 9717]
      [New LWP 9724]
      [New LWP 9729]
      [New LWP 9725]
      [New LWP 9733]
      [New LWP 9730]
      [New LWP 9734]
      --Type <RET> for more, q to quit, c to continue without paging--c
      [New LWP 9726]
      [New LWP 9735]
      [New LWP 9732]
      [New LWP 9736]
      [New LWP 9737]
      
      
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/usr/lib/libthread_db.so.1".
      Core was generated by `/usr/bin/sway --verbose --debug'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  workspace_add_floating (workspace=workspace@entry=0x0, con=con@entry=0x61ffa0e0b310) at ../sway-1.10/sway/tree/workspace.c:822
      822   list_add(workspace->floating, con);
      [Current thread is 1 (Thread 0x790e4eddce40 (LWP 9708))]
      (gdb) bt full
      #0  workspace_add_floating (workspace=workspace@entry=0x0, con=con@entry=0x61ffa0e0b310) at ../sway-1.10/sway/tree/workspace.c:822
      #1  0x000061ff6932e337 in container_set_floating (container=0x61ffa0e0b310, enable=<optimized out>) at ../sway-1.10/sway/tree/container.c:992
            old_parent = 0x0
            seat = 0x61ffa023d650
            workspace = 0x0
            focus = 0x0
            set_focus = <optimized out>
      #2  0x000061ff69330c3e in container_set_floating (container=<optimized out>, enable=true) at ../sway-1.10/sway/tree/container.c:980
            seat = <optimized out>
            workspace = <optimized out>
            focus = <optimized out>
            set_focus = <optimized out>
            seat = <optimized out>
            workspace = <optimized out>
            focus = <optimized out>
            set_focus = <optimized out>
            old_parent = <optimized out>
            deco = <optimized out>
            reference = <optimized out>
            other = <optimized out>
            deco = <optimized out>
      #3  view_map (view=<optimized out>, wlr_surface=<optimized out>, fullscreen=false, fullscreen_output=<optimized out>, decoration=false) at ../sway-1.10/sway/tree/view.c:813
            ws = <optimized out>
            seat = <optimized out>
            node = <optimized out>
            target_sibling = <optimized out>
            foreign_toplevel_state = {title = 0x61ffa08f9850 "[52227]@saturn (/usr/bin/ssh -o SendEnv=GIT_PROTOCOL git@github.com git-upload-pack 'trinitronx/dotfiles.git')", app_id = 0x61ffa0803310 "gcr-prompter"}
            container = 0x61ffa0e0b310
            set_focus = <optimized out>
            xsurface = <optimized out>
            app_id = <optimized out>
            class = <optimized out>
            __PRETTY_FUNCTION__ = {<optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>}
      #4  0x000061ff692ef4a6 in view_map (view=0x61ffa0f630c0, wlr_surface=<optimized out>, fullscreen=false, fullscreen_output=0x0, decoration=false) at ../sway-1.10/sway/desktop/xdg_shell.c:463
            target_sibling = <optimized out>
            set_focus = <optimized out>
            xsurface = <optimized out>
            app_id = <optimized out>
            class = <optimized out>
            seat = <optimized out>
            node = <optimized out>
            foreign_toplevel_state = {title = <optimized out>, app_id = <optimized out>}
            ws = <optimized out>
            container = <optimized out>
            __PRETTY_FUNCTION__ = {<optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>, <optimized out>}
      --Type <RET> for more, q to quit, c to continue without paging--c
            ws = <optimized out>
            seat = <optimized out>
            node = <optimized out>
            target_sibling = <optimized out>
            foreign_toplevel_state = {title = <optimized out>, app_id = <optimized out>}
            container = <optimized out>
            set_focus = <optimized out>
            xsurface = <optimized out>
            app_id = <optimized out>
            class = <optimized out>
            ctx = <optimized out>
            output = <optimized out>
            scale = <optimized out>
            con = <optimized out>
            fs = <optimized out>
      #5  handle_map (listener=0x61ffa0f632b8, data=<optimized out>) at ../sway-1.10/sway/desktop/xdg_shell.c:486
            xdg_shell_view = 0x61ffa0f630c0
            view = 0x61ffa0f630c0
            toplevel = 0x61ffa04558e0
            csd = false
      #6  0x0000790e4fcce47e in wl_signal_emit_mutable (signal=<optimized out>, data=0x0) at ../wayland-1.23.1/src/wayland-server.c:2314
            pos = 0x61ffa0f632b8
            l = 0x61ffa0f632b8
            cursor = {link = {prev = 0x61ffa0f632b8, next = 0x61ffa10726f8}, notify = 0x790e4fccb190 <handle_noop>}
            end = {link = {prev = 0x61ffa10726f8, next = 0x61ffa10ae0b8}, notify = 0x790e4fccb190 <handle_noop>}
      #7  0x0000790e4fc2aa4d in surface_commit_state (surface=0x61ffa10addd0, next=0x61ffa10adf50) at ../wlroots-0.18.1/types/wlr_compositor.c:557
            invalid_buffer = <optimized out>
            subsurface = 0x61ffa10adec0
            __PRETTY_FUNCTION__ = "surface_commit_state"
      #8  0x0000790e4f2db596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
      #9  0x0000790e4f2d800e in ffi_call_int (cif=cif@entry=0x7fff9aa7b0d0, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
            classes = {X86_64_INTEGER_CLASS, 32767, 1328375628, 30990}
            stack = <optimized out>
            argp = 0x7fff9aa7af20 ""
            arg_types = <optimized out>
            gprcount = 2
            ssecount = <optimized out>
            ngpr = 1
            nsse = 0
            i = <optimized out>
            avn = <optimized out>
            flags = <optimized out>
            reg_args = <optimized out>
      #10 0x0000790e4f2dabd3 in ffi_call (cif=cif@entry=0x7fff9aa7b0d0, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fff9aa7b1a0) at ../src/x86/ffi64.c:710
            arg_types = 0x7fff9aa7b0f0
            i = <optimized out>
            nargs = 2
            max_reg_struct_size = <optimized out>
      #11 0x0000790e4fccce85 in wl_closure_invoke (closure=closure@entry=0x61ffa1067b20, target=<optimized out>, target@entry=0x61ffa1074230, opcode=opcode@entry=6, data=<optimized out>, data@entry=0x61ffa0296e00, flags=2)
        at ../wayland-1.23.1/src/connection.c:1228
            count = 0
            cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7fff9aa7b0f0, rtype = 0x790e4f2dc1a0 <ffi_type_void>, bytes = 0, flags = 0}
            ffi_types = {0x790e4f2dc2a0 <ffi_type_pointer>, 0x790e4f2dc2a0 <ffi_type_pointer>, 0x790e4f2dc240 <ffi_type_uint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2        ffi_types = {0x790e4f2dc2a0 <ffi_type_pointer>, 0x790e4f2dc2a0 <ffi_type_pointer>, 0x790e4f2dc240 <ffi_type_uint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2        ffi_types = {0x790e4f2dc2a0 <ffi_type_pointer>, 0x790e4f2dc2a0 <ffi_type_pointer>, 0x790e4f2dc240 <ffi_type_uint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2dc330 <ffi_type_sint32>, 0x790e4f2        ffi_args = {0x7fff9aa7b0b0, 0x7fff9aa7b0b8, 0xf0, 0xd8, 0x790e4fb1aac0 <main_arena>, 0x1f4b0, 0x61ffa10deb50, 0x0, 0x7fff9aa7b230, 0x790e4fcce9d8 <log_closure+88>, 0x61ffa0862200, 0x7fff9aa7b330, 0x7fff9aa7b250, 0x61ff9f1f4730,         ffi_args = {0x7fff9aa7b0b0, 0x7fff9aa7b0b8, 0xf0, 0xd8, 0x790e4fb1aac0 <main_arena>, 0x1f4b0, 0x61ffa10deb50, 0x0, 0x7fff9aa7b230, 0x790e4fcce9d8 <log_closure+88>, 0x61ffa0862200, 0x7fff9aa7b330, 0x7fff9aa7b250, 0x61ff9f1f4730,         implementation = <optimized out>
      #12 0x0000790e4fcd1d22 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x61ffa0296e00) at ../wayland-1.23.1/src/wayland-server.c:444
            client = 0x61ffa0296e00
            connection = 0x61ffa0831740
            resource = <optimized out>
            object = 0x61ffa1074230
            closure = 0x61ffa1067b20
            message = 0x790e4fcd8430 <wl_surface_requests+144>
            p = {31, 524294}
            resource_flags = 0
            opcode = 6
            size = <optimized out>
            since = <optimized out>
            len = <optimized out>
      #13 0x0000790e4fcd0112 in wl_event_loop_dispatch (loop=0x61ff9f1f4820, timeout=<optimized out>, timeout@entry=-1) at ../wayland-1.23.1/src/event-loop.c:1105
            ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         ep = {{events = 1, data = {ptr = 0x61ffa09219a0, fd = -1601037920, u32 = 2693929376, u64 = 107750538484128}}, {events = 30990, data = {ptr = 0x61ffa0feb9a0, fd = -1593919072, u32 = 2701048224, u64 = 107750545602976}}, {events =         source = <optimized out>
            i = 0
            count = <optimized out>
            has_timers = <optimized out>
            use_timeout = false
            now = {tv_sec = 133102375317904, tv_nsec = 133102373546688}
            end = {tv_sec = <optimized out>, tv_nsec = <optimized out>}
      #14 0x0000790e4fcd21f7 in wl_display_run (display=0x61ff9f1f4730) at ../wayland-1.23.1/src/wayland-server.c:1530
      #15 0x000061ff692dadd2 in server_run (server=<optimized out>) at ../sway-1.10/sway/server.c:501
      #16 main (argc=<optimized out>, argv=<optimized out>) at ../sway-1.10/sway/main.c:373
            config_path = 0x0
            c = <optimized out>
            validate = false
            debug = true
            verbose = true
      (gdb)
      
  • Description:

    • Started up machine, logged into sway session (with debug logging, since I'm on Manjaro unstable)

    • Used the machine for a while doing some web browsing, etc...

    • Left machine unattended

    • swayidle used swaylock to lock the screen, then eventually turned off output (configs)

    • Both HDMI displays went to sleep (low power standby or screen power off)

    • Came back later, turned on HDMI displays

    • Black screen!

    • Remotely SSH'ed into machine to view logs & troubleshoot what happened

    • Saw that sway process PID had crashed with SIGSEGV:

      [Dec10 10:46] sway[9708]: segfault at b8 ip 000061ff6932cf27 sp 00007fff9aa7ac40 error 4 in sway[61f27,61ff692d9000+5e000] likely on CPU 0 (core 0, socket 0)
      [  +0.000007] Code: ff 66 90 f3 0f 1e fa 55 48 89 e5 41 56 41 55 49 89 fd 41 54 53 48 83 be 90 01 00 00 00 48 89 f3 74 08 48 89 f7 e8 c9 92 ff ff <4d> 8b a5 b8 00 00 00 49 63 54 24 04 49 8b 7c 24 08 41 3b 14 24 0f
      
    • Found core dump for sway process PID with coredumpctl list, and above sway.log

@trinitronx trinitronx added the bug Not working as intended label Dec 13, 2024
@trinitronx
Copy link
Author

For what it's worth: A few times yesterday I left the machine alone to see if I could reproduce the crash. So far, I was unable to reproduce this crash. However, I did see a similar symptom of black screens / no HDMI output after manually turning on the displays and moving mouse or pressing keys on the keyboard to wake up swaylock.

It turns out in that case, the HDMI displays were set as disabled by Sway. I'm not sure if this state was related to the crash, but it seems possible.

Running:

swaymsg -t get_outputs | \
  jq --color-output '.[] | { name: .name, orientation: .orientation, 
    scale: .scale, scale_filter: .scale_filter, 
    current_workspace: .current_workspace, current_mode: .current_mode,
    subpixel_hinting: .subpixel_hinting, current_workspace: .current_workspace,
    pos: {x: .rect.x, y: .rect.y } }'  | \
  less -SMFRX

Returned null for both outputs' properties:

{
  "name": "HDMI-A-4",
  "orientation": null,
  "scale": null,
  "scale_filter": null,
  "current_workspace": null,
  "current_mode": null,
  "subpixel_hinting": null,
  "pos": {
    "x": 0,
    "y": 0
  }
}
{
  "name": "HDMI-A-5",
  "orientation": null,
  "scale": null,
  "scale_filter": null,
  "current_workspace": null,
  "current_mode": null,
  "subpixel_hinting": null,
  "pos": {
    "x": 0,
    "y": 0
  }
}

In sway logs, I could see the result of kanshi trying to run these commands for the profile hdtv-extended. Sway logged the error: Can't run this command while there's no outputs connected.

Dec 13 15:14:51 examplehost sway[2175]: reloading config
Dec 13 15:14:51 examplehost sway[2175]: applying profile 'hdtv-extended'
Dec 13 15:14:51 examplehost sway[2175]: applying profile output 'LG Electronics LG TV SSCR2 0x01010101' on connected head 'HDMI-A-4'
Dec 13 15:14:51 examplehost sway[2175]: applying profile output 'VIZIO, Inc M601d-A3/A3R 0x01010101' on connected head 'HDMI-A-5'
Dec 13 15:14:51 examplehost sway[2175]: running command 'swaymsg focus\ output\ \'VIZIO,\ Inc\ M601d-A3/A3R\ 0x01010101\',\ workspace\ 10,\ workspace\ number\ 10\ output\ \'VIZIO,\ Inc\ M601d-A3/A3R\ 0x01010101\''
Dec 13 15:14:51 examplehost sway[2175]: running command 'swaymsg focus\ output\ \'LG\ Electronics\ LG\ TV\ SSCR2\ 0x01010101\''
Dec 13 15:14:51 examplehost sway[2175]: configuration for profile 'hdtv-extended' applied
Dec 13 15:14:51 examplehost sway[656200]: [
Dec 13 15:14:51 examplehost sway[656200]:   {
Dec 13 15:14:51 examplehost sway[656200]:     "success": false,
Dec 13 15:14:51 examplehost sway[656200]:     "parse_error": true,
Dec 13 15:14:51 examplehost sway[656200]:     "error": "Can't run this command while there's no outputs connected."
Dec 13 15:14:51 examplehost sway[656200]:   }
Dec 13 15:14:51 examplehost sway[656200]: ]
Dec 13 15:15:00 examplehost sway[2175]: reloading config
Dec 13 15:15:00 examplehost sway[2175]: applying profile 'hdtv-extended'
Dec 13 15:15:00 examplehost sway[2175]: applying profile output 'LG Electronics LG TV SSCR2 0x01010101' on connected head 'HDMI-A-4'
Dec 13 15:15:00 examplehost sway[2175]: applying profile output 'VIZIO, Inc M601d-A3/A3R 0x01010101' on connected head 'HDMI-A-5'
Dec 13 15:15:00 examplehost sway[2175]: running command 'swaymsg focus\ output\ \'VIZIO,\ Inc\ M601d-A3/A3R\ 0x01010101\',\ workspace\ 10,\ workspace\ number\ 10\ output\ \'VIZIO,\ Inc\ M601d-A3/A3R\ 0x01010101\''
Dec 13 15:15:00 examplehost sway[2175]: running command 'swaymsg focus\ output\ \'LG\ Electronics\ LG\ TV\ SSCR2\ 0x01010101\''
Dec 13 15:15:00 examplehost sway[2175]: configuration for profile 'hdtv-extended' applied
Dec 13 15:15:00 examplehost sway[656856]: [
Dec 13 15:15:00 examplehost sway[656856]:   {
Dec 13 15:15:00 examplehost sway[656856]:     "success": false,
Dec 13 15:15:00 examplehost sway[656856]:     "parse_error": true,
Dec 13 15:15:00 examplehost sway[656856]:     "error": "Can't run this command while there's no outputs connected."
Dec 13 15:15:00 examplehost sway[656856]:   }
Dec 13 15:15:00 examplehost sway[656856]: ]

So, I added this to kanshi profile config to workaround that.

This forces kanshi to enable both displays before running any swaymsg commands involving them.

@The-Briel-Deal
Copy link

Just wanted to echo I have the same issue, it only started occuring when I started using kanshi to disable my laptop screen when plugged into monitor. It seems to occur shortly after disabling my laptop monitor, but not always. Usually I have to start sway a few times then eventually it stays working till unplugged or plugged back into monitor.

My laptop screen is connected to intel IGPU over eDP and my monitor is over usb-C in DP alt mode. My guess is that the issue occurs when the output is disabled and the memory is freed, then sway tries to perform some action on that monitor like opening an application there.

I'll see if I can provide more info later. Hopefully I can figure out a way to reliably repro.

@emersion emersion added this to the 1.10.1 milestone Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

3 participants