Sway VMWare loads but crashes on any action like starting terminal or dmenu
Please fill out the following:
-
Sway Version: sway 1.10
-
Debug Log: https://gist.github.com/rhodes-b/e09b8ed5a5dcea211fafb6adbd84cb3d
-
Configuration File:
font pango:monospace 8.000000
floating_modifier Mod1
default_border normal 2
default_floating_border normal 2
hide_edge_borders none
focus_wrapping no
focus_follows_mouse yes
focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
bindsym Mod1+0 workspace number 10
bindsym Mod1+1 workspace number 1
bindsym Mod1+2 workspace number 2
bindsym Mod1+3 workspace number 3
bindsym Mod1+4 workspace number 4
bindsym Mod1+5 workspace number 5
bindsym Mod1+6 workspace number 6
bindsym Mod1+7 workspace number 7
bindsym Mod1+8 workspace number 8
bindsym Mod1+9 workspace number 9
bindsym Mod1+Down focus down
bindsym Mod1+Left focus left
bindsym Mod1+Return exec ghostty
bindsym Mod1+Right focus right
bindsym Mod1+Shift+0 move container to workspace number 10
bindsym Mod1+Shift+1 move container to workspace number 1
bindsym Mod1+Shift+2 move container to workspace number 2
bindsym Mod1+Shift+3 move container to workspace number 3
bindsym Mod1+Shift+4 move container to workspace number 4
bindsym Mod1+Shift+5 move container to workspace number 5
bindsym Mod1+Shift+6 move container to workspace number 6
bindsym Mod1+Shift+7 move container to workspace number 7
bindsym Mod1+Shift+8 move container to workspace number 8
bindsym Mod1+Shift+9 move container to workspace number 9
bindsym Mod1+Shift+Down move down
bindsym Mod1+Shift+Left move left
bindsym Mod1+Shift+Right move right
bindsym Mod1+Shift+Up move up
bindsym Mod1+Shift+c reload
bindsym Mod1+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
bindsym Mod1+Shift+h move left
bindsym Mod1+Shift+j move down
bindsym Mod1+Shift+k move up
bindsym Mod1+Shift+l move right
bindsym Mod1+Shift+minus move scratchpad
bindsym Mod1+Shift+q kill
bindsym Mod1+Shift+space floating toggle
bindsym Mod1+Up focus up
bindsym Mod1+a focus parent
bindsym Mod1+b splith
bindsym Mod1+d exec /nix/store/8igdpig2jg0d1dsjdi1pxm2v7xz9jcjx-dmenu-5.3/bin/dmenu_path | /nix/store/8igdpig2jg0d1dsjdi1pxm2v7xz9jcjx-dmenu-5.3/bin/dmenu | /nix/store/vc2d1bfy1a5y1195nq7k6p0zcm6q89nx-findutils-4.10.0/bin/xargs swaymsg exec --
bindsym Mod1+e layout toggle split
bindsym Mod1+f fullscreen toggle
bindsym Mod1+h focus left
bindsym Mod1+j focus down
bindsym Mod1+k focus up
bindsym Mod1+l focus right
bindsym Mod1+minus scratchpad show
bindsym Mod1+r mode resize
bindsym Mod1+s layout stacking
bindsym Mod1+space focus mode_toggle
bindsym Mod1+v splitv
bindsym Mod1+w layout tabbed
mode "resize" {
bindsym Down resize grow height 10 px
bindsym Escape mode default
bindsym Left resize shrink width 10 px
bindsym Return mode default
bindsym Right resize grow width 10 px
bindsym Up resize shrink height 10 px
bindsym h resize shrink width 10 px
bindsym j resize grow height 10 px
bindsym k resize shrink height 10 px
bindsym l resize grow width 10 px
}
bar {
font pango:monospace 8.000000
mode dock
hidden_state hide
position bottom
status_command /nix/store/jdbgavq91r64imb7pr3y9nwiahbsyigb-i3status-2.15/bin/i3status
swaybar_command /nix/store/278ybwwjh83zg7gfmgz5m9jzfgzg0074-sway-1.10/bin/swaybar
workspace_buttons yes
strip_workspace_numbers no
tray_output primary
colors {
background #000000
statusline #ffffff
separator #666666
focused_workspace #4c7899 #285577 #ffffff
active_workspace #333333 #5f676a #ffffff
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
binding_mode #2f343a #900000 #ffffff
}
}
exec "/nix/store/zx0zzjg75gln6lldyb9k7b96acrcdc34-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; systemctl --user reset-failed && systemctl --user start sway-session.target && swaymsg -mt subscribe '[]' || true && systemctl --user stop sway-session.target"
output Virtual-1 mode 1920x1080
note this is the default NixOS config, I tried with and without the additional output Virtual-1 mode 1920x1080 in the config
- Stack Trace:
(gdb) bt full
#0 0x00007feabf455ed0 in wl_event_loop_dispatch ()
from /nix/store/fqjmm31anyclsikj1wsp3rwb14a20idh-wayland-1.23.1/lib/libwayland-server.so.0
No symbol table info available.
#1 0x00007feabf4535d5 in wl_display_run ()
from /nix/store/fqjmm31anyclsikj1wsp3rwb14a20idh-wayland-1.23.1/lib/libwayland-server.so.0
No symbol table info available.
#2 0x0000000000413257 in main ()
Note it crashes instantly in gdb, this does not happen normally It can launch and I can switch workspaces etc I just cant do anything
I was also able to capture this if it helps
- Description: New NixOS VMWare VM, add sway do any keybinds that exec something. Even the exit sway keybind (note swaynag works but clicking the button crashes sway).
I have this exact same nixos setup on both a non VM laptop and a qemu based vm and they both work perfectly fine
I saw some other issues with WLR_NO_HARDWARE_CURSORS = 1 that did not change anything, I also made sure the VM is configured to have 3d graphics acceleration
(this issue https://github.com/swaywm/sway/issues/5834)
I'm having the exact same issue, using Sway's default config: Sway works fine in QEMU (with the right QEMU parameters) but barely works in VMware Workstation in the sense that starting it does work but many applications will crash. The recommendation from #5834 to set WLR_NO_HARDWARE_CURSORS=1 didn't help. Here are some observations so far:
- alacritty crashes upon startup
- Kitty crashes upon startup
- starting Rofi makes Sway segfault
- foot works
- Firefox works
I will try to debug this further and update my post accordingly.
I have similar issue and I share my findings here I have NixOS configuration that works perfectly fine in QEMU but does work in Virtualbox because sway segfaults when running urxvt. I initially though sway itself has issues (on Virtualbox) because I had exec urxvt in the sway config. But similar to the previous comment, I figured that sway only segfaults upon executing urxvt. Here is some more infe, the coredumpctl info is not always the same:
PID: 1801 (sway)
UID: 1000 (alice)
GID: 100 (users)
Signal: 11 (SEGV)
Timestamp: Fri 2025-05-23 03:43:37 UTC (2min 53s ago)
Command Line: /nix/store/ssaxnc3av56pfvz186wsfm1c3063qfcj-sway-unwrapped-1.10/bin/sway --debug --verbose
Executable: /nix/store/ssaxnc3av56pfvz186wsfm1c3063qfcj-sway-unwrapped-1.10/bin/sway
Control Group: /user.slice/user-1000.slice/session-16.scope
Unit: session-16.scope
Slice: user-1000.slice
Session: 16
Owner UID: 1000 (alice)
Boot ID: d48d872952844d71bc1eb0acb00641fd
Machine ID: 5a708517f1974634bd1d6d5c39f11ce9
Hostname: wonderland
Storage: /var/lib/systemd/coredump/core.sway.1000.d48d872952844d71bc1eb0acb00641fd.1801.1747971817000000.zst (present)
Size on Disk: 2.5M
Message: Process 1801 (sway) of user 1000 dumped core.
Module libpciaccess.so.0 without build-id.
Module liblzma.so.5 without build-id.
....
#0 0x00007f040a3bfed0 wl_event_loop_dispatch (libwayland-server.so.0 + 0xced0)
#1 0x00007f040a3bd5d5 wl_display_run (libwayland-server.so.0 + 0xa5d5)
#2 0x0000000000413257 main (sway + 0x13257)
#3 0x00007f040a02427e __libc_start_call_main (libc.so.6 + 0x2a27e)
#4 0x00007f040a024339 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a339)
#5 0x0000000000413435 _start (sway + 0x13435)
Stack trace of thread 1801:
#0 0x00007f040a107cdd syscall (libc.so.6 + 0x10dcdd)
#1 0x00007f040a5b4760 g_cond_wait (libglib-2.0.so.0 + 0x92760)
#2 0x00007f040a54b70b g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x2970b)
#3 0x00007f040a54bbc7 g_async_queue_pop (libglib-2.0.so.0 + 0x29bc7)
#4 0x00007f040973e403 fc_thread_func (libpangoft2-1.0.so.0 + 0xd403)
#5 0x00007f040a5b4ebe g_thread_proxy (libglib-2.0.so.0 + 0x92ebe)
#6 0x00007f040a08aaf3 start_thread (libc.so.6 + 0x90af3)
#7 0x00007f040a109f4c __clone3 (libc.so.6 + 0x10ff4c)
Screenshot (that is really not simply to get because sway starts but then VGA output freezes often):
I noticed that when VMWare is running, running QEMU / virt-manager will crash VMWare. I do not have the aforementioned crashes. I'll share my sway env variables:
export NO_AT_BRIDGE=1 # Disable AT-SPI2 service
export WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 # Disable direct scanout for WLR scene
export ELECTRON_OZONE_PLATFORM_HINT=wayland # Use Wayland for Electron apps
export XDG_CONFIG_HOME="$HOME/.config" # Set XDG config home
export XDG_CURRENT_DESKTOP=sway # Set current desktop environment
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix Java AWT issues on Wayland
export WLR_RENDERER=vulkan # Use Vulkan renderer for better performance
export RADV_PERFTEST=video_decode # Enable better video decoding for MPV
Additionally, since I run 6.15.1, I needed to submit a new entry to the AUR.
https://aur.archlinux.org/packages/vmware-host-modules-dkms-fix-git
@zDEFz Are you sure this has anything to do with Sway and is not simply because you're nesting VMs?
@zDEFz Are you sure this has anything to do with Sway and is not simply because you're nesting VMs?
Now you are making things up. Why would I nest VM's ? Besides, I think this is not even a sway issue. But you need to know that they probably cannot co-exist at the same time. So that vector is required to know in order to get a good grip on what could be happening. Besides, VMWare does not even make use of QEMU.
Now you are making things up. Why would I nest VM's ?
My apologies, looks like I misunderstood. So you were just running VMware and QEMU in parallel?
Now you are making things up. Why would I nest VM's ?
My apologies, looks like I misunderstood. So you were just running VMware and QEMU in parallel?
exactly. However, you can also just use VMWare + virt-manager, since virt-manager just uses QEMU.