Marvell 88W8897 - Wifi won't Reconnect After Losing Connection

Hey all, newbie to Linux/Manjaro here. I'm having an issue where when I lose my WiFi, my computer fails to reconnect; I've resigned myself to restarting the computer in order to get the connection back.

I'm running Manjaro Cinnamon, Kernel: 4.19.66-1-MANJARO x86_64

Any advice about what I can do to fix this issue would be appreciated. Thanks in advance!

Please post:

inxi - Fxxxz
1 Like

Blockquote
System:
Host: jtd-Manjaro Kernel: 4.19.66-1-MANJARO x86_64 bits: 64 compiler: gcc
v: 9.1.0 Desktop: Cinnamon 4.2.3 dm: LightDM 1.30.0 Distro: Manjaro Linux
Machine:
Type: Laptop System: Microsoft product: Surface Pro 3 v: 1
serial:
Mobo: Microsoft model: Surface Pro 3 v: 1 serial:
UEFI: American Megatrends v: 3.11.2650 date: 04/30/2019
Battery:
ID-1: BAT0 charge: 13.8 Wh condition: 39.4/42.2 Wh (93%) volts: 7.9/7.6
model: SIMPLO X898289 type: Li-ion serial: status: Charging
cycles: 367
CPU:
Topology: Dual Core model: Intel Core i5-4300U bits: 64 type: MT MCP
arch: Haswell rev: 1 L2 cache: 3072 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
bogomips: 19961
Speed: 876 MHz min/max: 800/2900 MHz Core speeds (MHz): 1: 856 2: 896
3: 894 4: 840
Graphics:
Device-1: Intel Haswell-ULT Integrated Graphics vendor: Microsoft
driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0a16
Display: x11 server: X.Org 1.20.5 driver: intel unloaded: modesetting
alternate: fbdev,vesa tty: N/A
OpenGL: renderer: Mesa DRI Intel Haswell Mobile v: 4.5 Mesa 19.1.4
compat-v: 3.0 direct render: Yes
Audio:
Device-1: Intel Haswell-ULT HD Audio driver: snd_hda_intel v: kernel
bus ID: 00:03.0 chip ID: 8086:0a0c
Device-2: Intel 8 Series HD Audio vendor: Microsoft driver: snd_hda_intel
v: kernel bus ID: 00:1b.0 chip ID: 8086:9c20
Sound Server: ALSA v: k4.19.66-1-MANJARO
Network:
Device-1: Marvell 88W8897 [AVASTAR] 802.11ac Wireless vendor: SafeNet
driver: mwifiex_pcie v: 1.0 port: 3040 bus ID: 01:00.0 chip ID: 11ab:2b38
IF: wlp1s0 state: up mac:
Drives:
Local Storage: total: 238.47 GiB used: 88.06 GiB (36.9%)
ID-1: /dev/sda vendor: Samsung model: MZMTE256HMHP-000MV size: 238.47 GiB
speed: 6.0 Gb/s serial: rev: 1M0Q scheme: GPT
Partition:
ID-1: / size: 19.36 GiB used: 11.51 GiB (59.4%) fs: ext4 dev: /dev/sda9
ID-2: swap-1 size: 9.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda8
Sensors:
System Temperatures: cpu: 51.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 202 Uptime: 47m Memory: 7.70 GiB used: 1.65 GiB (21.4%)
Init: systemd v: 242 Compilers: gcc: 9.1.0 Shell: bash v: 5.0.7
running in: gnome-terminal inxi: 3.0.35
[jtd@jtd-Manjaro ~]$ Host: jtd-Manjaro Kernel: 4.19.66-1-MANJARO x86_64 bits: 64 compiler: gcc
bash: Host:: command not found
[jtd@jtd-Manjaro ~]$ v: 9.1.0 Desktop: Cinnamon 4.2.3 dm: LightDM 1.30.0 Distro: Manjaro Linux
bash: v:: command not found
[jtd@jtd-Manjaro ~]$ Machine:
bash: Machine:: command not found
[jtd@jtd-Manjaro ~]$ Type: Laptop System: Microsoft product: Surface Pro 3 v: 1
bash: Type:: command not found
[jtd@jtd-Manjaro ~]$ serial:
bash: syntax error near unexpected token newline'

Install and test many of the most recent kernels. Test at least kernels 5.1, 5.2 & 5.3. Install kernels through Manjaro Settings Manager, and always have at least two kernels installed at all times for safety.


Try this:

Disable MAC Address Randomization with the following command:

echo -e "[device]\nwifi.scan-rand-mac-address=no" | sudo tee /etc/NetworkManager/conf.d/disable-random-mac.conf

After creating the new conf file, reboot both your router and your computer.


Try this:

Repeat this command up to 5 times after you have been disconnected to see if the network reconnects:

sudo modprobe -r mwifiex_pcie; sleep 3; sudo modprobe mwifiex_pcie

If there is no improvement, then run this command:

sudo systemctl stop NetworkManager; sudo ip link set wlp1s0 down; sudo modprobe -r mwifiex_pcie; sleep 3; sudo modprobe mwifiex_pcie; sudo ip link set wlp1s0 up; sudo systemctl start NetworkManager

You may want to repeat that command as well.

Please post any outputs of those commands.

1 Like

Try this:

Lock your Wifi connection to one BSSID.

You can do this in Network Manager's "Wi-Fi" tab in your connection's properties settings.

There is a "BSSID" drop down field where you can select and lock your Wi-Fi to a single BSSID.


Disable Network Manager's WiFi power saving features with the following command:

echo -e "[connection]\nwifi.powersave = 0" | sudo tee /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Disable Active-State Power Management (ASPM) via a kernel boot parameter:

sudo sed '/^GRUB_CMDLINE_LINUX_DEFAULT=/s/"$/ pcie_aspm=off "/g' -i /etc/default/grub

After adding the boot parameter and saving your changes, run:

sudo update-grub 

Then reboot, and if there is no improvement reboot several more times just for good measure.


Test each fix one at a time so you know which change resulted in any improvement.

1 Like

Same Problem here on Surface Pro 3, Kernel 5.2.11-1.

Did try disabling MAC Address Randomization, however before the reboot my system went on Sleep and woke up without the network connection.

Worked here. Output: Cannot find device "wlp1s0"- still worked. Forgot to try the second line of commands before, though.

Output:

[connection]
wifi.powersave = 0

Seems like that did the trick - I'll watch it and edit if something changes.

Sorry, hit Save too early. Newbie :confused:

1 Like

You need to substitute your own device ID in place of "wlp1s0". You can find its designation with:

inxi -n
1 Like

wlp1s0 actually is the right ID. However, it seems to be renamed from wlan0 or something like that. I don't remember where i saw that.

And oh, turning off MAC randomization did not help, unfortunately

1 Like

If you have no network connection after waking from sleep, this can usually be corrected by writing a service.

1 Like

Just found out that disabling the wifi manager's power saving feature also did not help that much.
What exactly are the side effects of the ASPM-Idea?
Writing a service could be a good idea, too.

On a laptop it may result in marginally less battery life as it will use a little more power. Those who had used this on a laptop, had reported it wasn't a big issue.

Did not help either, unfortunately.

I will try the service-thing next. At least the restart-line is a good help.
What could but must not be clear is that bluetooth seems to have the same problems. Also with wifi: Nothing regarding the Wifi-connection does work, so i guess that the wifi-chip has its problems.

Yes, it certainly does.

Could you please post:

modinfo -p mwifiex_pcie

No answer on this one.

With modinfo mwifiex_pcie:

filename:       /lib/modules/5.2.11-1-MANJARO/kernel/drivers/net/wireless/marvell/mwifiex/mwifiex_pcie.ko.xz
license:        GPL v2
version:        1.0
description:    Marvell WiFi-Ex PCI-Express Driver version 1.0
author:         Marvell International Ltd.
srcversion:     DCDFC6F7E023FFEB001390C
alias:          pci:v00001B4Bd00002B42sv*sd*bc*sc*i*
alias:          pci:v000011ABd00002B42sv*sd*bc*sc*i*
alias:          pci:v000011ABd00002B38sv*sd*bc*sc*i*
alias:          pci:v000011ABd00002B30sv*sd*bc*sc*i*
depends:        mwifiex
retpoline:      Y
intree:         Y
name:           mwifiex_pcie
vermagic:       5.2.11-1-MANJARO SMP preempt mod_unload modversions 
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key

followed by some signature stuff in HEX

Apparently my command to display the adapters settable parameters returned nothing because there is no user configurable parameters.

1 Like

This sometimes helps after sleep/hibernate, but sometimes it hangs at sudo modprobe -r mwifiex_pcie and a reboot is necessary.
(So far) it works reliably when I run the first half before sleep/hibernate, and the second half afterwards.
Basically I modified a script I found on reddit that used to work for Ubuntu (but not Manjaro), from

#!/bin/sh
case $1/$2
  in pre/hibernate)
    modprobe -r mwifiex_pcie
    modprobe -r mwifiex
    sleep 0.5
    echo "1" > /sys/bus/pci/devices/0000\:01\:00.0/reset
    sleep 0.5
    echo "Going to $2..."
    ;;
  post/hibernate)
    echo "Waking up from $2..."
    echo "Reload Wifi Driver"
    echo "1" > /sys/bus/pci/devices/0000\:01\:00.0/reset
    sleep 0.5
    modprobe mwifiex
    modprobe mwifiex_pcie
    ;;
esac

to

#!/bin/sh
case $1/$2
  in pre/*)
    systemctl stop NetworkManager
    ip link set wlp1s0 down
    modprobe -r mwifiex_pcie
    sleep 0.5
    echo "Going to $2..."
    ;;
  post/*)
    echo "Waking up from $2..."
    echo "Reload Wifi Driver"
    sleep 1
    modprobe mwifiex_pcie
    sleep 1
    ip link set wlp1s0 up
    systemctl restart NetworkManager
    ;;
esac
exit

and put in into /lib/systemd/system-sleep/SP3sleep.sh. Maybe a service would be better?

Regarding the random WiFi connection losses,

[connection]
wifi.powersave = 2

is reccommended on various sites and works as well (allegedly wifi.powersave = 3 is the default value)

That is the old method to rmmod modules before suspend and modprobe them at resume. It still works, but it is discouraged as it has been deprecated. The recommended method these days is to use a service.

I have a thread with many examples of suspend services for wifi and bluetooth:

If your method is working then that's great. However, learning how to write services will be far more beneficial in the long run.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by