OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Kernel
  • Assigned To No-one
  • Operating System All
  • Severity Critical
  • Priority Very Low
  • Reported Version openwrt-18.06
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 2
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Joze - 21.12.2018
Last edited by Ted Hess - 20.02.2019

FS#2018 - Wifi stops working until reboot

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.

This task has the following sub-task
ID Project Summary Priority Severity Progress
2037 OpenWrt/LEDE Project  FS#2037 - Dropping frame due to full tx queue 2  Very Low Medium
100%
Closed by  Ted Hess
20.02.2019 13:39
Reason for closing:  Fixed
psyborg commented on 21.12.2018 17:38

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

Joze commented on 25.12.2018 20:11

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

Yaroslav Salnikov commented on 07.01.2019 19:24

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

psyborg commented on 17.01.2019 23:24

try solution from comment in sub-task

Joze commented on 18.01.2019 11:08

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

psyborg commented on 18.01.2019 12:29

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

Yaroslav Salnikov commented on 18.01.2019 12:33

So, just suppressing printk is enough to fix bug?

Joze commented on 18.01.2019 13:46

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?

psyborg commented on 23.01.2019 01:15

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...

Joze commented on 23.01.2019 09:03

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

Yaroslav Salnikov commented on 25.01.2019 09:38

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

Joze commented on 25.01.2019 09:45

Great, can you share rt2x00lib.ko?

psyborg commented on 25.01.2019 11:31

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

Yaroslav Salnikov commented on 25.01.2019 13:41

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.

Joze commented on 25.01.2019 13:58

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

Yaroslav Salnikov commented on 25.01.2019 14:08

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

Joze commented on 25.01.2019 14:46

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

Yaroslav Salnikov commented on 25.01.2019 15:33

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

Joze commented on 25.01.2019 16:45

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

Yaroslav Salnikov commented on 25.01.2019 17:01

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

Joze commented on 25.01.2019 19:33

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)

Yaroslav Salnikov commented on 25.01.2019 19:50

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

Yaroslav Salnikov commented on 25.01.2019 21:39

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.

Joze commented on 26.01.2019 18:17

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-<your-patch-name>.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

Yaroslav Salnikov commented on 27.01.2019 08:29

Thanks.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing