Strange behaviour - Audio dropouts, WIFI survey scan

Background:

Video playback(with audio) has always been working OK but audio playback (mp3 files) over wireless samba connection causes ‘seemingly’ random audio dropouts… I’ve read from this forum as well as other forums of similar problems other people have had. And i’ve tried every possible suggested change to remedy this but without any luck so far.

(two) Setups:

RPI2 -> HDMI to TV (RPI has wireless 2.4g connection to NAS, , USB WIFI adapter with Realtek chipset, lsmod -> 8192cu driver in use)
RPI3 -> HDMI to AVR -> TV (RPI has wireless 2.4g connection to NAS, USB WIFI adapter with Realtek chipset, lsmod -> 8192cu driver in use)

Both RPIs are running the latest OSMC April 2019 SW

Problem:

I’ve been following dmesg logs from shell (ssh connection) (dmesg -w -T)

As an example this is seen every 5 minutes:

[Thu Apr 25 21:46:04 2019] IW_SCAN_THIS_ESSID, ssid=xx, len=16
[Thu Apr 25 21:46:05 2019] survey done event(7) band:0 for wlan0
[Thu Apr 25 21:51:05 2019] IW_SCAN_THIS_ESSID, ssid=xx, len=16
[Thu Apr 25 21:51:07 2019] survey done event(6) band:0 for wlan0
[Thu Apr 25 21:56:07 2019] IW_SCAN_THIS_ESSID, ssid=xx, len=16
[Thu Apr 25 21:56:08 2019] survey done event(5) band:0 for wlan0

(similar like these: 8192cu debug messages)

But every time survey scan runs mp3 playback freezes the audio + ssh connection for about 1 second thus causing audio dropout. The same happens with both setups.

NOTE! This only happens when playing audio mp3 files (doesnt matter if paplayer or dvdplayer is used). Video files play without problems just as other users have experienced. I havent tried other audio file formats than mp3.

Is this possibly 8192cu driver problem or something with OSMC ?

There’s interesting discussion about survey lags here even its about another chipset driver (rtl8812au driver) Network lags every 2 minutes · Issue #2 · austinmarton/rtl8812au_linux · GitHub

PS. The best way to see this freezing effect is to play mp3 audio file on the background -> navigate to My OSMC -> Network -> Choose wireless

And wait… Survey messages happen more often and freezing also.

You could try to add BackgroundScanning=false to /etc/connman.conf and restart

1 Like

Thanks, survey messages are gone now and so far no audio dropouts… fingers crossed!

I also tried with another usb wifi dongle (8812au chipset, background surveys ON) and dropouts were there which makes me wonder are both 8192cu and 8812au drivers buggy or its something else ?!

Out of interest, any ideas why this change works for mp3 audio files and is not needed for video files ? In both cases its still streaming from the same NAS server using same wireless connection.

Both adapters are Realtek based.
These drivers are maintained by us (OSMC) downstream as the support from Realtek is practically non existent.

Sam

I am glad somebody is maintaining the drivers so big thumbs up to OSMC team!

Which brings me to another question, i got old Asus USB-AC55 2.4/5 dual band AC capable wifi dongle which should have mediatek mt7612au chipset (https://wikidevi.com/wiki/ASUS_USB-AC55)… to my knowledge OSMC doesnt support that out of the box… but in the future Sam would it be possible ?

Btw, 4.19 LTS kernel is supporting it i think…

I don’t have that device to test, but we will move to 4.19 for Pi soon.

0b05:17eb

Just a FYI. The wikidevi page you linked to says that the chip for the Asus AC55 is mt7612un. Have you tried plugging it into your Pi?

Sure

[Sat Apr 27 18:06:00 2019] usb 1-1.3: USB disconnect, device number 8
[Sat Apr 27 18:06:04 2019] usb 1-1.3: new high-speed USB device number 10 using dwc_otg
[Sat Apr 27 18:06:04 2019] usb 1-1.3: New USB device found, idVendor=0b05, idProduct=17eb
[Sat Apr 27 18:06:04 2019] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Sat Apr 27 18:06:04 2019] usb 1-1.3: Product: 802.11ac WLAN
[Sat Apr 27 18:06:04 2019] usb 1-1.3: Manufacturer: MediaTek Inc.
[Sat Apr 27 18:06:04 2019] usb 1-1.3: SerialNumber: 000000000

You can see if the mt7601u driver will support the dongle. Unplug the device then type:

sudo modprobe mt7601u
echo "0b05 17eb" | sudo tee "/sys/module/mt7601u/drivers/usb:mt7601u/new_id"
sudo journalctl -f

Then plug the dongle back in and see if it’s accepted. Ctrl-C stops the journalctl -f.

Apr 27 18:15:56 osmc kernel: usb 1-1.3: new high-speed USB device number 11 using dwc_otg
Apr 27 18:15:57 osmc kernel: usb 1-1.3: New USB device found, idVendor=0b05, idProduct=17eb
Apr 27 18:15:57 osmc kernel: usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 27 18:15:57 osmc kernel: usb 1-1.3: Product: 802.11ac WLAN
Apr 27 18:15:57 osmc kernel: usb 1-1.3: Manufacturer: MediaTek Inc.
Apr 27 18:15:57 osmc kernel: usb 1-1.3: SerialNumber: 000000000
Apr 27 18:15:57 osmc kernel: usb 1-1.3: reset high-speed USB device number 11 using dwc_otg
Apr 27 18:15:57 osmc kernel: mt7601u: probe of 1-1.3:1.0 failed with error -5

Worth a try. :wink:

I hope someday plug and play with this adapter… :slight_smile:

I guess this is the way to go ?

The last time I looked, there was still a problem with the OSMC kernel headers that could cause the build to fail. Also be aware that you might need to recompile the driver each time the kernel changes – and OSMC currently doesn’t mesh well with DKMS, so this will be a manual process.

Maybe wait until kernel 4.19?? :wink:

I am using 2.4g at the moment but its crowded so 5g is needed

I have other SBCs with Zyxel dual band NWD* series… They are working perfectly

I am just looking how to get this working since i got it cheap + this dongle got good reviews even its with mediatek chipset

I am not the type of waiting so… i wonder how much in trouble i might be if i try to change kernel to 4.19 now ?