After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793647 - Request periodic scans while WiFi list is open
Request periodic scans while WiFi list is open
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-20 12:40 UTC by Felipe Borges
Modified: 2018-02-21 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: Request periodic Wi-Fi scans (3.59 KB, patch)
2018-02-20 16:11 UTC, Bastien Nocera
none Details | Review
network: Request periodic Wi-Fi scans (4.36 KB, patch)
2018-02-20 16:31 UTC, Bastien Nocera
none Details | Review
network: Request periodic Wi-Fi scans (5.59 KB, patch)
2018-02-20 17:23 UTC, Bastien Nocera
committed Details | Review
wifi: Show the "Wi-Fi disabled" page if it is disabled (1.81 KB, patch)
2018-02-20 17:23 UTC, Bastien Nocera
committed Details | Review

Description Felipe Borges 2018-02-20 12:40:57 UTC
According to Bug 767918, NetworkManager wants to move the periodic scanning of networks to the clients. In doing so, we need to handle this in our side.

The refresh button introduced in Bug 789869 was an attempt which doesn't quite fit to the UX we expect, and has been therefore reverted. See 793238
Comment 1 Felipe Borges 2018-02-20 12:43:13 UTC
An interesting read on the subject https://blogs.gnome.org/dcbw/2016/05/16/networkmanager-and-wifi-scans/
Comment 2 Bastien Nocera 2018-02-20 16:11:32 UTC
Created attachment 368655 [details] [review]
network: Request periodic Wi-Fi scans

As NetworkManager from version 1.10 doesn't handle background scanning
itself, to minimise battery drain, we need to periodically request it to
scan for Wi-Fi Access Points.

We now do this request every 15 seconds, as NetworkManager-applet and
gnome-shell do.
Comment 3 Felipe Borges 2018-02-20 16:18:41 UTC
Review of attachment 368655 [details] [review]:

Looks good and works for me.

Lgtm!
Comment 4 Felipe Borges 2018-02-20 16:21:44 UTC
This way the rescan would continue even when the Wifi is off.

Should we stop it?
Comment 5 Bastien Nocera 2018-02-20 16:31:18 UTC
Created attachment 368659 [details] [review]
network: Request periodic Wi-Fi scans

As NetworkManager from version 1.10 doesn't handle background scanning
itself, to minimise battery drain, we need to periodically request it to
scan for Wi-Fi Access Points.

We now do this request every 15 seconds, as NetworkManager-applet and
gnome-shell do, and disable that periodic scan if Wi-Fi is disabled.
Comment 6 Bastien Nocera 2018-02-20 16:32:39 UTC
(In reply to Felipe Borges from comment #4)
> This way the rescan would continue even when the Wifi is off.
> 
> Should we stop it?

I've tried doing that in the attached patch. It should disable the periodic scanning when going into hotspot mode, or using the Wi-Fi toggle in the UI.

It would be great if you could test by disabling the Wi-Fi toggle in gnome-shell as well.
Comment 7 Dan Williams 2018-02-20 16:50:26 UTC
Review of attachment 368659 [details] [review]:

looks ok to me
Comment 8 Felipe Borges 2018-02-20 17:19:11 UTC
(In reply to Bastien Nocera from comment #6)
> It would be great if you could test by disabling the Wi-Fi toggle in
> gnome-shell as well.

Yes, it persists requesting scan even when the Wi-Fi is disabled in gnome-shell.
Comment 9 Bastien Nocera 2018-02-20 17:23:37 UTC
Created attachment 368672 [details] [review]
network: Request periodic Wi-Fi scans

As NetworkManager from version 1.10 doesn't handle background scanning
itself, to minimise battery drain, we need to periodically request it to
scan for Wi-Fi Access Points.

We now do this request every 15 seconds, as NetworkManager-applet and
gnome-shell do, and disable that periodic scan if Wi-Fi is disabled.
Comment 10 Bastien Nocera 2018-02-20 17:23:43 UTC
Created attachment 368673 [details] [review]
wifi: Show the "Wi-Fi disabled" page if it is disabled

Rather than an empty "Visible Networks" table.
Comment 11 Felipe Borges 2018-02-20 17:28:37 UTC
Review of attachment 368672 [details] [review]:

Nice. Now it stops polling properly.
Comment 12 Felipe Borges 2018-02-20 17:30:05 UTC
Review of attachment 368673 [details] [review]:

Sure.

Later on, after this release, we should go with Bug 793254.
Comment 13 usbkey9 2018-02-21 11:21:02 UTC
Hi guys,

Instead of periodic wifi scan, is it possible to refresh network when :
- Opening "Select Network" modal
- Every n seconds when the "Wifi settings" window is open
Please, it will do the great job without draining battery.

Best,
Comment 14 Bastien Nocera 2018-02-21 11:29:10 UTC
(In reply to usbkey9 from comment #13)
> Hi guys,
> 
> Instead of periodic wifi scan, is it possible to refresh network when :
> - Opening "Select Network" modal

There's no "Select Network" modal in the Settings.

> - Every n seconds when the "Wifi settings" window is open

This is already what it does.

> Please, it will do the great job without draining battery.
Comment 15 Bastien Nocera 2018-02-21 11:31:06 UTC
Attachment 368672 [details] pushed as 84279c4 - network: Request periodic Wi-Fi scans
Attachment 368673 [details] pushed as e047753 - wifi: Show the "Wi-Fi disabled" page if it is disabled
Comment 16 usbkey9 2018-02-21 11:36:31 UTC
Hi Bastian,

I talked about this : https://dflinux.frama.io/thebeginnershandbook/img/deb9-wifi-gnome-2.png
Comment 17 Bastien Nocera 2018-02-21 11:44:03 UTC
(In reply to usbkey9 from comment #16)
> Hi Bastian,
> 
> I talked about this :
> https://dflinux.frama.io/thebeginnershandbook/img/deb9-wifi-gnome-2.png

Yeah, not in the Settings.
Comment 18 usbkey9 2018-02-21 11:54:00 UTC
Which product is concerned ? (gnome-shell or networkManager)
Comment 19 Bastien Nocera 2018-02-21 12:07:34 UTC
(In reply to usbkey9 from comment #18)
> Which product is concerned ? (gnome-shell or networkManager)

gnome-shell, and it's already how it behaves. I'm not sure why you think it behaves any differently...
Comment 20 usbkey9 2018-02-21 12:21:33 UTC
Oh my apologizes, I think this is because there isn't indication of refreshing ...
Comment 21 usbkey9 2018-02-21 12:30:05 UTC
I can't find gnome-shell in New Bug Reporting nether access https://bugzilla.gnome.org/enter_bug.cgi?product=shell
Can you do something please
Comment 22 Felipe Borges 2018-02-21 12:32:13 UTC
(In reply to usbkey9 from comment #21)
> I can't find gnome-shell in New Bug Reporting nether access
> https://bugzilla.gnome.org/enter_bug.cgi?product=shell
> Can you do something please

GNOME Shell has moved to https://gitlab.gnome.org/GNOME/gnome-shell/issues
Comment 23 usbkey9 2018-02-21 12:34:15 UTC
Thanks Felipe