There鈥檚 networking.wireless
maintained by globin
.
Then there鈥檚 networking.supplicant
, maintained by nobody and changed by @ts468 @groxxda.
What is the reason for that duplication?
Huh, never noticed. It appears the supplicant module was introduced in c6b2365e9a3f95e2665f8c518781bc007aa055f8, with no motivation as to why we need another module for the same service. I would say get rid of it.
I tried both, both are kind of buggy, but the supplicant
module is more advanced it feels.
e.g. supplicant
doesn鈥檛 restart wpa_supplicant after suspend, but it does handle the configure file better.
Supplicant isn't for wireless only. It can e.g. also be used to authenticate with 802.1x capable switches.
There has been some discussion about that issue already, and ideally they should be merged, see https://github.com/NixOS/nixpkgs/issues/19029#issuecomment-250248088.
I'll try and merge them next week.
@globin Let me know if I can help. I already had a brief look at it [1], but I'm not so sure how to handle the reported issue that wpa_supplicant does not restart on resume. On the one hand I'd like to keep the per-device activation, and therefore I think udev is the right tool, on the other hand your solution from wpa_supplicant.nix seems to work more reliably at the moment. As I said, let me know, I'm very happy to help.
The interesting part will probably be what the new api should be and how to handle deprecation.
I'm wondering if systemd 233 [1] has an effect on the resume after suspend issue we're seeing with supplicant:
@globin As I'm responsible for the duplication of wpa_supplicant, please let me know how I can help resolving that blocker.
Yeah, I'm not really sure how to merge these modules properly.. I don't like breaking backward compatibility in networking.wireless
so that merging the modules isn't easy. I'd personally prefer removing supplicant
in 17.03 and having the missing options from supplicant
merged into networking.wireless
for 17.09.
@ts468 what do you think?
So how the udev
rules in supplicant
_should_ work is by firing on the first match:
What if we put the configuration option for the per-device supplicant under networking.interfaces.<name?>.supplicant
, and the configuration option for the group of WLAN devices under networking.wireless
?
That way we could keep the per-device configuration option, could have a clear deprecation strategy for the current networking.supplicant.<name?>
configuration options from supplicant
, and keep the networking.wireless
configuration option for setting the default configuration for all wireless interfaces?
The reason I'm hesitating a bit is because there seems to be an unresolved issue with supplicants that are configured in supplicant
not restarting properly after a suspend-resume cycle. So if we want to settle for the udev-based approach, then we would have to debug that problem properly!
@globin What do you think?
there seems to be an unresolved issue with supplicants that are configured in supplicant not restarting properly after a suspend-resume cycle
Can confirm.
Have to execute sudo systemctl restart supplicant-wlp3s0.service
after every wakeup from standby.
@Profpatsch, in that case, could you maybe help me debugging it, please?
What _should_ happen is that:
<device>
should be removed (by some logic); however, udev
should not remove the supplicant-<device>.service
directly, there is no udev
rule for REMOVE
.supplicant-<device>.service
BindsTo
the ...-<device>.device
, and so the supplicant-<device>.service
should be killed by systemd
.udev
should ask systemd
to bring up the supplicant-<device>.service
as it adds a Wants
from the ...-<device>.device
to the supplicant-<device>.service
; that is what the udev
ADD
rule is for.Now, obviously something goes wrong somewhere. Could you maybe help me figuring out what it could be?
My first guess would be that somehow 2. and 3. are not executed in strict order. Could you maybe play around with adding something like a udev
REMOVE
rule with RUN=systemctl stop supplicant-<device>.service
? Or, powerManagement.resumeCommands = systemctl try-restart supplicant-<device>.service
? At least that's what seems to work in the wpa_supplicant.nix
module. Or or course anything else that you might think of! ;)
Your help would be highly appreciated!
@globin Should we try to tackle this one? Could you maybe comment on my suggestion from above? It will be a rush implementing it anyways, but just to have a few more days ;)
@Profpatsch Could we have your help as well, please? Or, has the issue been resolved for you already? Many thanks! :)
Could we have your help as well, please? Or, has the issue been resolved for you already? Many thanks! :)
I鈥檝e kind of been hoping that you鈥檇 implement the merge and everything just works magically from that point. :)
A bit out of my league with udev and haven鈥檛 had the time to read into that. It seems to work for most people, right? So I鈥檇 suggest doing the merge first.
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Most helpful comment
I'll try and merge them next week.