Closed bvasiliev closed 3 months ago
We are making use of the qmdnsengine codebase for mDNS. Qmdnsengine seems to check, if an interface can do multicast and if yes, it adds the socket to the multicast groups.
Could you check, if you can disable the Wifi interface for multicast and if that has an effect that mDNS packages are not send?
I disabled multicast on wireless interface and restarted hyperion:
osmc@vero:~$ ip link show wlan0
3: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
...
osmc@vero:~$ sudo ip link set multicast off dev wlan0
osmc@vero:~$ ip link show wlan0
3: wlan0: <BROADCAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default
...
osmc@vero:~$ sudo systemctl restart hyperion.service
But flappeninig with scans every 10 seconds remained unchanged.
I checked presence of mdns on interface after:
osmc@vero:~$ sudo tcpdump port 5353 -i wlan0
15:49:31.414512 IP vero.mdns > mdns.mcast.net.mdns: 0 [2a] PTR (QM)? _hyperiond-json._tcp.local. (87)
15:49:32.413951 IP vero.mdns > mdns.mcast.net.mdns: 0 [1a] PTR (QM)? _hyperiond-flatbuf._tcp.local. (71)
15:50:31.416413 IP vero.mdns > mdns.mcast.net.mdns: 0 [2a] PTR (QM)? _hyperiond-json._tcp.local. (87)
15:50:32.413618 IP vero.mdns > mdns.mcast.net.mdns: 0 [1a] PTR (QM)? _hyperiond-flatbuf._tcp.local. (71)
There are some packets, but not in 10 secons period. I've also checked all IP traffic on the interface including SSDP and didn't find any packets that matched 10 seconds interval or corellated with scan log events in dmesg.
Can hyperion interact with a host network in other ways like dbus or something?
The problem does not reproduces in the build with Qt6 instead of system's Qt5.
Also, the issue was not related to mDNS - turning it off had no effect. Perhaps the issue is related to QtNetwork in Qt5, SSDP(?), and the specific network stack.
Bug report
Hyperion with ENABLE_MDNS option forces a local connetcion manager (connmand in my case) to scan wi-fi radio network every 10 seconds. Network scan switches wireless adapter to slowest basic rate on TX, which significantly slows down all TCP connections on a system, flappening every 10 seconds.
This significantly slows down media streaming or network file systems over wi-fi.
Steps to reproduce
I use hyperion on Vero 4k box with flatbuffer forwarding to another hyperion instance over IP network.
To reproduce run Hypeyperion with ENABLE_MDNS on Debian 11 bullseye aarch64 with connmand connection manager (OSMC on Vero 4k).
What is expected?
Working mDNS services discovery without scanning wi-fi radio network, like other mdns-enabled apps.
What is actually happening?
After hyperion start RX rate on wi-fi access point for associated hyperion host drops to 6.0 MBit/s every 10 seconds.
On the host:
Stopping hyperion eliminates the problem and the network works fine.
System