13

While trying to debug poor video chat quality, I noticed that certain apps cause periodic ping latency spikes even while pinging my router.

I tracked the problem down to the fact that the apps (e.g. Genymotion, qbittorrent) seem to be scanning for wifi networks every few seconds. (When I turned on debug wifi logging, I kept seeing lines like Info: <airportd[74491]> SCAN request received from pid 76811 (genymotion) with priority 0 that correlated with the latency spikes.)

Is there any way for me to stop this from happening? It basically means I can't run Genymotion and have a video call at the same time because it'll stutter every 10-15 seconds.

10
  • Did you try monitoring the airportd process (its memory)? Maybe restart the computer or kill airportd?
    – Labo
    Jan 13, 2018 at 22:07
  • The problem happens whenever airportd scans for new networks--turns out the "misbehaving" apps were polling for open wifi networks every few seconds (I just edited the question based on this). But I don't see anything useful in the activity monitor; airportd is hovering around 20.6mb used. The problem persists across restarts too.
    – Ben Kuhn
    Jan 14, 2018 at 16:02
  • I'm glad my intuition about airportd was right :) I did a bit of googling, and it seems somebody experienced the same problem with qbittorrent. It seems to come from Qt.
    – Labo
    Jan 14, 2018 at 18:55
  • The ticket already exists on the Qt tracker: bugreports.qt.io/browse/…
    – Labo
    Jan 14, 2018 at 19:00
  • I found news.ycombinator.com/item?id=14816448. Could you try to "Set the QT_BEARER_POLL_TIMEOUT environment variable to -1"? It seems to be a well known problem: the solution for window is described here as well but the code on this article makes me think it will work on OSX too :)
    – Labo
    Jan 14, 2018 at 19:01

1 Answer 1

6
+50

Why this happens

It comes from the GUI library Qt that is used in both programs. Several people experienced the same thing and report it:

How to solve it for the newest versions of Qt

Set the environment variable QT_BEARER_POLL_TIMEOUT to -1.

QT_BEARER_POLL_TIMEOUT=-1 open -a qbittorrent

The problem also happens on Windows, it is solved similarly:

set QT_BEARER_POLL_TIMEOUT=-1
qbittorrent.exe

References:

How to solve it for Genymotion

Genymotion currently uses of Qt version 5.4.2 that doesn't support QT_BEARER_POLL_TIMEOUT.

@Ben Kuhn contacted the support and the solution is to launch this command:

rm /Applications/Genymotion.app/Contents/{,MacOS/player.app/Con‌​tents}/PlugIns/beare‌​r/libq{corewlan,gene‌​ric}bearer.dylib

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .