Comments (15)
Unfortunately, even when we disabled the power_save, the mwifiex firmware still crashes on Surface 3 on heavy traffic or long idle.
Disabling ASPM L1 state can avoid this issue: https://github.com/linux-surface/linux-surface/wiki/Known-Issues-and-FAQ#mwifiex-module-crashing
Usually on Linux, disabling L1 state breaks S0ix (thus higher power consumption on suspend) but interestingly on chromeos, not break S0ix. So, once you disabled L1 state, you don't have to re-enable the L1 state for suspend, unlike what the wiki says.
from brunch.
@kitakar5525 Thanks a lot for your help once again !
@GayDingo Could you run the below commands in cros shell, reboot and see if it improves wifi stability:
sudo mkdir -p /var/brunch/bootscripts
echo "echo 0 > /sys/bus/pci/drivers/mwifiex_pcie/0000:0?:00.0/link/l1_aspm" | sudo tee /var/brunch/bootscripts/mwifiex.sh
sudo chmod 0755 /var/brunch/bootscripts/mwifiex.sh
from brunch.
Hi,
The mentioned patch is directly included at kernel level, could you please attach 2 "dmesg" to this issue (one obtained just after boot, one just after a wifi crash) ?
Thanks.
from brunch.
it's happened a few times but i havent been able to reproduce it in a while. I'll keep the issue open until it triggers again.
from brunch.
Got it!
dmesg_aftercrash.txt
dmesg_afterboot.txt
from brunch.
and what is worse, we can't control ASPM via sysfs until v5.5 series. We can only use the script method written in the wiki on v4.19 series kernel.
from brunch.
@kitakar5525 Thanks a lot for your help once again !
@GayDingo Could you run the below commands in cros shell, reboot and see if it improves wifi stability:
sudo mkdir -p /var/brunch/bootscripts echo "echo 0 > /sys/bus/pci/drivers/mwifiex_pcie/0000:0?:00.0/link/l1_aspm" | sudo tee /var/brunch/bootscripts/mwifiex.sh sudo chmod 0755 /var/brunch/bootscripts/mwifiex.sh
i have ran these. I'll report back in a week to see how things go. Thank you.
from brunch.
@GayDingo apparently the fix I posted will not work with kernel 4.19, i will try to find something else.
@kitakar5525 Sorry, just saw your comment, would completely disabling pcie aspm by adding to the kernel command line "pcie_aspm=off" work ? Is the impact on battery life noticeable ?
from brunch.
@GayDingo apparently the fix I posted will not work with kernel 4.19, i will try to find something else.
@kitakar5525 Sorry, just saw your comment, would completely disabling pcie aspm by adding to the kernel command line "pcie_aspm=off" work ? Is the impact on battery life noticeable ?
yep, i was about to post that the wifi ended up crashing again, thanks for the help, however.
Also, i will mention mine is the LTE model, i'll test cellular once i get the chance to for y'all. Take care!
EDIT: Also, I have updated to v81 Rammus with the latest testing 4.19 kernel
from brunch.
Here is the script I use to disable L1 state: aspm-disable-L1-wifi-S3.txt
EDIT: Updated (added some more comment for clarity): aspm-disable-L1-wifi-S3.txt
(rename it from .txt to .sh and execute with sudo. e.g. sudo bash aspm-disable-L1-wifi-S3.sh
)
(redistributing script from https://wireless.wiki.kernel.org/en/users/documentation/aspm#enabling_aspm_with_enable_aspm with modification to disable L1 state for Surface 3 wifi to avoid firmware crashing, following the permission notice)
Hmm. I need to update the wiki in linux-surface later for clarity and copyright, including
- add the direct link to the script (which I posted here)
- add the link to the wireless.wiki.kernel.org that distributes the original script
from brunch.
- I tried with kernel command line
pcie_aspm=off
but according tolspci
[1], ASPM seems to be actually not disabled (?) I might be misunderstanding - If I understand correctly, adding kernel command line
pcie_aspm.policy=performance
(or runtime:echo performance | sudo tee /sys/module/pcie_aspm/parameters/policy
) has the same effect aspcie_aspm=off
. And as expected, it broke S0ix. So, we usually don't want to to usepcie_aspm.policy=performance
(and alsopcie_aspm=off
if I assume that it also has the same effect aspcie_aspm.policy=performance
).
[1] You can show ASPM states by like this: sudo lspci -nnvvv | grep -iE '^..:..\..|aspm'
linux-surface are trying to avoid firmware crashing at kernel level but as I mentioned before, disabling L1 state usually breaks S0ix. So, we should ensure that L1 gets re-enabled before suspend...
I'm curious why pcie_aspm.policy=performance
breaks S0ix but not break S0ix when I use the script (aspm-disable-L1-wifi-S3.sh) on chromeos. Using the script on Linux breaks S0ix anyway.
from brunch.
@kitakar5525 Thanks a lot again for your support again ! I am getting tired of the mwifiex driver issues, I think I will disable aspm in the mwifiex driver in my next release even if it means breaking S0ix.
from brunch.
@GayDingo ah, you need to run that script on every boot or you can automate executing the script by copying that script into /var/brunch/bootscripts
then adding executable permission.
For example:
sudo mkdir -p /var/brunch/bootscripts
sudo cp aspm-disable-L1-wifi-S3.sh /var/brunch/bootscripts/
sudo chmod 0755 /var/brunch/bootscripts/aspm-disable-L1-wifi-S3.sh
@sebanc
Hmm. I'll let you know when some progress is made in this issue. I think just adding that script just works for now hopefully without breaking S0ix on chromeos, though.
from brunch.
Hi, I disabled aspm for the mwifiex driver in the new testing release, could you see if you still have this issue ?
from brunch.
I believe this issue is fixed so I will close it, don't hesitate to re-open it if needed
from brunch.
Related Issues (20)
- Brunch 113 unable to use SMB file share
- Brunch 113 unable to install Linux HOT 25
- VPN stop working after resumed from sleep HOT 1
- dGPU Problem HOT 1
- Bluetooth
- LG Gram 2023 issues - almost all fixed, but still No Sound. Can Someone Help? HOT 5
- Can't make chromeos image in nissa
- "IdeaPad Flex 5i Chromebook" VOLTEER (LILLIPUP) No sound, HOT 2
- Bluetooth issues. IdeaPad Duet 3 10IGL5 - Type 82HK HOT 1
- WiFi Not Working HOT 1
- installation error: your password could not be verified. Please try again. Could not mount cryptohome.
- sound not working HOT 3
- HP x360 14c (Eldrid) best config HOT 1
- Boot loop if its intalled on a NVME SSD HOT 1
- Sound not working - HP Elite Dragonfly Chromebook
- Brunch r103 not booting - AMD A4 StoneyRidge + grunt r103 recovery img
- nvme nvme0: I/0 768 (Write) QID 3 timeout, aborting
- Dell XPS 13: Fans never turn on, laptop runs very hot after a while HOT 2
- The "crosh" cannot work.
- Successfully installed to lvm partition, it cannot boot.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brunch.