I'm trying to connect to my local Wi-Fi network. Network manager fails while wicd succeeds. I can live with this, as I'll receive a cable in a few days anyway, but I would like to understand and perhaps help fixing Network manager by providing a useful bug report.

Hardware

The computer is a desktop (it makes no difference except from a practical perspective : I can't move it around for the tests). Debian Stretch. Same behavior on another Debian Stretch desktop.

During Wi-Fi scanning, NetworkManager resets the MAC address frequently to a randomly generated address. This was already enabled by default in 1.2.0, but as said, users likely didn’t have the required support from wpa_supplicant.

This default behavior can be disabled with a global configuration option in NetworkManager.conf:

I have one of these just plugged it in to a new stretch box, it works fine. In fact, Network Mangler has been pretty reliable for five days now so I'm okay. Sometimes it used to be a pain, but it seems to be a lot nicer now. It is still a little slow I guess, I'll probably stop using it on the desktop, but for a mobile notebook it does a good job.

If you can't get along with NM, I really recommend trying wpa_cli. It is installed along with wpa_supplicant so you can use it anytime. Then if you grok that way of doing things, it has a wpa_gui to go with it.

In that case you don't need either Network-manager or Wicd. They are only needed if you are moving around a lot. Add a few lines to /etc/network/interfaces as shown here. Scroll down to the wpa_supplicant section.

I'm not really looking for a workaround. (Because I moved to fiber and until I get that fiber cable, the modem is far away from the computer) I'd like to use Wi-Fi for a few days. I managed to get it to work using wicd so it'll do the job. Then back to RJ45.

Now pretend I'm a beginner using my brand hew Debian Stretch / Mate installation. I need Wi-Fi, I plug the dongle in, try to connect... nothing. Same with all dongles. Let me ask my power user partner. He opens that scary terminal and modifies a few files and it works. Well, I don't have that nice network applet in the panel anymore but it seems to work. Oh well. Linux is so complicated. But at least it works. This is pretty much what my partner must be thingking and this is what I'd like to avoid.

This is why I would like to

- understand what is wrong (isn't this what we're all here for ?)

- if a parameter is wrong in my NM config, or even my AP config, set it right and maybe document it somewhere or suggest a better error message

- if there is a bug in NM, signal it to the devs

In other words, I'm not concerned about my own case for the next days to come. I'd like to have it working out of the box for anyone.

(I'd wouldn't like to argue about the choice of Debian Stable for beginners. Besides the same probably also applies to other distros anyway.)

I have one of these just plugged it in to a new stretch box, it works fine. In fact, Network Mangler has been pretty reliable for five days now so I'm okay. Sometimes it used to be a pain, but it seems to be a lot nicer now.

Interesting. So it could be something specific to my installation. Weird because the install is recent and I'm pretty sure I didn't mess up with config files.

Now pretend I'm a beginner using my brand hew Debian Stretch / Mate installation. I need Wi-Fi, I plug the dongle in, try to connect... nothing. Same with all dongles. Let me ask my power user partner. He opens that scary terminal and modifies a few files and it works. Well, I don't have that nice network applet in the panel anymore but it seems to work. Oh well. Linux is so complicated. But at least it works. This is pretty much what my partner must be thingking and this is what I'd like to avoid.

IMHO, the goal of most Open Source operating systems is not to compete with commercial OS's like Windows and OS/X. Open Source projects are viable when they recruit developers and funding for the projects those developers undertake. Key to this is educating new users as to how something like wifi works. Compare Debian's wifi howto use page, referenced above, to a Windows 10 screenshot that says "Click here".

I had done that before, but I guess I screwed up because this time, it did help.

This is known issue. Responsability would be either Network manager or Debian, I can't really tell. I guess there's a tradeoff, here, since having random MAC address is meant to improve security, but on the other hand, it prevents connexion for a lot of users.

Since the connexion was not totally reliable, I did a few things:

- upgraded network-manager to 1.10- removed non-free firmware-realtek to use kernel driver- upgraded to kernel 4.13 to hopefully get a more recent driver version (I see mentions of rtl8192 in the changelog)

This is known issue. Responsability would be either Network manager or Debian, I can't really tell. I guess there's a tradeoff, here, since having random MAC address is meant to improve security, but on the other hand, it prevents connexion for a lot of users

I think it is a little more complex. Some of the more open hardware (Atheros) does well with random MAC. Realtek is not that open and in general, does not do well with random MAC.

- upgraded network-manager to 1.10- removed non-free firmware-realtek to use kernel driver- upgraded to kernel 4.13 to hopefully get a more recent driver version (I see mentions of rtl8192 in the changelog)

Can't tell which of those did the trick, but it seems reliable now.

That's good, all that sounds reasonable but I thought nm was up around 1.6 in stable.

I believe my issue is solved. Besides, I got a cable so I won't be using Wi-Fi anymore.

I think some of my former tests might have been broken because I screwed up and let wicd and network-manger run at the same time. Not 100% sure.

I wouldn't like to leave wrong or misleading information to users with similar issues, so here is an updated status after a few tests.

Updating latest Network-manager makes no difference. I downgraded to 1.6.2 and it works fine.

My connection was not totally reliable. It would work but when deconnecting/reconnecting (for the sake of testing), at some point, it would just stop connecting (only tested on Edimax nano USB EW-7811Un) until I unplug the dongle then plug it back. I reinstalled the non-free firmwares (firmware-realtek) and it seems totally reliable now. I don't mind the performance that much, but I expect a reliable connection. It would take more tests to be absolutely certain that this is a proprietary vs. free firmware issue. I also have firmware-ralink installed. It provides rt2870.bin for the Cisco and D-Link dongles. I did not try those dongles without the proprietary firmwares.

Kernel 4.9 vs. 4.13 does not seem to make a difference. AFAIU, a newer kernel would bring a more recent firmware version, but since I'm using the proprietary firmware, this does not matter. Yet, I did my final tests on 4.13.

No need to modify AP settings (I tried to set it to 802.11b/g instead of 802.11b/g/n but it made no difference).

Bottom line : using kernel 4.13, network-manager 16.2 with random MAC address disabled, and proprietary firmwares, all dongles work reliably.

I did manage to get rand-scan working on my broadcom, but still haven't figure out any realtek devices. The broadcom hates it when you try to replacee the first adddress, so the mask FE:00:00:00:00:00 was the trick.