Bug 1013332 - NetworkManager wwan radio state never shows as enabled after it has been disabled once
NetworkManager wwan radio state never shows as enabled after it has been disa...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-29 07:08 EDT by Hans de Goede
Modified: 2015-06-29 08:29 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-06-29 08:29:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hans de Goede 2013-09-29 07:08:40 EDT
My laptop has rfkill functionality for its build in wwan.

On startup "nmcli radio" properly reports:
WWAN-HW enabled
WWAN enabled

I can then soft-block it by doing either "nmcli radio wwan off" or "rfkill block wwan" after which "nmcli radio" properly reports:
WWAN-HW enabled
WWAN disabled

If I then unblock it through either of "nmcli radio wwan on" or "rfkill unblock wwan", then "nmcli radio" wrongly reports:

WWAN-HW enabled
WWAN disabled

While "rfkill list" does show the radio is no longer blocked, and actually connecting the wwan using:

nmcli c up "T-Mobile Default"

Works, even though nmcli radio reports it is disabled, and keeps reporting it as disabled after a successful nmcli c up.
Comment 1 Jirka Klimes 2013-09-30 05:30:08 EDT
What is the hardware: lspci? Would you attach 'rfkill list' output, so that we can see the modules?

You can set debug NM logging using:
$ sudo nmcli g l level DEBUG

Or just log RFKILL actions:
$ sudo nmcli g l domains RFKILL level DEBUG

(back to default: $ sudo nmcli g l domains DEFAULT level INFO)
Comment 2 Hans de Goede 2013-10-15 17:30:41 EDT
lspci:
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4)
00:1c.5 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)
0b:00.0 SD Host controller: O2 Micro, Inc. Device 8221 (rev 05)

rfkill list:
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
4: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
5: dell-wifi: Wireless LAN
        Soft blocked: no
        Hard blocked: no
6: dell-bluetooth: Bluetooth
        Soft blocked: no
        Hard blocked: no
7: dell-wwan: Wireless WAN
        Soft blocked: no
        Hard blocked: no


I've run a couple of tests with RFKILL level set to DEBUG, and I think I've figured out what is going on, here is a bit of logs:

Oct 15 21:26:00 localhost NetworkManager[679]: <debug> [1381865160.944562] [nm-rfkill-manager.c:210] recheck_killswitches(): WWAN rfkill platform switch rfkill4 state now 0/1
Oct 15 21:26:00 localhost NetworkManager[679]: <debug> [1381865160.944681] [nm-rfkill-manager.c:210] recheck_killswitches(): WiFi rfkill platform switch rfkill2 state now 1/0
Oct 15 21:26:00 localhost NetworkManager[679]: <debug> [1381865160.944759] [nm-rfkill-manager.c:210] recheck_killswitches(): WiFi rfkill switch rfkill1 state now 1/0
Oct 15 21:26:00 localhost NetworkManager[679]: <debug> [1381865160.944770] [nm-rfkill-manager.c:237] recheck_killswitches(): WWAN rfkill state now 'soft-blocked'
Oct 15 21:26:00 localhost NetworkManager[679]: <debug> [1381865160.944787] [nm-manager.c:1811] manager_rfkill_update_one_type(): WWAN hw-enabled 1 sw-enabled 0 daemon-enabled 0
Oct 15 21:26:00 localhost NetworkManager[679]: <info> WWAN now disabled by radio killswitch
Oct 15 21:26:40 localhost NetworkManager[679]: <debug> [1381865200.47021] [nm-manager.c:4644] manager_radio_user_toggled(): (WWAN): setting radio enabled by user
Oct 15 21:26:40 localhost NetworkManager[679]: <debug> [1381865200.53630] [nm-manager.c:1666] manager_update_radio_enabled(): (ttyUSB2): setting radio enabled
Oct 15 21:26:40 localhost ModemManager[633]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disabled -> enabling)
Oct 15 21:26:40 localhost ModemManager[633]: <warn>  (ttyUSB2): port attributes not fully set
Oct 15 21:26:40 localhost ModemManager[633]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> registering)
Oct 15 21:26:40 localhost ModemManager[633]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> idle)
Oct 15 21:26:40 localhost ModemManager[633]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (registering -> home)
Oct 15 21:26:40 localhost ModemManager[633]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (home -> idle)
Oct 15 21:26:41 localhost ModemManager[633]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> enabled)
Oct 15 21:26:41 localhost NetworkManager[679]: <info> WWAN now enabled by management service
Oct 15 21:26:41 localhost NetworkManager[679]: <debug> [1381865201.168452] [nm-manager.c:1811] manager_rfkill_update_one_type(): WWAN hw-enabled 1 sw-enabled 0 daemon-enabled 1

It seems that NetworkManager / ModemManager reads but never sets the rfkill software block for wwan, so once I've done a "rfkill block wwan"  the output of "nmcli radio" will always report:

WIFI-HW  WIFI     WWAN-HW  WWAN     
enabled  enabled  enabled  disabled

If I do rfkill unblock wwan, then "nmcli radio wwan on / off" does toggle the WWAN disabled state.

So it seems that the problem is that "nmcli radio wwan" only reads and never writes the rfkill software block state for wwan. This means that if the wwan rfkill has been software blocked NetworkManager is unable to unblock it, so the user has to resort to the cmdline.

This is also inconsistent compared to the "nmcli radio wifi" behavior which does control rfkill (both blocking on off and unblocking on on).
Comment 3 Dan Williams 2013-10-15 18:36:09 EDT
There are some inconsistencies with WWAN enable handling, because there are more levels of 'enable' with WWAN than with eg WiFi or Bluetooth.

I started a branch a long time ago (dcbw/wwan-fixes) to start addressing these problems, including toggling kernel WWAN rfkill state when appropriate.

I think at least the first two commits in that branch would be appropriate, I could re-test them and propose them for merge.

Jirka, can you do a quick review of those first two commits in that branch and see what you think?
Comment 4 Fedora End Of Life 2015-05-29 05:28:46 EDT
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 5 Fedora End Of Life 2015-06-29 08:29:35 EDT
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.