Headless Sway on Raspberry Pi

Hi all. Hardware is Raspberry Pi 4.
I find booting into Sway will hang without the usb keyboard plugged in. The following log message appears when this happens.
Set WRL_LIBINPUT_NO_DEVICES=1 to suppress this check.
Any idea how to implement this? Where would I look for this code? I wish to start the Pi remotely and then plug the keyboard in at leisure.

Hey,

starting the Sway image is a two-step process…

  1. it starts the logon window (aka gtkgreeter) on a custom Sway instance (check config files in /etc/greetd, source: overlays/sway/etc/greetd · master · manjaro-arm / applications / arm-profiles · GitLab)
  2. after log in successfully it starts the main Sway (desktop) session (check config files in /etc/sway and $HOME/.config/sway, source: overlays/sway/etc/sway · master · manjaro-arm / applications / arm-profiles · GitLab and overlays/sway/etc/skel/.config/sway · master · manjaro-arm / applications / arm-profiles · GitLab).

In both steps there is a Sway configuration that imports some predefined settings and modes

  1. for the log in dialog: overlays/sway/etc/greetd/sway · master · manjaro-arm / applications / arm-profiles · GitLab
  2. for the main desktop session: overlays/sway/etc/skel/.config/sway/config · master · manjaro-arm / applications / arm-profiles · GitLab

In both files you will notice these includes:

include /etc/sway/definitions
include /etc/sway/inputs/*
include /etc/sway/outputs/*

With the include of /etc/sway/inputs/* it will create config sections for mouse and keyboard. I would start investigation here and do some changes for it to enable a headless mode. I guess changing the config settings for the log in dialog (gtkgreeter) should be sufficient as you might need to have the keyboard attached to log into the main desktop session anyway…

Good luck!