Running sway in my VM hangs on an M1 Mac

Hello, I’m running NixOS with a UTM VM on a M1 Mac. I’m trying the configuration from the NixOS sway wki page. My configuration files can be seen here.

After logging with the terminal and running sway the terminal hangs and I’m forced to reboot my VM via ssh. I tailed the journalctl logs while running sway and here are the errors that are reported. Thanks to anyone who can try to help me.

Aug 14 14:30:57 yavin dbus-daemon[778]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service' requested by ':1.1' (uid=0 pid=794 comm="/nix/store/f1nggs3xkh76644zfc1nxckx9345slqi-system")
Aug 14 14:30:57 yavin systemd[1]: Starting Authorization Manager...
Aug 14 14:30:57 yavin polkitd[1049]: Started polkitd version 0.120
Aug 14 14:30:57 yavin polkitd[1049]: Loading rules from directory /etc/polkit-1/rules.d
Aug 14 14:30:57 yavin polkitd[1049]: Loading rules from directory /run/current-system/sw/share/polkit-1/rules.d
Aug 14 14:30:57 yavin polkitd[1049]: Finished loading, compiling and executing 2 rules
Aug 14 14:30:57 yavin dbus-daemon[778]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Aug 14 14:30:57 yavin systemd[1]: Started Authorization Manager.
Aug 14 14:30:57 yavin polkitd[1049]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Aug 14 14:30:57 yavin systemd[1029]: Created slice User Core Session Slice.
Aug 14 14:30:57 yavin systemd[1029]: Starting D-Bus User Message Bus...
Aug 14 14:30:57 yavin systemd[1029]: Started D-Bus User Message Bus.
Aug 14 14:30:57 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Activating systemd to hand-off: service name='ca.desrt.dconf' unit='dconf.service' requested by ':1.1' (uid=1000 pid=1093 comm="gsettings set org.gnome.desktop.interface gtk-them")
Aug 14 14:30:57 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Successfully activated service 'org.freedesktop.systemd1'
Aug 14 14:30:57 yavin systemd[1029]: Starting User preferences database...
Aug 14 14:30:57 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Successfully activated service 'ca.desrt.dconf'
Aug 14 14:30:57 yavin systemd[1029]: Started User preferences database.
Aug 14 14:30:57 yavin systemd[1029]: Started PipeWire Multimedia Service.
Aug 14 14:30:57 yavin systemd[1029]: Started Multimedia Service Session Manager.
Aug 14 14:30:57 yavin systemd[1029]: Starting Portal service...
Aug 14 14:30:57 yavin systemd[1029]: Starting Portal service (wlroots implementation)...
Aug 14 14:30:57 yavin wireplumber[1108]: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Aug 14 14:30:57 yavin wireplumber[1108]: could not set nice-level to -11: No such file or directory
Aug 14 14:30:57 yavin wireplumber[1108]: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Aug 14 14:30:57 yavin pipewire[1107]: mod.rt: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Aug 14 14:30:57 yavin pipewire[1107]: mod.rt: could not set nice-level to -11: No such file or directory
Aug 14 14:30:57 yavin pipewire[1107]: mod.rt: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Aug 14 14:30:57 yavin wireplumber[1108]: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Aug 14 14:30:57 yavin wireplumber[1108]: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Aug 14 14:30:57 yavin wireplumber[1108]: could not make thread 1112 realtime using RTKit: No such file or directory
Aug 14 14:30:57 yavin pipewire[1107]: mod.rt: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Aug 14 14:30:57 yavin pipewire[1107]: mod.rt: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
Aug 14 14:30:57 yavin pipewire[1107]: mod.rt: could not make thread 1115 realtime using RTKit: No such file or directory
Aug 14 14:30:57 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Activating via systemd: service name='org.freedesktop.portal.Documents' unit='xdg-document-portal.service' requested by ':1.5' (uid=1000 pid=1109 comm="/nix/store/0id1zyzna5ffar95pqdgzi92szhm1w8w-xdg-de")
Aug 14 14:30:57 yavin systemd[1029]: Starting flatpak document portal service...
Aug 14 14:30:57 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Activating via systemd: service name='org.freedesktop.impl.portal.PermissionStore' unit='xdg-permission-store.service' requested by ':1.6' (uid=1000 pid=1118 comm="/nix/store/0id1zyzna5ffar95pqdgzi92szhm1w8w-xdg-de")
Aug 14 14:30:57 yavin xdg-desktop-portal-wlr[1110]: MESA-LOADER: failed to open zink: /run/opengl-driver/lib/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/dri, suffix _dri)
Aug 14 14:30:57 yavin xdg-desktop-portal-wlr[1110]: failed to load driver: zink
Aug 14 14:30:57 yavin systemd[1029]: Starting sandboxed app permission store...
Aug 14 14:30:57 yavin systemd[1029]: Started Portal service (wlroots implementation).
Aug 14 14:30:57 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Successfully activated service 'org.freedesktop.impl.portal.PermissionStore'
Aug 14 14:30:57 yavin systemd[1029]: Started sandboxed app permission store.
Aug 14 14:30:57 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Successfully activated service 'org.freedesktop.portal.Documents'
Aug 14 14:30:57 yavin systemd[1029]: Started flatpak document portal service.
Aug 14 14:30:57 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gtk' unit='xdg-desktop-portal-gtk.service' requested by ':1.5' (uid=1000 pid=1109 comm="/nix/store/0id1zyzna5ffar95pqdgzi92szhm1w8w-xdg-de")
Aug 14 14:30:57 yavin systemd[1029]: Starting Portal service (GTK/GNOME implementation)...
Aug 14 14:30:58 yavin wireplumber[1108]: reserve-device plugin is not connected to D-Bus, disabling device reservation
Aug 14 14:30:58 yavin .xdg-desktop-po[1132]: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Aug 14 14:30:58 yavin wireplumber[1108]: [0:00:24.534665594] [1108]  INFO IPAManager ipa_manager.cpp:138 libcamera is not installed. Adding '/nix/store/src/ipa' to the IPA search path
Aug 14 14:30:58 yavin wireplumber[1108]: [0:00:24.536894052] [1108]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0
Aug 14 14:30:58 yavin dbus-daemon[1094]: [session uid=1000 pid=1094] Successfully activated service 'org.freedesktop.impl.portal.desktop.gtk'
Aug 14 14:30:58 yavin systemd[1029]: Started Portal service (GTK/GNOME implementation).
Aug 14 14:30:58 yavin .xdg-desktop-po[1109]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
Aug 14 14:30:58 yavin .xdg-desktop-po[1109]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
Aug 14 14:30:58 yavin .xdg-desktop-po[1109]: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
Aug 14 14:30:58 yavin systemd[1029]: Started Portal service.
Aug 14 14:31:15 yavin systemd-timesyncd[753]: Timed out waiting for reply from 46.22.24.205:123 (2.nixos.pool.ntp.org).
Aug 14 14:31:14 yavin systemd-timesyncd[753]: Initial synchronization to time server 90.187.148.77:123 (2.nixos.pool.ntp.org).
Aug 14 14:31:14 yavin systemd-journald[566]: Time jumped backwards, rotating.

More googling suggests this is an issue with sway and qemu, so I don’t think this is a good place to solve the problem.

seems it’s ok on intel nixos + qemu, perhaps change to title of this too

[Running sway in my VM hangs on a M1 Mac]

just to be clear!