[G2 Q&A, Help & Troubleshooting] _LeoDJ:
Now something really strange happened...

After I let the phone completely turned off over night and started it again this evening, WiFi seemed to be working just fine in stock (didn't try to connect, but I could turn it off and on and also see the list of APs.)

Then I quickly flashed CM13 including KK Baseband, CAF Bootstack and Gapps, then in the Setup of CM13 the WiFi wasn't working all of a sudden :/

After a reboot, WiFi Networks were found, but if I tried to connect to one, it just said "save" and nothing else happened.

Here is the logcat:

12-31 13:01:34.865 809 1096 D WifiStateMachine: CONNECT_NETWORK updating existing config with id=0 configKey="sNet"-WPA_PSK

12-31 13:01:34.895 809 1096 D WifiStateMachine: CONNECT_NETWORK id=0 config="sNet" cnid=0 supstate=DisconnectedState my state DisconnectedState uid = 1000

12-31 13:01:34.895 809 1096 E WifiConfigStore: saveWifiConfigBSSID Setting BSSID for "sNet"-WPA_PSK to any

12-31 13:01:34.900 809 1096 E WifiConfigStore: saveWifiConfigBSSID Setting BSSID for "sNet"-WPA_PSK to any

12-31 13:01:34.904 809 1096 D WifiAutoJoinController : updateConfigurationHistory found 0 networks

12-31 13:01:34.904 809 1096 D WifiAutoJoinController : updateConfigurationHistory try to connect to an old network!! : "sNet"-WPA_PSK

12-31 13:01:34.904 809 1096 E WifiConfigStore: rewrite network history for "sNet"-WPA_PSK

12-31 13:01:34.906 809 1096 E WifiConfigStore: buildPnoList sortedWifiConfigurations size 1

12-31 13:01:34.906 809 1096 E WifiConfigStore: found sortedWifiConfigurations : "sNet"-WPA_PSK

12-31 13:01:34.911 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:34.912 809 1096 D WifiConfigStore: Retrieve network priorities after PNO.

12-31 13:01:35.914 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:36.916 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:37.918 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:38.001 256 996 D audio_hw_primary: out_standby: enter: stream (0xb5ff6fc0) usecase(1: low-latency-playback)

12-31 13:01:38.042 256 996 D hardware_info: hw_info_append_hw_type : device_name = speaker

12-31 13:01:38.601 809 1646 I ActivityManager: Killing 1650:com.android.printspooler/u0a66 (adj 15): empty #17

12-31 13:01:38.620 809 1639 D ActivityManager: cleanUpApplicationRecord -- 1650

12-31 13:01:38.921 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:39.925 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:40.928 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:41.447 809 1029 V sensors_hal_Accel: processReportInd: X: 0.070801 Y: 0.008530 Z: 9.871460

12-31 13:01:41.447 809 1068 D sensors_hal_Ctx: poll:polldata:1, sensor:0, type:1, x:0.070801 y:0.008530 z:9.871460

12-31 13:01:41.521 809 1029 V sensors_hal_Accel: processReportInd: X: 0.078583 Y: -0.003265 Z: 9.866501

12-31 13:01:41.521 809 1068 D sensors_hal_Ctx: poll:polldata:1, sensor:0, type:1, x:0.078583 y:-0.003265 z:9.866501

12-31 13:01:41.931 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:42.934 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:43.937 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:44.941 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5 retry=1

12-31 13:01:45.807 250 250 I rmt_storage: rmt_storage_connect_cb: clnt_h=0x6 conn_h=0xb6c8a030

12-31 13:01:45.807 250 250 I rmt_storage: rmt_storage_rw_iovec_cb: /boot/modem_fs1: clnt_h=0x1: req_h=0xa msg_id=3: R/W request received

12-31 13:01:45.807 250 250 I rmt_storage: wakelock acquired: 1, error no: 42

12-31 13:01:45.807 250 475 I rmt_storage: rmt_storage_client_thread: /boot/modem_fs1: clnt_h=0x1 Unblock worker thread (th_id: -1228670672)

12-31 13:01:45.913 809 1096 D WifiConfigStore: Retrieve network priorities after PNO.

12-31 13:01:45.917 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5

12-31 13:01:45.921 809 1096 D WifiConfigStore: Retrieve network priorities after PNO.

12-31 13:01:45.923 1688 1688 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-FAILED ret=-5