Skip to main content
Topic: wpa_supplicant fails to start with dinitctl but runs manually (Read 2212 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

wpa_supplicant fails to start with dinitctl but runs manually

I just installed the dinit version of artix and I'm trying to setup a wireless connection. Manually works just fine:
Code: [Select]
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
But if I try to start the service, it fails. The log has these messages:
Code: [Select]
Successfully initialized wpa_supplicant
Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
This issue is very similar to this issue in s6, but it seems that his issue was just a variable with the wrong name. In my case the environment file contains:
Code: [Select]
WPA_INTERFACE="wlan0"
Help please?

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #1
If your environment file was as you said, I think the error message should have been:

Code: [Select]
Could not read interface "wlan0" flags: No such device

... i.e. with quotes around 'wlan0'. That's the giveaway I think, the quotes should not be there (in the environment file).

Remember to run "dinitctl reload wpa_supplicant" after editing the file.

Do you actually have a wlan0 interface? If not that would also be a problem. (I.e. does the kernel recognise your wifi adapter? Is the right module loaded? etc).

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #2
If your environment file was as you said, I think the error message should have been:

Code: [Select]
Could not read interface "wlan0" flags: No such device

... i.e. with quotes around 'wlan0'. That's the giveaway I think, the quotes should not be there (in the environment file).

Remember to run "dinitctl reload wpa_supplicant" after editing the file.

Do you actually have a wlan0 interface? If not that would also be a problem. (I.e. does the kernel recognise your wifi adapter? Is the right module loaded? etc).

I can confirm that this issue occurs because of the quotes that the wpa_supplicant-dinit package uses by default in its "WPA_INTERFACE" config variable. It's a significant issue because it most likely affects everyone who tries Artix with Dinit (or Dinit with Artix) directly during system setup. At least, everyone who uses wireless connection for that.

I tried to file a Gitea issue for this, but unfortunately, it requires an Artix Gitea account. @davmac, if you have a way to notify the maintainer of the "wpa_supplicant-dinit" package about this, could you please do so?

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #3
If by any chance using dhcpcd, then another way to start wpa_supplicant automatically is through the already available dhcpcd hook which documented on the Arch dhcpcd wiki.  This way there's no need to enable the wpa_supplicant service.

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #4
Try iwd (iwd-dinit).

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #5
Thanks, folks. I agree that both solutions (dhcpcd hook or iwd) should technically work, but this is not exactly what do you expect to do when you setting up a new system. The point is that it's not just an additional step that should be executed, but rather a clear bug in the default configuration that occurs on almost all Dinit-based Artix setups.

The drawback of the iwd solution is that the iwd binary and service files are not installed on the base Dinit ISO. So, in order to download and install them, you have to set up a connection using the only available option, wpa_supplicant, which, unfortunately, currently doesn't work without tweaks.

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #6
in order to download and install them, you have to set up a connection using the only available option, wpa_supplicant

Isn't connman running on livecd?

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #7
in order to download and install them, you have to set up a connection using the only available option, wpa_supplicant

Isn't connman running on livecd?
Ah, I checked the base image and connaman is indeed here. Sorry, I never had a chance to use it myself, but isn't it a high-level connection manager that uses wpa_supplicant/iwd as backend anyway?

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #8
but isn't it a high-level connection manager that uses wpa_supplicant/iwd as backend anyway?

According to ArchWiki:
Code: [Select]
Install the connman package. wpa_supplicant, bluez, and openvpn are optional dependencies required for Wi-Fi, Bluetooth, and VPN functionality respectively.

Before enabling connman.service, ensure any existing network configuration is disabled.

 

Re: wpa_supplicant fails to start with dinitctl but runs manually

Reply #9
but isn't it a high-level connection manager that uses wpa_supplicant/iwd as backend anyway?

According to ArchWiki:
Code: [Select]
Install the connman package. wpa_supplicant, bluez, and openvpn are optional dependencies required for Wi-Fi, Bluetooth, and VPN functionality respectively.

Before enabling connman.service, ensure any existing network configuration is disabled.
Yeah, but I mean realistically using a wireless connection (aka Wi-Fi) is pretty usual for system setup nowadays. As I stated in my first message of this thread, it affects ...
Quote
At least, everyone who uses wireless connection for that
In any case, I was able to find an email address of the "wpa_supplicant-dinit" package maintainer. Let's hope it'll be resolved regardless of the fact if there are any other ways to set up your base system using more complicated ways.