Multicast inbound packets are discarded
It seems Jolla phone discards incoming multicast packets when screen is off (even if plugged on AC), so applications like avahi and nss-mdns does not work (it's also easy to demonstrate with tcpdump).
On Android you could use the WifiManager.MulticastLock API to disable this kind of behaviour. Is there an equivalent on Jolla phone (API or settings) ?
Related question : Add support for Avahi (aka Zeroconf)