Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.1 Surface 3 Wifi Issues on Kubuntu 19.04 #456

Open
ratherDashing opened this issue Apr 8, 2019 · 8 comments
Open

5.0.1 Surface 3 Wifi Issues on Kubuntu 19.04 #456

ratherDashing opened this issue Apr 8, 2019 · 8 comments

Comments

@ratherDashing
Copy link

Wifi randomly dropped out. Relevant part of the dmesg below:

[ 2585.443666] PM: Image not found (code -22)
[ 2585.888832] IPTS ipts_mei_cl_exit() is called
[ 2585.933506] mwifiex_pcie 0000:01:00.0: info: successfully disconnected from 0c:80:63:23:69:2d: reason code 3
[ 2585.935455] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW in reset state
[ 2585.935459] mwifiex_pcie 0000:01:00.0: deleting the crypto keys
[ 2585.935461] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW in reset state
[ 2585.935463] mwifiex_pcie 0000:01:00.0: deleting the crypto keys
[ 2585.935464] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW in reset state
[ 2585.935466] mwifiex_pcie 0000:01:00.0: deleting the crypto keys
[ 2585.935468] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW in reset state
[ 2585.935470] mwifiex_pcie 0000:01:00.0: deleting the crypto keys
[ 2585.946564] mwifiex_pcie 0000:01:00.0: info: shutdown mwifiex...
[ 2585.948425] mwifiex_pcie 0000:01:00.0: PREP_CMD: card is removed
[ 2585.948435] mwifiex_pcie 0000:01:00.0: PREP_CMD: card is removed
[ 2586.207671] PM: hibernation entry
[ 2586.222618] PM: Syncing filesystems ...
[ 2586.283884] PM: done.
[ 2586.283889] Freezing user space processes ...
[ 2606.286916] Freezing of tasks failed after 20.003 seconds (1 tasks refusing to freeze, wq_busy=0):
[ 2606.287130] Chrome_IOThread D 0 1318 1288 0x00000004
[ 2606.287144] Call Trace:
[ 2606.287181] __schedule+0x2d1/0x840
[ 2606.287201] schedule+0x2c/0x70
[ 2606.287218] io_schedule+0x16/0x40
[ 2606.287236] __lock_page_or_retry+0x1ae/0x420
[ 2606.287253] ? file_check_and_advance_wb_err+0xe0/0xe0
[ 2606.287268] filemap_fault+0x1ab/0x840
[ 2606.287284] ? filemap_map_pages+0x1ae/0x380
[ 2606.287300] __do_fault+0x3c/0x130
[ 2606.287316] __handle_mm_fault+0xef3/0x1350
[ 2606.287333] handle_mm_fault+0xe1/0x210
[ 2606.287348] __do_page_fault+0x23a/0x4c0
[ 2606.287554] do_page_fault+0x2e/0xe0
[ 2606.287571] ? page_fault+0x8/0x30
[ 2606.287581] page_fault+0x1e/0x30
[ 2606.287599] RIP: 0033:0x7f99b1fdd0d0
[ 2606.287627] Code: Bad RIP value.
[ 2606.287634] RSP: 002b:00007f99a920b588 EFLAGS: 00010246
[ 2606.287647] RAX: 0000000000000000 RBX: 00007f999c00e850 RCX: 0000000000000000
[ 2606.287653] RDX: 00007f999c00e850 RSI: 0000000000000144 RDI: 00007f99b5ddf220
[ 2606.287661] RBP: 00007f99a920b6d0 R08: 0000000000000000 R09: 00007ffc51de4080
[ 2606.287668] R10: 00000000000d0e82 R11: 0000000000000a1a R12: 00007f999c00e850
[ 2606.287674] R13: 00007f99a920b840 R14: 00007f99a00056c0 R15: 0000000000000000
[ 2606.287815] OOM killer enabled.
[ 2606.287818] Restarting tasks ... done.
[ 2606.312947] PM: hibernation exit
[ 2606.393344] IPTS ipts_mei_cl_init() is called
[ 2606.478008] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 2606.478522] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 2606.513086] mwifiex_pcie: try set_consistent_dma_mask(32)
[ 2606.513356] mwifiex_pcie: PCI memory map Virt0: 00000000464b00c5 PCI memory map Virt2: 000000006962d2f3
[ 2606.532870] mwifiex_pcie 0000:01:00.0: WLAN FW already running! Skip FW dnld
[ 2606.532874] mwifiex_pcie 0000:01:00.0: WLAN FW is active
[ 2606.625218] mwifiex_pcie 0000:01:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (15.68.7.p154)
[ 2606.625228] mwifiex_pcie 0000:01:00.0: driver_version = mwifiex 1.0 (15.68.7.p154)
[ 2606.668195] mwifiex_pcie 0000:01:00.0 wlp1s0: renamed from mlan0
[ 2609.821880] mwifiex_pcie 0000:01:00.0: info: trying to associate to 'TreeHouse_5G' bssid 0c:80:63:23:69:2d
[ 2609.907863] mwifiex_pcie 0000:01:00.0: info: associated to bssid 0c:80:63:23:69:2d successfully
[ 2609.921370] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
[ 2767.921531] perf: interrupt took too long (4231 > 4213), lowering kernel.perf_event_max_sample_rate to 47250
[ 3167.880095] perf: interrupt took too long (5942 > 5288), lowering kernel.perf_event_max_sample_rate to 33500
[ 3236.760910] mmc0: Tuning timeout, falling back to fixed sampling clock
[ 3723.033925] mwifiex_pcie 0000:01:00.0: mwifiex_cmd_timeout_func: Timeout cmd id = 0xa4, act = 0x0
[ 3723.033973] mwifiex_pcie 0000:01:00.0: num_data_h2c_failure = 0
[ 3723.034189] mwifiex_pcie 0000:01:00.0: num_cmd_h2c_failure = 0
[ 3723.034203] mwifiex_pcie 0000:01:00.0: is_cmd_timedout = 1
[ 3723.034216] mwifiex_pcie 0000:01:00.0: num_tx_timeout = 0
[ 3723.034230] mwifiex_pcie 0000:01:00.0: last_cmd_index = 1
[ 3723.034245] mwifiex_pcie 0000:01:00.0: last_cmd_id: 16 00 a4 00 16 00 a4 00 7f 00
[ 3723.034258] mwifiex_pcie 0000:01:00.0: last_cmd_act: 00 00 00 00 00 00 00 00 00 00
[ 3723.034272] mwifiex_pcie 0000:01:00.0: last_cmd_resp_index = 0
[ 3723.034306] mwifiex_pcie 0000:01:00.0: last_cmd_resp_id: 16 80 7f 80 16 80 a4 80 7f 80
[ 3723.034333] mwifiex_pcie 0000:01:00.0: last_event_index = 0
[ 3723.034362] mwifiex_pcie 0000:01:00.0: last_event: 33 00 58 00 33 00 33 00 33 00
[ 3723.034386] mwifiex_pcie 0000:01:00.0: data_sent=1 cmd_sent=1
[ 3723.034400] mwifiex_pcie 0000:01:00.0: ps_mode=0 ps_state=0
[ 3723.034560] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3723.038171] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3723.038186] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3723.039420] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3723.039436] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3723.040679] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3723.040692] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3723.040985] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3723.040996] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3723.448146] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3723.448162] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3723.948097] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3723.948112] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3724.447646] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3724.447663] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3724.948613] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3724.948626] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3725.447905] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3725.447922] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3725.948251] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3725.948267] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3726.448292] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3726.448309] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3726.949772] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3726.949787] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3727.445938] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3727.445954] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3727.451009] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3727.451023] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3727.947937] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3727.947952] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3728.448100] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3728.448117] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3728.946075] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3728.946091] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3728.946366] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3728.946378] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3728.948853] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3728.948868] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3729.448222] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3729.448238] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3729.950601] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3729.950617] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3730.447472] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3730.447487] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3730.948626] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3730.948642] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3731.446494] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3731.446505] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3731.947127] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3731.947142] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3732.444975] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3732.444989] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3732.449400] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3732.449415] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3732.946172] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3732.946182] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3733.445348] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3733.445357] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3733.946214] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3733.946226] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3734.443699] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3734.443704] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3734.945637] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3734.945650] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3734.945854] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3734.945862] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3734.946771] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3734.946781] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3735.446042] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3735.446048] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3740.945822] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3740.945837] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3740.946111] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3740.946122] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3746.945091] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3746.945100] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3746.945231] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3746.945237] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3752.944811] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3752.944823] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3752.944992] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3752.944997] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3758.944813] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3758.944824] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3758.944996] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3758.945003] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3764.945424] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3764.945433] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3764.945554] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3764.945560] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3766.503615] mwifiex_pcie 0000:01:00.0: Ignore scan. Card removed or firmware in bad state
[ 3766.503623] mwifiex_pcie 0000:01:00.0: scan failed: -14
[ 3770.941881] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3770.941888] mwifiex_pcie 0000:01:00.0: failed to get signal information
[ 3770.942342] mwifiex_pcie 0000:01:00.0: PREP_CMD: FW is in bad state
[ 3770.942345] mwifiex_pcie 0000:01:00.0: failed to get signal information

@aleksfadini
Copy link

same here

@TBombadil
Copy link

Same problem here. Wifi works between seconds, minutes and hours. But 90% lasts only about 15min. Removing the module generally does not work after this. Sometimes, system does not shut down, needs hard reboot.
It seems that running encrypted/much traffic increases the likelihood of this happening. E.g. updating the system or browsing with Tor. But this is perhaps just my imagination.

@aleksfadini
Copy link

There is a total fix for that! It took me a long time to figure it out. Will post it asap but don’t despair. It has to do with the kernel aspm, you have to disable it.

@aleksfadini
Copy link

aleksfadini commented Sep 24, 2019

Sorry to keep you waiting.
Launch this script after boot. Wi-Fi 100% stable after that. You will have to launch it upon every boot.
EDIT: Markdown getting in the way, couldn't copy and paste. Somehow had to upload the script as txt! Sorry.


disable_wireless_aspm.txt

@chasecovello
Copy link

This fixed the problem on my system of the wifi cutting out during large high-speed data transfers. I just called the script from rc.local, but if this works for others as well, maybe it should be auto-installed by the setup script here and along with a systemd service to auto-start on boot.

Thanks!

@aleksfadini
Copy link

Glad to hear it works for you too. I think this covers a bunch of other cases of similar complaints with Marvell drivers WiFi instability. We should point these other people to this fix

@TBombadil
Copy link

I can confirm this. Since disabling ASPM, I've had no problems. And once it wasn't disabled, it broke again. I've made (and enabled) a systemd unit to disable ASPM on startup.
Here's the systemd unit that works for me (SP5 8Gb):

[Unit]
Description=Disable Marvell Wireless ASPM. (pci device: 01:00)

[Service]
ExecStart=setpci -s 01:00 0x80.B=0x0:3

[Install]
WantedBy=multi-user.target
Alias=disable-mrvl-wireless-aspm

After creating the file, say disable-mrvl-wireless-aspm.service in /etc/systemd/system/, you need to enable the service via systemd enable disable-mrv-wirelessl-aspm. Reboot (or run systemd start disable-mrvl-wireless-aspm).
I'm not sure if this works for suspend/hibernate though.

I can add a messy and incomplete python script producing the respective systemd unit, because I don't like probing for 0x80 every time, and the PCI stuff shouldn't change. But you'd probably prefer a clean bash script.

@kitakar5525
Copy link

kitakar5525 commented Nov 6, 2019

On My Surface 3, I have two issues regarding wifi on runtime:

  • wifi will drop on overnight idle (not suspend but just display off)
  • wifi will drop suddenly when I'm using Surface 3

and disabling ASPM (both L0s and L1) for wifi device fixed those two issues as everyone here mentioned. So, I looked into this issue a little bit further.

  • disabling L0s and L1 for wifi device:
    fixed those two issues
  • disabling L1 only (L0s enabled) for wifi device:
    fixed those two issues
  • disabling L0s only (L1 enabled) for wifi device:
    those two issues still reproducible
  • disabling L1 substates for both wifi device and its root port
    (echo powersave | sudo tee /sys/module/pcie_aspm/parameters/policy)
    those two issues still reproducible

So, on my Surface 3, disabling L1 (ASPM_SETTING=1 on the script) is needed and enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants