Thank you for looking into this issue. Reporting current status. == "mwifiex crash after suspend"
This issue might be the Surface devices specific problem? Not sure. I know some ways to prevent at least mwifiex crashing: 1. Disabling d3cold for wifi device (even doable on mainline kernels): echo 0 | sudo tee /sys/devices/pci0000:00/0000:00:1d.3/0000:03:00.0/d3cold_allowed # on SB1 echo 0 | sudo tee /sys/devices/pci0000:00/0000:00:1d.0/0000:02:00.0/d3cold_allowed # on SP4 2. Your patch "0001-mwifiex-set-PCIE-to-PCI_D0-power-state-on-resume" 3. Disable bridge_d3 on mwifiex_pcie_probe() pdev->bus->self->bridge_d3 = false; but with those ways, as I mentioned before (Comment 108), it sometimes not connect to AP automatically because it fails to find APs (`nmcli d wifi list` shows empty). This is easily fixed by reloading the "mwifiex_pcie" module. Patch for this issue we (linux-surface community) are currently using is, based this patch from sebanc: - https://github.com/jakeday/linux-surface/issues/420#issuecomment-544615371 Actual commit is here: - https://github.com/linux-surface/kernel/commit/c8da40c0538a1528f3efd85cd91d9e314c85dd19 The patch from sebanc does the following things: - modify mwifiex_pcie_suspend/mwifiex_pcie_resume functions to fix crash after suspend. It seems that the function mwifiex_pcie_suspend2 is from mwifiex_pcie_remove and the function mwifiex_pcie_resume2 is largely from mwifiex_pcie_probe. So, I think that it behaves in the same way as we unload modules before suspend and re-load modules after suspend. - disable bridge_d3 to fix crash after suspend - disable "auto deep sleep" (I think not needed for this issue, but introduced hoping to fix other issues) I think the patch is too aggressive to be upstreamed as they are, but please use it as a reference. The patch also fixes S0ix on KBL/KBL-R devices (such as Surface Book 2, Surface Pro 5, Surface Laptop 1 or later). SKL devices such as Surface Pro 4 or Surface Book 1 cannot achieve S0ix anyway because of other reasons outside of mwifiex. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1730924 Title: Wifi does down "crash" in Surface Pro 4 Status in Linux: Confirmed Status in linux package in Ubuntu: Incomplete Bug description: I have a Surface Pro 4. The wifi works well in principle, but unfortunately it drops every x minutes. The only way to fix it I've found is to reboot the computer. lsb_release -rd Description: Ubuntu 17.10 Release: 17.10 ProblemType: Bug DistroRelease: Ubuntu 17.10 Package: linux-image-4.13.0-16-generic 4.13.0-16.19 ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4 Uname: Linux 4.13.0-16-generic x86_64 ApportVersion: 2.20.7-0ubuntu3.1 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: predatux 1537 F.... pulseaudio CurrentDesktop: KDE Date: Wed Nov 8 10:41:26 2017 HibernationDevice: RESUME=UUID=147af4ba-a4ce-41fe-a176-b36a1f6a590b Lsusb: Bus 002 Device 002: ID 045e:090c Microsoft Corp. Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 045e:07e8 Microsoft Corp. Bus 001 Device 003: ID 1286:204c Marvell Semiconductor, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub MachineType: Microsoft Corporation Surface Pro 4 ProcFB: 0 inteldrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-16-generic root=UUID=125200b0-7377-4985-a217-15503781a525 ro quiet splash vt.handoff=7 RelatedPackageVersions: linux-restricted-modules-4.13.0-16-generic N/A linux-backports-modules-4.13.0-16-generic N/A linux-firmware 1.169 SourcePackage: linux UpgradeStatus: Upgraded to artful on 2017-10-22 (16 days ago) dmi.bios.date: 02/24/2017 dmi.bios.vendor: Microsoft Corporation dmi.bios.version: 106.1624.768 dmi.board.name: Surface Pro 4 dmi.board.vendor: Microsoft Corporation dmi.chassis.type: 9 dmi.chassis.vendor: Microsoft Corporation dmi.modalias: dmi:bvnMicrosoftCorporation:bvr106.1624.768:bd02/24/2017:svnMicrosoftCorporation:pnSurfacePro4:pvrD0B08F1C03P38:rvnMicrosoftCorporation:rnSurfacePro4:rvr:cvnMicrosoftCorporation:ct9:cvr: dmi.product.family: Surface dmi.product.name: Surface Pro 4 dmi.product.version: D:0B:08F:1C:03P:38 dmi.sys.vendor: Microsoft Corporation To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1730924/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp