Misterious (UDP ?) packet loss in Teamspeak 3 and some games

Hi :slight_smile:

I’ve been getting some weird packet loss when using Teamspeak 3:

http://i.imgur.com/WKElV.png

There’s a constant incoming packet loss. This doesn’t cause any noticable problems but additionaly (like once every minute or so) it’ll spike to 50%+ and I won’t be able to understand other people because they sound stuttery. I also seem to get this problem in games which leads me to believe that it only happens with UDP connections, and only for incoming traffic.

Few things I tried:

  • replacing my rt71 wifi card with a rt3572 wifi card along with the official Ralink drivers - didn’t work
  • reformat; removed openSUSE 11.4 and installed 12.1 - didn’t work
  • tested the same wifi cards on Windows 7 - everything works fine there

I know for a fact that it isn’t a connection problem or a problem with the router. It seems to be something at the OS level and I can’t figure out what is causing it. It’s extremely frustrating :(.

Also:

hyperz@linux-03h0:~> netstat -su
IcmpMsg:
    InType3: 312
    InType11: 8
    OutType3: 17
Udp:
    76719 packets received
    17 packets to unknown port received.
    0 packet receive errors
    83693 packets sent
    RcvbufErrors: 0
    SndbufErrors: 0
UdpLite:
    InDatagrams: 0
    NoPorts: 0
    InErrors: 0
    OutDatagrams: 0
    RcvbufErrors: 0
    SndbufErrors: 0
IpExt:
    InNoRoutes: 0
    InTruncatedPkts: 0
    InMcastPkts: 426
    OutMcastPkts: 379
    InBcastPkts: 748
    OutBcastPkts: 0
    InOctets: 3579528948
    OutOctets: 240893327
    InMcastOctets: 72064
    OutMcastOctets: 55213
    InBcastOctets: 173926
    OutBcastOctets: 0

Any help would be much appreciated!

After a few more hours of Googling and poking around I finally found out what was causing the problem. I’m actually quite surprised this isn’t a common or well known issue since it seems this can effect a lot of KDE setups using wifi and NetworkManager.

Ok so basically the problem is that NetworkManager scans for AP’s every so often even when already connected to an AP. When a scan happens it’ll cause heavy lag and/or packet loss. This is most noticeable when watching live streams, playing games or using apps such as TS3. I fixed it by disabling NetworkManager and using ifup/iwconfig to connect to my AP. However, for some reason the Yast’s network settings would let me configure the ra0 interface (using the official Ralink drivers). So I switched to the Kernel drivers doing this:

# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 046d:c318 Logitech, Inc. Illuminated Keyboard
Bus 002 Device 004: ID 1532:0016 Razer USA, Ltd 
Bus 002 Device 005: ID 1737:0079 Linksys WUSB600N v2 Dual-Band Wireless-N Network Adapter [Ralink RT3572]
Bus 002 Device 006: ID 0b05:179c ASUSTek Computer, Inc. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
# lsmod | grep rt
rt3572sta             688376  0
iTCO_vendor_support    13718  1 iTCO_wdt
# rmmod rt3572sta
# modprobe -v rt2800usb
# echo "1737 0079" >  /sys/bus/usb/drivers/rt2800usb/new_id
# lsmod | grep rt
rt3572sta             688376  0 
rt2800usb              22684  0 
rt2800lib              54408  1 rt2800usb
crc_ccitt              12667  1 rt2800lib
rt2x00usb              20762  1 rt2800usb
rt2x00lib              54622  3 rt2800usb,rt2800lib,rt2x00usb
mac80211              332552  3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211              210368  2 rt2x00lib,mac80211
iTCO_vendor_support    13718  1 iTCO_wdt

Everything works fine now. But I’d like to know if there’s a way to prevent NetworkManager from scanning (roaming ?) in the background?

Try to enter BSSID of your access point in the NetworkManager profile. Other than that I think You would have to recompile NetworkManager with a patch in order to disable roaming.

Best regards,
Greg

I think specifying the BSSID in my profile has solved it. Thanks!

That’s great to hear :slight_smile: It does work for me as well.

Best regards,
Greg