Stop destroying network performance every time an app scans for wifi networks

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.


Solution 1:

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:

  • reddit
  • bugreports.qt.io (the official bug tracker)

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:

  • news.ycombinator.com
  • github.com
  • lostdomain.org

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