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 Framework stuck in infinite boot loop HOT 1
- Lenovo ThinkPad E14 Gen 3 (Ryzen 7 5700U): TouchPad Issues
- Touchscreen not work on Surface Pro LTE Advanced 2017(Surface Pro 6) HOT 1
- Unable to connect to secure wifi networks
- Broken WIFI and bluetooth Chrome OS brunch 125 - Lenovo Ideapad 530S
- having issue with play store in my chrome os HOT 1
- Installation of Chrome OS on a Lenovo Ideapad D330-10IGL HOT 1
- Touchpad Not Working on Lenovo IdeaPad Flex 5 14ARE05 with Brunch/Chrome OS: Kernel Parameter Help Needed
- rtl8822ce wifi adapter fix is missing.
- Router hotspot is unable to connect to intel ax101 wifi adapter!
- How to change splash screen into custom one
- Can I know how to create custom brunch framework using source code of it HOT 1
- How to get a Brunch image bootable in OpenSUSE HOT 1
- Disable developer mode HOT 1
- CPU is not running at it's maximum speed
- Having Issues with T480 with Chrome Os , Play store gives error code 7
- Stuck at chrome os logo on first boot HOT 61
- Bringup Camera on Surface Pro 5 HOT 2
- no sound at asus c302 while using newer kernel(>4.19), or screen rotation issue at chromebook-4.19
- Bluetooth won't work HOT 1
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.