Problem with RT5370 after 12.5 install

Need help with peripherals or devices?
Post Reply
Message
Author
colinabrett
Posts: 12
Joined: 2023-06-30 07:55
Has thanked: 5 times
Been thanked: 2 times

Problem with RT5370 after 12.5 install

#1 Post by colinabrett »

Hi,

Since a clean install of 12.5 bookworm, on an HP Stream laptop, I have been having problems with the RT5370 USB wifi adapter (which worked fine under 12.1). I've had this machine for a few years and it's had several Linux versions installed (CentOS, Rocky, before I converted to Debian). I've never had a problem with the RT5370.

The on-board Broadcom wifi card has never worked under any version of Linux, hence using the RT5370. I've done my research and found several links, such as:

viewtopic.php?t=75758
viewtopic.php?t=135045
viewtopic.php?f=7&t=96169
https://wiki.debian.org/rt2800usb

The problem is that any network activity (web browsing, apt updates etc) is taking a long time and, in many cases, fails or times out. Even ssh connections from my main machine to the laptop run very slowly and often lag when using the console.

Here's the basic information on my system:

Code: Select all

root@stream:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@stream:~#
root@stream:~# cat /etc/debian_version
12.5
root@stream:~#
lspci shows the Broadcom card:

Code: Select all

root@stream:~# lspci -vv
...
02:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01)
        DeviceName: Broadcom WLAN Broadcom Nami 43142 bgn 1x1 + BT 4 LE PCIe+USB NGFF 1630 MOW
        Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n
        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 19
        Region 0: Memory at 91000000 (64-bit, non-prefetchable) [size=32K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=2 PME-
        Capabilities: [58] Vendor Specific Information: Len=78 <?>
        Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [d0] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                        ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [13c v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [160 v1] Device Serial Number 00-00-a8-ff-ff-a3-44-1c
        Capabilities: [16c v1] Power Budgeting <?>
        Kernel driver in use: bcma-pci-bridge
        Kernel modules: bcma

root@stream:~#
And lsusb shows the Realtek adapter:

Code: Select all

root@stream:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0a5c:216d Broadcom Corp. BCM43142A0 Bluetooth 4.0
Bus 001 Device 002: ID 0bda:57c4 Realtek Semiconductor Corp. HP Truevision HD
Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@stream:~#
iwconfig shows the adapter is connected to the correct SSID and ip addr also displays correctly:

Code: Select all

root@stream:~# iwconfig
lo        no wireless extensions.

wlx1cbfcee4aa40  IEEE 802.11  ESSID:"my_router_goes_here"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 34:8A:AE:70:B3:E0
          Bit Rate=52 Mb/s   Tx-Power=20 dBm
          Retry short  long limit:2   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=67/70  Signal level=-43 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:5112  Invalid misc:15204   Missed beacon:0

root@stream:~#

root@stream:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: wlx1cbfcee4aa40: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 1c:bf:ce:e4:aa:40 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.84/24 brd 192.168.1.255 scope global dynamic noprefixroute wlx1cbfcee4aa40
       valid_lft 86381sec preferred_lft 86381sec
    inet6 fe80::c8f2:2647:5ea:293f/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
root@stream:~#
Now we get into areas I'm not 100% sure about. From various threads (including those above) I see:

Code: Select all

root@stream:~# modinfo rt2800usb | grep 5370
alias:          usb:v148Fp5370d*dc*dsc*dp*ic*isc*ip*in*
root@stream:~#

root@stream:~# apt-get update && apt-get install firmware-ralink
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://brave-browser-apt-release.s3.brave.com stable InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'firmware-misc-nonfree' instead of 'firmware-ralink'
firmware-misc-nonfree is already the newest version (20230210-5).
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
root@stream:~#
Trying to install the Brave browser with apt, I get:

Code: Select all

root@stream:~# date ; apt install brave-browser ; date
Tue 14 May 07:40:23 BST 2024
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  brave-keyring fonts-liberation libu2f-udev
The following NEW packages will be installed:
  brave-browser brave-keyring fonts-liberation libu2f-udev
0 upgraded, 4 newly installed, 0 to remove and 39 not upgraded.
Need to get 117 MB of archives.
After this operation, 370 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://deb.debian.org/debian bookworm/main amd64 fonts-liberation all 1:1.07.4-11 [828 kB]
Get:2 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-keyring all 1.16 [7,664 B]
Get:3 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-browser amd64 1.65.132 [116 MB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 libu2f-udev all 1.1.10-3 [6,300 B]
Ign:3 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-browser amd64 1.65.132
Get:3 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-browser amd64 1.65.132 [116 MB]
16% [3 brave-browser 440 kB/116 MB 0%]                                                                       18.8 kB/s 1h 42min 39s
Ign:3 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-browser amd64 1.65.132
Get:3 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-browser amd64 1.65.132 [116 MB]
Ign:3 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-browser amd64 1.65.132
Get:3 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-browser amd64 1.65.132 [116 MB]
Err:3 https://brave-browser-apt-release.s3.brave.com stable/main amd64 brave-browser amd64 1.65.132
  Connection timed out [IP: 108.156.46.28 443]
Fetched 842 kB in 36min 8s (388 B/s)
E: Failed to fetch https://brave-browser-apt-release.s3.brave.com/pool/main/b/brave-browser/brave-browser_1.65.132_amd64.deb  Connection timed out [IP: 108.156.46.28 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Tue 14 May 08:18:31 BST 2024
root@stream:~#
Note here that it took nearly 40 minutes to reach this fail-point. Not very good, I'm sure you'll all agree.

I'm seeing lots of messages like these in journalctl:

Code: Select all

root@stream:~# journalctl -f -g wlx
May 14 07:24:11 stream wpa_supplicant[563]: wlx1cbfcee4aa40: CTRL-EVENT-BEACON-LOSS

May 14 07:27:55 stream wpa_supplicant[563]: wlx1cbfcee4aa40: CTRL-EVENT-BEACON-LOSS
May 14 07:27:56 stream wpa_supplicant[563]: wlx1cbfcee4aa40: CTRL-EVENT-BEACON-LOSS
So I guess my questions are:

1) How do I get the RT5370 working?
2) Is it possible to get the Broadcom card working?
3) I note from earlier threads that it might be possible to use the "compat-drivers backport from the kernel team" (though the post goes back to 2012 for a much older Debian version). Is this still a possible workaround?
4) Why would the RT5370 work under 12.1 but cause problems in 12.5? I assume drivers and kernel modules changed between point releases.

Many thanks if you've read this far. Please let me know if there's any further information you need to help solving this issue.

Kind Regards,
Colin

Aki
Global Moderator
Global Moderator
Posts: 3890
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 107 times
Been thanked: 513 times

Re: Problem with RT5370 after 12.5 install

#2 Post by Aki »

Moved to "Hardware" sub-forum.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

colinabrett
Posts: 12
Joined: 2023-06-30 07:55
Has thanked: 5 times
Been thanked: 2 times

Re: Problem with RT5370 after 12.5 install

#3 Post by colinabrett »

Quick update:

I was mistaken saying the RT5370 worked under different Linux distros. As described here:

https://forums.centos.org/viewtopic.php ... 9342f25e1a

It had problems under CentOS 7, which were (partially) fixed by a full CentOS 8 install. I can't find how (or even if) this got sorted out.

Now, this is a purely anecdotal story but it relates to the above link. I use an old Android Galaxy S7 phone to stream radio through an app. It normally works fine but when I try something like

Code: Select all

apt update && apt upgrade
the radio starts cutting out for a few seconds, eventually reconnecting, and lots of CTRL-EVENT-BEACON-LOSS messages appear in journalctl. When the

Code: Select all

apt
command fails, the radio app starts working properly.

The only thing I can see that the two devices (the stream laptop and the Android phone) have in common is they're both on the 2.4GHz wireless band. Devices on the 5GHz band (like newer Android phones and the laptop I'm using to type this message) are unaffected.

Does this help narrow down the problem?

mmortal03
Posts: 4
Joined: 2023-07-03 06:14

Re: Problem with RT5370 after 12.5 install

#4 Post by mmortal03 »

@colinabrett , did you end up figuring it out? I happen to be testing out one of these RT5370 USB Wi-Fi adapters on Debian 12.6, and it works with the rt2800usb firmware, but my impression is that my download/upload speeds are slow for a 2.4GHz Wireless 150N connection. Maybe I just don't have a good point of reference for these USB 2.0 Wireless 150N adapters' bandwidth, but I tried it on two machines, and I was maxing out at about 30Mbps on the faster of the two machines. That's actually less than half the speed that I'm getting with an old 802.11g to Ethernet (bridge) adapter that I plugged into the same machine for comparison.
What kind of speeds were you getting? Is the rt2800usb implementation just not optimal with these things?

Post Reply