[XPERIA X, SFOS 4.5.0.24] Wireless network (wpa_supplicant)intermittently disconnecting

I’ve noticed that my Xperia X F5121 disconnects from the wireless network after being connected for approximately every 10 to 30 minutes.
Apps on the device are no longer able to connect to the internet despite the wireless connection in the settings UI reporting that it is still connected.

I’ve noticed this more recently whilst SSHing to the device over wireless, and the connection drops. The device is stationary and not moving in and out of range of the wireless network.

Using journalctl -xe, I have noticed some odd behaviour from wpa_supplicant:

Mar 08 19:22:00 Sailfish wpa_supplicant[7612]: wlan0: WNM: Disassociation Imminent - Disassociation Timer 0
Mar 08 19:22:00 Sailfish wpa_supplicant[7612]: wlan0: WNM: Preferred List Available
Mar 08 19:22:00 Sailfish kernel: wl_bss_connect_done succeeded with 40:0f:44:f2:22:88
Mar 08 19:22:00 Sailfish kernel: wl_bss_roaming_done succeeded to 40:0f:44:f2:22:88
Mar 08 19:22:00 Sailfish kernel: ETHER_TYPE_802_1X [RX]: ver 2, type 3, replay 1
Mar 08 19:22:00 Sailfish wpa_supplicant[7612]: wlan0: Associated with 40:0f:44:f2:22:88
Mar 08 19:22:00 Sailfish wpa_supplicant[7612]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Mar 08 19:22:00 Sailfish kernel: ETHER_TYPE_802_1X [TX]: ver 1, type 3, replay 1
Mar 08 19:22:00 Sailfish kernel: ETHER_TYPE_802_1X [RX]: ver 2, type 3, replay 2
Mar 08 19:22:00 Sailfish kernel: ETHER_TYPE_802_1X [TX]: ver 1, type 3, replay 2
Mar 08 19:22:01 Sailfish kernel: dhd_wait_pend8021x: TIMEOUT
Mar 08 19:22:01 Sailfish wpa_supplicant[7612]: wlan0: WPA: Key negotiation completed with 40:0f:44:f2:22:88 [PTK=CCMP GTK=CCMP]
Mar 08 19:22:01 Sailfish wpa_supplicant[7612]: wlan0: CTRL-EVENT-CONNECTED - Connection to 40:0f:44:f2:22:88 completed [id=0 id_str=]

I thought perhaps this could have something to do with the display sleeping on the device when idle:

Mar 08 19:19:51 Sailfish lipstick[2227]: [D] unknown:0 - sleepDisplay
Mar 08 19:19:51 Sailfish kernel: clearpad clearpad: (clearpad_set_irq:969) irq was disabled
Mar 08 19:19:51 Sailfish kernel: mdss_dsi_panel_off: ctrl=ffffffc0ad42f018 ndx=0
Mar 08 19:19:51 Sailfish kernel: @@@@ panel power off @@@@
Mar 08 19:19:51 Sailfish mce[607]: modules/display.c: mdy_display_state_enter(): current display state = OFF

However, it can’t be that, or if it is, then there is a bug, as the wireless never reconnects upon resuming use of the device. The SFOS UI continues to insist the wireless network is connected, but I have no Internet connection via any app or the SFOS browser, and I can no longer ping the Xperia X from another device on the same network.
I can see in journalctl when the device display is powered on manually by me, but no further information or errors relating to the lack of connection on wlan0.

Only when I stop the wpa_supplicant service:

Mar 08 19:25:30 Sailfish systemd[1]: Stopping WPA Supplicant daemon...
-- Subject: Unit wpa_supplicant.service has begun shutting down
-- Defined-By: systemd
-- Support: https://forum.sailfishos.org/
-- 
-- Unit wpa_supplicant.service has begun shutting down.
Mar 08 19:25:30 Sailfish wpa_supplicant[7612]: p2p-dev-wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Mar 08 19:25:30 Sailfish wpa_supplicant[7612]: nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
Mar 08 19:25:30 Sailfish kernel: WLC_E_IF: NO_IF set, event Ignored
Mar 08 19:25:30 Sailfish kernel: CFGP2P-ERROR) wl_cfgp2p_del_p2p_disc_if : P2P interface unregistered
Mar 08 19:25:30 Sailfish kernel: CFG80211-ERROR) wl_cfg80211_disconnect : Reason 3
Mar 08 19:25:30 Sailfish wpa_supplicant[7612]: p2p-dev-wlan0: CTRL-EVENT-TERMINATING
Mar 08 19:25:30 Sailfish wpa_supplicant[7612]: wlan0: CTRL-EVENT-DISCONNECTED bssid=40:0f:44:f2:22:88 reason=3 locally_generated=1
Mar 08 19:25:30 Sailfish kernel: CFG80211-ERROR) wl_is_linkdown : Link down Reason : WLC_E_LINK
Mar 08 19:25:30 Sailfish kernel: CFG80211-ERROR) wl_notify_connect_status : link down if wlan0 may call cfg80211_disconnected. event : 16, reason=2 from 40:0f:44:f2:22:88
Mar 08 19:25:30 Sailfish kernel: cfg80211: Calling CRDA to update world regulatory domain
Mar 08 19:25:30 Sailfish kernel: CFG80211-ERROR) wl_cfg80211_reg_notifier : reg_notifier for intiator:0 not supported : set default
Mar 08 19:25:30 Sailfish kernel: CFG80211-ERROR) wl_cfg80211_reg_notifier : Set country code 00 from User
Mar 08 19:25:30 Sailfish kernel: WLDEV-ERROR) wldev_set_country : wldev_set_country: set country for 00 as 00 rev -1 failed
Mar 08 19:25:30 Sailfish kernel: CFG80211-ERROR) wl_cfg80211_reg_notifier : set country Failed :-2
Mar 08 19:25:30 Sailfish kernel: cfg80211: World regulatory domain updated:
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (300 mBi, 2000 mBm)
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (300 mBi, 2000 mBm)
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (5490000 KHz - 5710000 KHz @ 80000 KHz), (300 mBi, 2000 mBm)
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (300 mBi, 2000 mBm)
Mar 08 19:25:30 Sailfish kernel: cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
Mar 08 19:25:30 Sailfish wpa_supplicant[7612]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Mar 08 19:25:30 Sailfish systemd-udevd[8437]: Process '/sbin/crda' failed with exit code 249.
Mar 08 19:25:31 Sailfish wpa_supplicant[7612]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Mar 08 19:25:31 Sailfish wpa_supplicant[7612]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Mar 08 19:25:31 Sailfish wpa_supplicant[7612]: wlan0: CTRL-EVENT-TERMINATING
Mar 08 19:25:31 Sailfish kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Mar 08 19:25:31 Sailfish systemd[1]: Stopped WPA Supplicant daemon.
-- Subject: Unit wpa_supplicant.service has finished shutting down
-- Defined-By: systemd
-- Support: https://forum.sailfishos.org/
-- 
-- Unit wpa_supplicant.service has finished shutting down.
Mar 08 19:25:31 Sailfish systemd[1]: Starting WPA Supplicant daemon...
-- Subject: Unit wpa_supplicant.service has begun start-up
-- Defined-By: systemd
-- Support: https://forum.sailfishos.org/
-- 

and restart the wpa_supplicant service does the connection successfully resume (until the next time it goes down again):

-- Unit wpa_supplicant.service has begun starting up.
Mar 08 19:25:31 Sailfish wpa_supplicant[8442]: Successfully initialized wpa_supplicant
Mar 08 19:25:31 Sailfish systemd[1]: Started WPA Supplicant daemon.
-- Subject: Unit wpa_supplicant.service has finished start-up
-- Defined-By: systemd
-- Support: https://forum.sailfishos.org/
-- 
-- Unit wpa_supplicant.service has finished starting up.
-- 
-- The start-up result is RESULT.
Mar 08 19:25:31 Sailfish kernel: CFGP2P-ERROR) wl_cfgp2p_add_p2p_disc_if : P2P interface registered
Mar 08 19:25:31 Sailfish kernel: WLC_E_IF: NO_IF set, event Ignored
Mar 08 19:25:33 Sailfish kernel: SMBCHG: aicl_done_handler: triggered, aicl: 1450
Mar 08 19:25:33 Sailfish kernel: SMBCHG: increment_aicl_count: aicl count c:1 dgltch:0 first:244857140
Mar 08 19:25:36 Sailfish wpa_supplicant[8442]: wlan0: Trying to associate with SSID 'myWirlessNetworkSSID'
Mar 08 19:25:36 Sailfish kernel: CFG80211-ERROR) wl_cfg80211_connect : Connecting to ff:ff:ff:ff:ff:ff with channel (44, 1) ssid myWirlessNetworkSSID
Mar 08 19:25:37 Sailfish kernel: wl_bss_connect_done succeeded with 12:1a:20:e3:38:78
Mar 08 19:25:37 Sailfish kernel: ETHER_TYPE_802_1X [RX]: ver 2, type 3, replay 1
Mar 08 19:25:37 Sailfish wpa_supplicant[8442]: wlan0: Associated with 12:1a:20:e3:38:78
Mar 08 19:25:37 Sailfish wpa_supplicant[8442]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Mar 08 19:25:37 Sailfish kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Mar 08 19:25:37 Sailfish kernel: cfg80211: Calling CRDA for country: GB
Mar 08 19:25:37 Sailfish kernel: CFG80211-ERROR) wl_cfg80211_reg_notifier : Set country code GB from  11d AP
Mar 08 19:25:37 Sailfish wpa_supplicant[8442]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=GB
Mar 08 19:25:37 Sailfish kernel: cfg80211: Regulatory domain changed to country: GB
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5490000 KHz - 5710000 KHz @ 80000 KHz), (N/A, 2700 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5850000 KHz - 5870000 KHz @ 10000 KHz), (600 mBi, 3000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5860000 KHz - 5880000 KHz @ 10000 KHz), (600 mBi, 3000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5870000 KHz - 5890000 KHz @ 10000 KHz), (600 mBi, 3000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5880000 KHz - 5900000 KHz @ 10000 KHz), (600 mBi, 3000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5890000 KHz - 5910000 KHz @ 10000 KHz), (600 mBi, 3000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5900000 KHz - 5920000 KHz @ 10000 KHz), (600 mBi, 3000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (5910000 KHz - 5930000 KHz @ 10000 KHz), (600 mBi, 3000 mBm)
Mar 08 19:25:37 Sailfish kernel: cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
Mar 08 19:25:37 Sailfish systemd-udevd[8456]: Process '/sbin/crda' failed with exit code 249.
Mar 08 19:25:37 Sailfish kernel: wl_bss_connect_done succeeded with 12:1a:20:e3:38:78
Mar 08 19:25:38 Sailfish kernel: ETHER_TYPE_802_1X [RX]: ver 2, type 3, replay 2
Mar 08 19:25:38 Sailfish kernel: ETHER_TYPE_802_1X [TX]: ver 1, type 3, replay 2
Mar 08 19:25:38 Sailfish kernel: ETHER_TYPE_802_1X [RX]: ver 2, type 3, replay 3
Mar 08 19:25:38 Sailfish kernel: ETHER_TYPE_802_1X [TX]: ver 1, type 3, replay 3
Mar 08 19:25:39 Sailfish kernel: dhd_wait_pend8021x: TIMEOUT
Mar 08 19:25:39 Sailfish wpa_supplicant[8442]: wlan0: WPA: Key negotiation completed with 12:1a:20:e3:38:78 [PTK=CCMP GTK=CCMP]
Mar 08 19:25:39 Sailfish wpa_supplicant[8442]: wlan0: CTRL-EVENT-CONNECTED - Connection to 12:1a:20:e3:38:78 completed [id=0 id_str=]

Is there some idle timeout on the connection, which appears to be failing on resuming use of the device. It’s a pain when the connection drops when connected remotely via SSH.
Have to start and stop the wpa_supplicant service in a crontab is not the most ideal workaround.