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

FS#2018 - Wifi stops working until reboot #6981

Closed
openwrt-bot opened this issue Dec 21, 2018 · 27 comments
Closed

FS#2018 - Wifi stops working until reboot #6981

openwrt-bot opened this issue Dec 21, 2018 · 27 comments
Labels

Comments

@openwrt-bot
Copy link

misterti:

Asus RT-N56U, old, known, still unresolved problem with wifi drop, because of the rt2x00 driver. Wifi will drop with this driver at high speed download. Queue full and friends condition will occur in driver.

Reproduce:
try a large file download over wifi, when speed reaches 5Mb/s or over, driver will eventually fail in a very short time until reboot, every time.

@openwrt-bot
Copy link
Author

psyborg:

Which device revision, what error messages in log do you get. Post kernel logs and more info if you expect bug to get solved!

@openwrt-bot
Copy link
Author

misterti:

Attached is a kernel log copied from luci. It should also contain all data of the device.

@openwrt-bot
Copy link
Author

y.salnikov:

Same problem with same dmesg output on d-link dir-620 D1.

@openwrt-bot
Copy link
Author

psyborg:

try solution from comment in sub-task

@openwrt-bot
Copy link
Author

misterti:

@Psyborg
Thanks, are the patches integrated in the dev build, like you proposed on the forum?

@openwrt-bot
Copy link
Author

psyborg:

obviously, the ones linked on patchwork are not. for your device you need first one only, 2nd patch is for mt7620 devices. patches to remove (with prefixed numbers) are integrated

@openwrt-bot
Copy link
Author

y.salnikov:

So, just suppressing printk is enough to fix bug?

@openwrt-bot
Copy link
Author

misterti:

how does that work then? When will this patch be integrated into dev build?
i don't know how to build an image and i really don't have time to get into this right now. Is it possible that if any of you guys builds a patched image and just send me the affected .ko files, so i replace them in my 18.06? Would that work?

@openwrt-bot
Copy link
Author

psyborg:

it is enough to fix interface hang. a bug itself is most likely insignificant. improper bug printout caused more problems than bug itself. i can't tell whether the wifi still freezes when printout is moved to rt2x00_dbg context and debugging features enabled, but printing it from within rt2x00_err context is wrong.

as a reference, when porting several RT6352 calibration routines i did something similar in one of these and got malformed rf register values, calibration failure, perhaps even a crash but who would remember exactly...

@openwrt-bot
Copy link
Author

misterti:

I think it's time for a new router, i'm getting too old for this

@openwrt-bot
Copy link
Author

y.salnikov:

Built image with mentioned patch, not a single hang for now.

@openwrt-bot
Copy link
Author

misterti:

Great, can you share rt2x00lib.ko?

@openwrt-bot
Copy link
Author

psyborg:

did you also remove patches 701-705? if not try without these too since they cause throughput regression

@openwrt-bot
Copy link
Author

y.salnikov:

There is no 701-705 patches in tree.
/mnt/d/linux_files/build/openwrt/openwrt/target/linux/ramips/patches-4.14   openwrt-18.06  ls
0004-MIPS-ralink-add-MT7621-pcie-driver.patch
0005-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
0006-MIPS-ralink-add-cpu-frequency-scaling.patch
0007-MIPS-ralink-copy-the-commandline-from-the-devicetree.patch
0009-PCI-MIPS-enable-PCIe-on-MT7688.patch
0013-owrt-hack-fix-mt7688-cache-issue.patch
0015-arch-mips-do-not-select-illegal-access-driver-by-def.patch
0024-GPIO-add-named-gpio-exports.patch
0025-pinctrl-ralink-add-pinctrl-driver.patch
0026-DT-Add-documentation-for-gpio-ralink.patch
0027-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
0028-GPIO-ralink-add-mt7621-gpio-controller.patch
0031-uvc-add-iPassion-iP2970-support.patch
0032-USB-dwc2-add-device_reset.patch
0034-NET-multi-phy-support.patch
0037-mtd-cfi-cmdset-0002-force-word-write.patch
0039-mtd-add-mt7621-nand-support.patch
0040-nand-hack.patch
0041-DT-Add-documentation-for-spi-rt2880.patch
0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch
0043-spi-add-mt7621-support.patch
0044-i2c-MIPS-adds-ralink-I2C-driver.patch
0045-i2c-add-mt7621-driver.patch
0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
0047-DMA-ralink-add-rt2880-dma-engine.patch
0048-asoc-add-mt7620-support.patch
0051-serial-add-ugly-custom-baud-rate-hack.patch
0052-pwm-add-mediatek-support.patch
0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
0054-mtd-spi-nor-w25q256-respect-default-mode.patch
0069-awake-rt305x-dwc2-controller.patch
0070-weak_reordering.patch
0090-ethernet.patch
0098-disable_cm.patch
0099-pci-mt7620.patch
0100-prom_fixes.patch
0200-linkit_bootstrap.patch
100-mt7621-core-detect-hack.patch
101-mt7621-timer.patch
110-mt7621-perfctr-fix.patch
302-spi-nor-add-gd25q512.patch
303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch
997-ralink-wifi-drop-fix.patch
998-mt7621-needs-jiffies.patch
999-fix-pci-init-mt7620.patch

I don't think module will be helpfull but here it is.

@openwrt-bot
Copy link
Author

misterti:

Thanks,
but i believe rt2800lib.ko is not correct, rt2x00lib.ko should be correct.

As much as i read about the overlay filesystem in openwrt, it should be possible to replace a file from /rom

@openwrt-bot
Copy link
Author

y.salnikov:

Maybe so, but kernel version in prebuild image differ from my 4.14.93.

@openwrt-bot
Copy link
Author

misterti:

Yea, it didn't work, kernel panicked. Can you please send me the image instead? I had to unbrick it, so i'm starting from scratch anyway. Maybe a link if it's too big for attachment? Thanks

@openwrt-bot
Copy link
Author

y.salnikov:

You know that we have different routers with different SoCs, right?
I built image for ASUS RT-N56U. Image doesn't contain LuCi, you need to ssh in and install manually. I think mods will not like this conversation.
https://www.dropbox.com/sh/ioqav5idinqbpw8/AACcY9FrhPg99b3DG6qMD6XZa?dl=0

@openwrt-bot
Copy link
Author

misterti:

So that's the reason why kernel panicked :))) This fact completely slipped past me. Anyways, your built image for my router is working. Let's see if wifi holds, i'll report back.
Thanks a bunch

@openwrt-bot
Copy link
Author

y.salnikov:

Well, bad news. Interface just hangs with exactly same messages. Maybe i need change printk level?

root@OpenWrt:~# cat /proc/sys/kernel/printk
7 4 1 7

@openwrt-bot
Copy link
Author

misterti:

Same for me, i see the same messages in kernel log when wifi drops, it happens in a few minutes of high speed download. Are you sure that the patch was integrated correctly into the build?
I also tried to go back to 17.01.6 and wifi didn't drop, at least as long as i was testing it, like 10 minutes. But all sorts of wifi errors in the log.
I am now also having a problem installing certain modules, like ppp-mod-pptp. Online opkg repository for 18.06-SNAPSHOT is built for kernel 4.14.94, while the build you made for me has kernel 4.14.93. That's weird. But wifi was the fastest on this snapshot build. It went to 9mb/s stable speed, while on previous versions, it went only to 6.5mb/s unstable speed (my line is 100mbit)

@openwrt-bot
Copy link
Author

y.salnikov:

Looks like it use kernel that was built first time. Strange, i am sure i ran make distclean command before build every time.

@openwrt-bot
Copy link
Author

y.salnikov:

Redownload all build system. I slightly change message string in the patch to make sure that the patch is applying. In source code all ok, but when i grep rt2x00lib.ko it show original string.

@openwrt-bot
Copy link
Author

misterti:

I decided to give it a try and i succeeded. I am now at 4.14.95. You need to copy the patch to "package/kernel/mac80211/patches/rt2x00/", then it works. You'll also find patches 701-705 to remove in that folder. Name the patch 777-.patch. After the build is done, the .ko file should not contain the string anymore, because release version removes the dbg prints.
I tested a few large files download and it didn't crash, yet, speed went up to 9mb/s stable

@openwrt-bot
Copy link
Author

y.salnikov:

Thanks.

@openwrt-bot
Copy link
Author

misterti:

This is still not fixed on my router. The patch to remove the error message did not fix the issue. It still happens, but not as often as it did before the error message patch. There must be an unattended race condition in the driver, which causes the issue, and this race condition was even more prone to happen when additional time was lost by printing the error message.
I know no one will fix this, but just wanted to share.

@openwrt-bot
Copy link
Author

misterti:

ieee80211 phy1: rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0001, signal=0x010c, type=4

There are multiple lines of this message, some with different signal, like signal=0x010a,signal=0x010b

After this, no more wifi. It is still connected, but no more data. And a reconnect is not possible

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

No branches or pull requests

1 participant