Is sway compatible with gdm?
Does gdm support wayland or only Xorg?
gdm3 itself runs on wayland. It supports both wayland and Xorg sessions.
How to configure gdm for sway?
You are missing an entry in
/usr/share/wayland-sessions. This folder contains wayland desktop session entries for display managers in general. (Respectivly, X desktop session entries are located in
Create a file
/usr/share/wayland-sessions/sway.desktop with this content:
Comment=Sway - i3 on Wayland
# Please choose matching path
This entry was missing on my system, too. I've compiled sway from source; wayland-session/xsession entries are rather part of ready-to-use packages. Please make sure the
Exec line matches your path to executeable
Note that gdm3 does not show entries in
/usr/share/wayland-sessions if your host runs with a proprietary NVIDIA driver. The proprietary NVIDIA driver does not support Wayland. However, the free
nouveau driver does.