Skip to content

Draft: wifi: Consider TimeThreshold when scheduling next scan

Teemu Ikonen requested to merge tpikonen/geoclue:wifi-threshold into master

I noticed that the 'gnome-color-panel' client from gnome-settings-daemon was making GeoClue run continuous (well, every 300 s) wifi scans.

The client code is in gsd-night-light plugin. It sets up a GeoClueSimple client and sets the 'time-threshold' property to 3600 s, which is a legit use of GeoClue. GeoClue does not take the the threshold into account, however, but schedules wifi scans with the minimum timeout selected for the requested accuracy level (WIFI_SCAN_TIMEOUT_LOW_ACCURACY in this case).

The unnecessary scans result in extra energy consumption and needless use of Mozilla Location Services. Letting MLS know the location of a device every 300 s also has privacy implications.

Change the wifi scan scheduling code to only schedule scans with the interval they are requested by the client, if this interval is larger than the minimum timeout.

Edited by Teemu Ikonen

Merge request reports