neurobin / MT7630E

Modified easy installation package
https://neurobin.org/projects/softwares/unix/MT7630E/
232 stars 70 forks source link

Failed to flush queue #11

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi, after installing this driver, everything looked working well, but after few hours, the wifi disconnected and dmesg is full of these errors:

ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue 0 ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 0 failed to flush ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 2 failed to flush

And since the first lost connection I can't get it to connect again. Restarting system works just for few minutes, then it gets again into these errors. I don't even know where to look for further information about this.

neurobin commented 8 years ago

Your kernel version..? And also the output of these commands:

lspci -vv |grep -i -A 9 wireless
lsusb |grep -i mediatek
ghost commented 8 years ago

4.2.8 (-300.fc23)

lspci -vv |grep -i -A 9 wireless

03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter
        Subsystem: Foxconn International, Inc. Device e074
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 17
        Region 0: Memory at f7900000 (32-bit, non-prefetchable) [size=1M]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
pcilib: sysfs_read_vpd: read failed: Connection timed out

lsusb |grep -i mediatek

Bus 003 Device 005: ID 0e8d:763f MediaTek Inc.
J08nY commented 8 years ago

Confirming this bug causes connection failure and the inability to reconnect(or send any tx frames probably) until the mt7630e module is removed and inserted again. I found that this suppresses the problem for a while:

nmcli radio wifi off
rmmod mt7630e
modprobe mt7630e
nmcli radio wifi on

dmesg:

[16755.465432] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 0 failed to flush
[16755.625434] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 0 failed to flush
[16755.661500] ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue 0
[16756.845361] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 0 failed to flush

uname -srv: Linux 4.4.0-kali1-amd64 #1 SMP Debian 4.4.2-3kali1 (2016-02-23)

lspci -vv |grep -i -A 9 wireless:

03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter
    Subsystem: Foxconn International, Inc. MT7630e 802.11bgn Wireless Network Adapter
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 17
    Region 0: Memory at f7900000 (32-bit, non-prefetchable) [size=1M]
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
pcilib: sysfs_read_vpd: read failed: Connection timed out

lsusb | grep -i mediatek: Bus 001 Device 005: ID 0e8d:763f MediaTek Inc.

I installed the latest 2.0.3a-1 github version using dkms.

neurobin commented 8 years ago

@J08nY Thanks for testing it. Though I don't recommend using the alpha branches for normal uses, those are only for testing. For normal uses, always use the release branch.:D

J08nY commented 8 years ago

I used the release branch, same bug, I only installed the alpha version to try to fix it.

J08nY commented 8 years ago

It appears that the frequency of this issue is somehow related to signal strength, If I have a really good signal I might go hours without being disconnected, however if I have poor signal it might be minutes.

echo-devim commented 8 years ago

I also have this error many times, but my wifi never disconnect. A workaround could be try to disable the power managment: sudo iwconfig wlan0 power off where wlan0 is the name of your wifi (check with ifconfig or ip link)

ghost commented 8 years ago

It appears that the frequency of this issue is somehow related to signal strength, If I have a really good signal I might go hours without being disconnected, however if I have poor signal it might be minutes.

@J08nY I wouldn't say so, I have my laptop like 3 metres far from a wifi router, so the signal strength is really high, but the connection is lost anyway very quickly.

I also have this error many times, but my wifi never disconnect. A workaround could be try to disable the power managment: sudo iwconfig wlan0 power off

@echo-devim Tried this with no success at all. Reloading the module mt7630e on the other hand happens to work a bit more.

Also, since my first comment, I've upgraded kernel to 4.4.4-301.fc23 and tried both 2.0.3a-1 and master branches.

When I look into log using journalctl on the line when NetworkManager disconnects, it says:

<warn> Connection disconnected (reason -4)

According to NetworkManager.h this means NM_DEVICE_STATE_REASON_CONFIG_FAILED

Then it tries to reconnect:

<warn>  (wlp3s0f0): link timed out.
<info>  (wlp3s0f0): device state change: activated -> failed (reason 'ssid-not-found') [100 120 53]
psiphi75 commented 8 years ago

I get the same issue. I have tried both master and 2.0.3a-1, on both Debian and Ubuntu. Below are the details for my Ubuntu laptop.

sudo lspci -vv |grep -i -A 9 wireless:

03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter
    DeviceName: WLAN
    Subsystem: Hewlett-Packard Company MT7630e 802.11bgn Wireless Network Adapter
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 18
    Region 0: Memory at d0600000 (32-bit, non-prefetchable) [size=1M]
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+

lsusb |grep -i mediatek:

Bus 003 Device 019: ID 0e8d:763f MediaTek Inc. 

uname -a:

Linux hp 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
psiphi75 commented 8 years ago

Still getting the same issue with v2.0.6.

Cheers, Simon

jayvdb commented 8 years ago

I also have roughly this problem, only at office but not home. I can get it working by turning off wifi, and using rmmod/modprobe, but if I try that two times it brings down the system.

J08nY commented 8 years ago

Yep, same for me. I have a script that disconnects using NetworkManager, then turns off the wifi, then rmmod -> sleep 1 -> modprobe and turns the wifi back on. However this seems to freeze up the whole system once every few tries. It freezes on/after modprobe mt7630e.

2016-09-21 14:47 GMT+02:00 John Vandenberg notifications@github.com:

I also have roughly this problem, only at office but not home. I can get it working by turning off wifi, and using rmmod/modprobe, but if I try that two times it brings down the system.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/neurobin/MT7630E/issues/11#issuecomment-248601777, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPJVj1UHiGbWH_2AFOK1P-FtMWnVTmmks5qsSd0gaJpZM4G8hOC .

J08nY commented 7 years ago

Just upgraded kernel to 4.7.0 and driver to 2.0.8 (commit d5023e72da59e02c8279d7ccd5f8c430f8163b03) and I seem to get far less errors. It might be just freak coincidence since I had the driver error after upgrading but currently been on wifi for hours and no error, no disconnect (note that this is indeed very unusual, before upgrade I could get maybe half an hour of basic usage until disconnect). I recommend updating (both kernel and driver) and trying it out.

jayvdb commented 7 years ago

@J08nY , is it still working well for you?

J08nY commented 7 years ago

@jayvdb Hmm, tested it some more and seems I was just lucky that day. Issue is not solved on 4.7.0 kernel and 2.0.8 driver.

michielkalle commented 7 years ago

I have the same problem,

uname -r

Kernel: 4.4.0-59-generic

sudo lspci -vv |grep -i -A 9 wireless:

03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter
    Subsystem: Foxconn International, Inc. MT7630e 802.11bgn Wireless Network Adapter
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- 
    Kernel driver in use: mt7630e
    Kernel modules: mt7630e

lsusb |grep -i mediatek:

Bus 002 Device 006: ID 0e8d:763f MediaTek Inc.
ghost commented 7 years ago

There is a similar issue here with a kickstarter campaign to resolve it. Maybe this will help.

adanski commented 7 years ago

There seems to be some progress on the issue linked by @horacekmi: https://github.com/lede-project/source/commit/9eacb9d7fc0b4c921f8d2ec91a51f10d8c3ae12f