Kdeconnect causes mDNS address publishing services (systemd-resolved,
avahi-daemon) to change the published hostname and therefore break
discoverability and connectivity using the known hostname.
After a user session has logged in and as a result the user session service
has started:
app-org.kde.kdeconnect.daemon@autostart.service
Restarting systemd-resolved (that is managing mDNS publishing) breaks
host discovery due to:
E495-A systemd-resolved[65393]: Detected conflict on E495-A.local IN AAAA fe80::9a7d:5041:7b61:53fd
E495-A systemd-resolved[65393]: Hostname conflict, changing published hostname from 'E495-A' to 'E495-A5'.
Checking the ports shows kdeconnect is using 5353:
tj@E495-A:~$ sudo ss -tunlp 'sport = 5353'
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 0.0.0.0:5353 0.0.0.0:* users:(("systemd-resolve",pid=65769,fd=15))
udp UNCONN 0 0 [::]:5353 [::]:* users:(("systemd-resolve",pid=65769,fd=16))
udp UNCONN 0 0 *:5353 *:* users:(("kdeconnectd",pid=66103,fd=20))
I found upstream reports about this that also affects avahi-daemon in
the same way.
https://bugs.kde.org/show_bug.cgi?id=487719
The workaround is to stop the kdeconnect user session service before
restarting resolved/avahi and start it after.