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 770456 - NetworkManager 1.4.0-1 breaks wifi
NetworkManager 1.4.0-1 breaks wifi
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: Wi-Fi
1.4.x
Other Linux
: Normal major
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
: 770505 770577 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-08-26 21:30 UTC by Phil Reilly
Modified: 2016-09-23 20:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log file with trace on (54.53 KB, text/x-log)
2016-08-26 23:43 UTC, Phil Reilly
Details
Second Log file with trace really on (255.32 KB, text/x-log)
2016-08-27 21:14 UTC, Phil Reilly
Details
output dmesg + journalctl (74.56 KB, text/plain)
2016-08-29 11:57 UTC, Alessio Tomelleri
Details
journalctl networkmanager (380.79 KB, text/plain)
2016-08-29 14:22 UTC, Alessio Tomelleri
Details

Description Phil Reilly 2016-08-26 21:30:48 UTC
networkmanager 1.4.0-1(1.2.5dev+5+g99e34d7-1) testing this package disables my wifi on a macbook.

error msg on startup is: [ 21.950639] ERROR @wlcfg80211scan : WLC_SCAN error (-22)

installing previous package from pacman cache fixes this. Note that the new libnm-glib does NOT break the wifi just the new networkmanager package.

Running Apricity stable on macbook
Comment 1 Thomas Haller 2016-08-26 22:04:41 UTC
this line is not printed by NetworkManager.

Please attach full logfiles with debug logging enabled. You do that by configuring level=TRACE in NetworkManager.conf and restart NM.

thank you.
Comment 2 Phil Reilly 2016-08-26 22:58:29 UTC
What's the name of the log files after enabling trace & restarting?
Comment 3 Thomas Haller 2016-08-26 23:23:21 UTC
NetworkManager logs to syslog, so it depends on your configuration.

With systemd-journal, it is `journalctl -u NetworkManager`. Otherwise, probably somewhere in /var/log.
Comment 4 Phil Reilly 2016-08-26 23:43:28 UTC
Created attachment 334255 [details]
log file with trace on

Here it is...as Homer Simpson once said "Nothin's easy!"
Comment 5 Phil Reilly 2016-08-27 00:22:42 UTC
..for the record the log file was created with "journalctl -u NetworkManager > networkmanager.log"
Comment 6 Phil Reilly 2016-08-27 00:45:34 UTC
...I was trying to get the Hotspot feature to work but it was acting badly. Is this the package responsible for this feature?
Comment 7 Thomas Haller 2016-08-27 09:50:20 UTC
(In reply to Phil Reilly from comment #6)
> ...I was trying to get the Hotspot feature to work but it was acting badly.
> Is this the package responsible for this feature?

yes, please open a separate BZ for that and provide logfiles. Thanks

Be aware, that you need dnsmasq package installed (for which NetworkManager's package usually doesn't have a dependency, because it's optional).
Comment 8 Phil Reilly 2016-08-27 20:44:09 UTC
Does this issue need more information from me?
Comment 9 Thomas Haller 2016-08-27 20:52:48 UTC
Seems you didn't actually enable TRACE level for logging.

Please edit /etc/NetworkManager/NetworkManager.conf to have:

[logging]
level=TRACE

then restart NM.



Actually, there attached logfile is full of the error:
  do-change-link[3]: failure changing link: failure 23 (Too many open files in system)
that is certainly unusual.



could you provide a logfile with debug-logging enabled? That would be helpful. Thanks!
Comment 10 Phil Reilly 2016-08-27 21:14:41 UTC
Created attachment 334288 [details]
Second Log file with trace really on

Please confirm the usefulness of this log.
Comment 11 Thomas Haller 2016-08-27 21:23:54 UTC
it's good. Thanks!
Comment 12 Phil Reilly 2016-08-27 21:25:34 UTC
You wanna see a trace of the version that works?
Comment 13 Janna Martl 2016-08-28 07:39:02 UTC
Reports here[0] suggest that this is only a problem with broadcom wl driver.

[0] https://aur.archlinux.org/packages/broadcom-wl-dkms
Comment 14 Thomas Haller 2016-08-28 11:22:51 UTC
seems, NetworkManager receives a failure from kernel to reset the MAC address (although actually, the address does change).



With 1.4.0, during Wi-Fi scanning NM tries to set the MAC address to a random address. That yields an error message from kernel, but actually the address changed.

Afterwards, when NM activates the connection, it is configured to reset the permanent MAC address. That command fails again, which causes NM to abort the activation.






You may work around that by disabling resetting the MAC address during scanning. Configure /etc/NetworkManager/NetworkManager.conf to have

  [device]
  wifi.scan-rand-mac-address=no

and issue `killall -SIGHUP NetworkManager`. 

Afterwards, the first activation attempt may still fail (because it bails out on the error to change the randomized MAC address to the permanent one). Then the second attempt should succeed.






It is a driver issue, but NM should try to workaround it.
Comment 16 Alessio Tomelleri 2016-08-28 12:33:12 UTC
Dell xps 15 9550 (2016)
Archlinux

This bug afflict me as well. And I confirm workaround 

  [device]
  wifi.scan-rand-mac-address=no

worked for me too...

In my case, I do not use broadcom-wl restricted driver (I tested trying them as solution to this problem, but after installed things went worse, I didn't see wifi device ! so disinstalled),
I'm using brcmfmac driver and apart some dmesg warning, they work until use 
NetworkManager 1.2.4 and 1.2.5.dev but if I upgrade 1.4 I fall in this bug.
Luckly, workaround is ok !
Comment 17 Phil Reilly 2016-08-28 16:54:16 UTC
[device]
wifi.scan-rand-mac-address=no



Works foe me.....
Comment 18 Janna Martl 2016-08-28 17:04:42 UTC
I rebuilt networkmanager with the patch and (even without the workaround) can confirm that this works for me.
Comment 19 Beniamino Galvani 2016-08-29 08:22:44 UTC
The patch looks sensible to me (but I would change the yoda condition to the usual form).
Comment 20 Beniamino Galvani 2016-08-29 08:28:47 UTC
(In reply to Alessio Tomelleri from comment #16)
> Dell xps 15 9550 (2016)
> Archlinux
> 
> This bug afflict me as well. And I confirm workaround 
> 
>   [device]
>   wifi.scan-rand-mac-address=no
> 
> worked for me too...
> 
> In my case, I do not use broadcom-wl restricted driver (I tested trying them
> as solution to this problem, but after installed things went worse, I didn't
> see wifi device ! so disinstalled),
> I'm using brcmfmac driver and apart some dmesg warning, they work until use 
> NetworkManager 1.2.4 and 1.2.5.dev but if I upgrade 1.4 I fall in this bug.

Looking at brcmfmac driver code it doesn't seem evident that the same error (-ENFILE) of logs in comment 10 can be returned from set_mac(). Can you please attach trace logs or if you prefer only the error (if any) that you see when NM tries to change the MAC? See comment 9 for how to capture trace logs. Thanks!
Comment 21 Thomas Haller 2016-08-29 09:43:26 UTC
patches merged upstream:

master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=091620e76592349ae3efee08faed881ce1a2495b

nm-1-4: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a3fd48545cf186a7e33aa9df8c3dd2bc016b350d


Closing BZ for now.

The logfiles from comment 10 for brcmfmac are still interesting to see!!
Comment 22 Alessio Tomelleri 2016-08-29 11:57:37 UTC
Created attachment 334358 [details]
output dmesg + journalctl

Hi Bruno,

(Comment #20)

I follow your hint, here the attachment...   dmesg + juorunalctl -u NetworkManager

Alessio
Comment 23 Thomas Haller 2016-08-29 12:31:24 UTC
(In reply to Alessio Tomelleri from comment #22)
> Created attachment 334358 [details]
> output dmesg + journalctl
> 
> Hi Bruno,
> 
> (Comment #20)
> 
> I follow your hint, here the attachment...   dmesg + juorunalctl -u
> NetworkManager
> 
> Alessio

NetworkManager's logfile doesn't show contain the relevant part. Please more context.
Comment 24 Alessio Tomelleri 2016-08-29 14:22:29 UTC
Created attachment 334376 [details]
journalctl networkmanager

Hi Hans,

Sorry... to much quick before, I hope this attachment could be more useful

Alessio
Comment 25 Thomas Haller 2016-08-29 16:41:07 UTC
This is a different issue.

fix for review:

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=th%2Fplatform-set-address-enfile-bgo770456-v2
Comment 26 Thomas Haller 2016-08-29 17:37:23 UTC
*** Bug 770505 has been marked as a duplicate of this bug. ***
Comment 27 Ben Caradoc-Davies 2016-08-29 23:20:46 UTC
The workaround in this issue works for the problem I reported in #770504 with the ath9k driver (not broadcom). Possible duplicate:
https://bugzilla.gnome.org/show_bug.cgi?id=770504
Comment 28 Beniamino Galvani 2016-08-30 08:21:03 UTC
(In reply to Thomas Haller from comment #25)
> This is a different issue.
> 
> fix for review:
> 
> https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/
> ?id=th%2Fplatform-set-address-enfile-bgo770456-v2

LGTM
Comment 30 Thomas Haller 2016-09-08 11:43:19 UTC
*** Bug 770577 has been marked as a duplicate of this bug. ***