On Wed, 2013-02-06 at 16:02 +0200, John G. wrote:
> On Wed, Feb 6, 2013 at 12:46 AM, Dan Williams <[email protected]> wrote:
> > On Tue, 2013-02-05 at 10:44 +0200, John G. wrote:
> >> Hello,
> >>
> >> I rarely use my laptop's wifi, so I enable airplane mode (aka rfkill)
> >> from gnome nm applet to disable it completely (it doesn't have a
> >> hardware switch). The problem is that after every restart this setting
> >> isn't saved. The wifi interface is still down but rfkill is not used
> >> (airplane mode is off). So I have to use the rfkill program with a
> >> startup script. Sometimes when I need wifi, I have to either disable
> >> the startup script or manually enable wifi after every restart.  This
> >> doesn't seem very practical to me. Is this intended or should I open a
> >> bug?
> >
> > There are two settings at play here; rfkill and NM on/off.  rfkill may
> > or may not be present, and may or may not be saved over restart, since
> > it's a hardware/bios thing that we can't control.
> >
> > Thus NM has a wifi on/off toggle as well, which *is* preserved over
> > restarts.  This gets toggled when you flip the switch, and NM will also
> > flip the hardware rfkill if available to ensure the radio is dead.  This
> > value should always follow what you have told NM either through the
> > applet or through "nmcli nm wifi on/off", and again, is different than
> > hardware rfkill.
> >
> > It seems like there's something we need to debug further, since the
> > value should be getting saved
> > to /var/lib/NetworkManager/NetworkManager.state.  Does that file exist
> > for you and if so, what's in it after you flip the switch?
> >
> > Dan
> >
> 
> The wifi state is properly saved in NetworkManager.state and restored
> after restart but not the software-rfkill one. All I am saying is that
> it would make sense to store the soft-rfkill state aswell and restore
> it on startup.

Right you are.  I think it does make sense to ensure the kernel rfkill
state is synced with NM state when NM starts, since the NM state is
always specified by the user.  This also keeps startup behavior
consistent with NM wireless on/off behavior after startup.

I've pushed a patch that makes this happen.

Thanks!
Dan

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to