Skip to content

wfd-p2p-sink: Log reason for NM device state change

I'm investigating an issue where the p2p wifi connection disconnects after roughly 30 seconds of streaming. A re-connection attempt then triggers a CRITICAL failure.

This is not a fix, but it might come in handy.

I can reproduce the issue with 76589d7c (v0.90.5), current master, and !175 (merged) on both Fedora 36 (NM 1.8) and Fedora 37 (NM 1.40):

** (gnome-network-displays:77083): DEBUG: 15:57:25.029: NdWfdP2PSink: Got play request from client
** (gnome-network-displays:77083): DEBUG: 15:57:25.029: Got state change notification from streaming sink to state ND_SINK_STATE_STREAMING
** (gnome-network-displays:77083): DEBUG: 15:57:49.186: WfdClient: Doing keep-alive
** (gnome-network-displays:77083): DEBUG: 15:57:54.655: WFDP2PProvider: Device state changed. It is now 120. Reason: 5
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: WfdMedia: Finalize
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: Got state change notification from streaming sink to state ND_SINK_STATE_DISCONNECTED
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: WFDP2PProvider: Discover is now set to 1
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: WFDP2PProvider: Starting P2P discovery.
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: WfdClient: Finalize
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: WfdServer: Finalize
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: WfdMediaFactory: Finalize
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: WFDP2PProvider: Device state changed. It is now 30. Reason: 0
** (gnome-network-displays:77083): DEBUG: 15:57:54.684: WFDP2PProvider: Starting P2P discovery.
** (gnome-network-displays:77083): DEBUG: 15:57:54.691: WFDP2PProvider: Started P2P discovery
** (gnome-network-displays:77083): DEBUG: 15:57:54.691: WFDP2PProvider: Started P2P discovery

** (gnome-network-displays:77083): CRITICAL **: 15:58:14.686: nd_wfd_p2p_sink_sink_start_stream: assertion 'self->state == ND_SINK_STATE_DISCONNECTED' failed

State 120 equates to NM_DEVICE_STATE_FAILED, and Reason 5 equates to NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE.

Merge request reports