# (solved) wpa_supplicant gives errors but wireless works

## Spanik

On the laptop I'm trying to get the wireless working. Strange thing is that wireless starts, the wifi wonnects to my wifi network and I can go on the network. But wpa_supplicant gives an error and wpa_gui finds no networks. I'd like to have wpa_gui working so I can choose wifi networks.

/etc/conf.d/wpa_supplicant

```
# conf.d file for wpa_supplicant

# uncomment this if wpa_supplicant starts up before your network interface

# is ready and it causes issues

# rc_want="dev-settle"

# Please check man 8 wpa_supplicant for more information about the options

# wpa_supplicant accepts.

#

wpa_supplicant_args="-B -M -c/etc/wpa_supplicant/wpa_supplicant.conf"
```

/etc/wpa_supplicant/wpa_supplicant.conf

```

# The below line not be changed otherwise we refuse to work

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers

network={

  ssid="*********"

  psk="**********"

  # The higher the priority the sooner we are matched

  priority=5

}
```

/etc/conf.d/net

```
dns_domain_lo="thuis"

config_enp12s0="dhcp"

config_wlp3s0="dhcp"

modules="wpa_supplicant"
```

There is also a /etc/init.d/net.wpl3s0 that is a link to net.lo as per handbook. Net.wpl3s0 and wpa_supplicant are at runlevel default. 

But rc-status --servicelist says this:

```
 wpa_supplicant                                                                                                                                                                [  started  ]

 dhcpcd                                                                                                                                                                        [  started  ]

 termencoding                                                                                                                                                                  [  started  ]

 keymaps                                                                                                                                                                       [  started  ]

 loopback                                                                                                                                                                      [  started  ]

 net.enp12s0                                                                                                                                                                   [  started  ]

 net.wlp3s0                                                                                                                                                                    [  stopped  ]

 netmount                                                                                                                                                                      [  stopped  ]

 ntp-client                                                                                                                                                                    [  stopped  ]
```

So it says net.wpl3s0 isn't running while I do have wifi connection

Dmesg says:

```
[    9.910900] ip (1378) used greatest stack depth: 12464 bytes left

[   10.596223] iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0

[   10.863208] iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0

[   11.046444] RTL8211E Gigabit Ethernet r8169-c00:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=r8169-c00:00, irq=IGNORE)

[   11.254305] r8169 0000:0c:00.0 enp12s0: Link is Down

[   11.473374] wlp3s0: authenticate with 14:cc:20:46:54:1d

[   11.476852] wlp3s0: send auth to 14:cc:20:46:54:1d (try 1/3)

[   11.479633] wlp3s0: authenticated

[   11.480601] wlp3s0: associate with 14:cc:20:46:54:1d (try 1/3)

[   11.484536] wlp3s0: RX AssocResp from 14:cc:20:46:54:1d (capab=0x1431 status=0 aid=2)

[   11.505874] wlp3s0: associated

[   11.526305] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
```

This is what is in the syslog (I just kept the network things) After boot I removed the ethernet cable to check connectivity of the wireless.

```
Jun 23 10:56:27 think kernel: ip (1378) used greatest stack depth: 12464 bytes left

Jun 23 10:56:28 think kernel: iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0

Jun 23 10:56:29 think dhcpcd[1623]: dhcpcd-9.4.0 starting

Jun 23 10:56:29 think dhcpcd[1625]: dev: loaded udev

Jun 23 10:56:29 think dhcpcd[1625]: DUID 00:04:41:fc:41:01:52:16:11:cb:a2:83:d9:33:88:fa:cd:c2

Jun 23 10:56:28 think kernel: iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0

Jun 23 10:56:29 think dhcpcd[1625]: no interfaces have a carrier

Jun 23 10:56:29 think kernel: RTL8211E Gigabit Ethernet r8169-c00:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=r8169-c00:00, irq=IGNORE)

Jun 23 10:56:29 think dhcpcd[1625]: enp12s0: waiting for carrier

Jun 23 10:56:29 think dhcpcd[1625]: wlp3s0: waiting for carrier

Jun 23 10:56:29 think dhcpcd[1625]: wlp3s0: carrier acquired

Jun 23 10:56:29 think kernel: r8169 0000:0c:00.0 enp12s0: Link is Down

Jun 23 10:56:29 think dhcpcd[1625]: wlp3s0: IAID dd:37:08:2f

Jun 23 10:56:29 think dhcpcd[1625]: wlp3s0: adding address fe80::d232:2176:936c:aa4

Jun 23 10:56:29 think dhcpcd[1625]: wlp3s0: carrier lost

Jun 23 10:56:29 think dhcpcd[1625]: wlp3s0: deleting address fe80::d232:2176:936c:aa4

Jun 23 10:56:29 think dhcpcd[1625]: enp12s0: carrier acquired

Jun 23 10:56:29 think dhcpcd[1625]: enp12s0: IAID e3:e2:fd:59

Jun 23 10:56:29 think dhcpcd[1625]: enp12s0: adding address fe80::a797:cc4f:d5bf:44f6

Jun 23 10:56:29 think kernel: wlp3s0: authenticate with 14:cc:20:46:54:1d

Jun 23 10:56:29 think kernel: wlp3s0: send auth to 14:cc:20:46:54:1d (try 1/3)

Jun 23 10:56:29 think kernel: wlp3s0: authenticated

Jun 23 10:56:29 think kernel: wlp3s0: associate with 14:cc:20:46:54:1d (try 1/3)

Jun 23 10:56:29 think kernel: wlp3s0: RX AssocResp from 14:cc:20:46:54:1d (capab=0x1431 status=0 aid=2)

Jun 23 10:56:29 think kernel: wlp3s0: associated

Jun 23 10:56:30 think dhcpcd[1625]: wlp3s0: carrier acquired

Jun 23 10:56:29 think kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready

Jun 23 10:56:30 think dhcpcd[1625]: wlp3s0: connected to Access Point: quirinus

Jun 23 10:56:30 think dhcpcd[1625]: wlp3s0: IAID dd:37:08:2f

Jun 23 10:56:30 think dhcpcd[1625]: wlp3s0: adding address fe80::628c:7bc:9ffb:55c0

Jun 23 10:56:30 think dhcpcd[1882]: sending commands to dhcpcd process

Jun 23 10:56:30 think dhcpcd[1625]: control command: dhcpcd -m 2 enp12s0

Jun 23 10:56:30 think dhcpcd[1625]: wlp3s0: soliciting an IPv6 router

Jun 23 10:56:30 think dhcpcd[1625]: enp12s0: rebinding lease of 192.168.2.35

Jun 23 10:56:30 think dhcpcd[1625]: enp12s0: soliciting an IPv6 router

Jun 23 10:56:30 think dhcpcd[1625]: enp12s0: carrier lost

Jun 23 10:56:30 think dhcpcd[1625]: enp12s0: deleting address fe80::a797:cc4f:d5bf:44f6

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: Router Advertisement from fe80::3291:8fff:feb5:92a8

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: adding address 2a02:a03f:610b:1300:44b:ab0:1b07:f72f/64

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: adding address fd5c:6ed:b6c0:0:2db5:bc7:4aff:83dc/64

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: adding route to 2a02:a03f:610b:1300::/64

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: adding route to fd5c:6ed:b6c0::/64

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: requesting DHCPv6 information

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: adding default route via fe80::3291:8fff:feb5:92a8

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: rebinding lease of 192.168.2.51

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: probing address 192.168.2.51/24

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: carrier lost - roaming

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: carrier acquired

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: IAID dd:37:08:2f

Jun 23 10:56:31 think dhcpcd[1625]: wlp3s0: no useable IA found in lease

Jun 23 10:56:31 think /etc/init.d/net.wlp3s0[2131]: start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'

Jun 23 10:56:31 think /etc/init.d/net.wlp3s0[1965]: ERROR: net.wlp3s0 failed to start

Jun 23 10:56:31 think /etc/init.d/netmount[2147]: ERROR: cannot start netmount as net.wlp3s0 would not start

Jun 23 10:56:32 think dhcpcd[1625]: wlp3s0: carrier lost - roaming

Jun 23 10:56:32 think dhcpcd[1625]: wlp3s0: carrier acquired

Jun 23 10:56:32 think dhcpcd[1625]: wlp3s0: IAID dd:37:08:2f

....

Jun 23 10:56:32 think dhcpcd[1625]: wlp3s0: soliciting an IPv6 router

Jun 23 10:56:32 think dhcpcd[1625]: wlp3s0: Router Advertisement from fe80::3291:8fff:feb5:92a8

Jun 23 10:56:32 think dhcpcd[1625]: wlp3s0: requesting DHCPv6 information

Jun 23 10:56:32 think dhcpcd[1625]: enp12s0: carrier acquired

Jun 23 10:56:32 think kernel: r8169 0000:0c:00.0 enp12s0: Link is Up - 1Gbps/Full - flow control off

Jun 23 10:56:32 think kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp12s0: link becomes ready

Jun 23 10:56:32 think dhcpcd[1625]: enp12s0: IAID e3:e2:fd:59

Jun 23 10:56:32 think dhcpcd[1625]: enp12s0: adding address fe80::a797:cc4f:d5bf:44f6

Jun 23 10:56:33 think dhcpcd[1625]: enp12s0: soliciting an IPv6 router

Jun 23 10:56:33 think dhcpcd[1625]: wlp3s0: REPLY6 received from fe80::3291:8fff:feb5:92a8

Jun 23 10:56:33 think dhcpcd[1625]: wlp3s0: refresh in 86400 seconds

Jun 23 10:56:33 think dhcpcd[1625]: wlp3s0: rebinding lease of 192.168.2.51

Jun 23 10:56:33 think dhcpcd[1625]: wlp3s0: probing address 192.168.2.51/24

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: rebinding lease of 192.168.2.35

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: probing address 192.168.2.35/24

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: Router Advertisement from fe80::3291:8fff:feb5:92a8

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: adding address 2a02:a03f:610b:1300:66b8:5ce7:5b03:b9ef/64

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: adding address fd5c:6ed:b6c0:0:89fb:86:5784:9ae4/64

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: adding route to 2a02:a03f:610b:1300::/64

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: adding route to fd5c:6ed:b6c0::/64

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: requesting DHCPv6 information

Jun 23 10:56:34 think dhcpcd[1625]: enp12s0: adding default route via fe80::3291:8fff:feb5:92a8

Jun 23 10:56:35 think dhcpcd[1625]: enp12s0: REPLY6 received from fe80::3291:8fff:feb5:92a8

Jun 23 10:56:35 think dhcpcd[1625]: enp12s0: refresh in 86400 seconds

Jun 23 10:56:38 think ntpd[2204]: Listen normally on 7 enp12s0 [fd5c:6ed:b6c0:0:89fb:86:5784:9ae4]:123

Jun 23 10:56:38 think ntpd[2204]: Listen normally on 8 enp12s0 [2a02:a03f:610b:1300:66b8:5ce7:5b03:b9ef]:123

Jun 23 10:56:38 think ntpd[2204]: Listen normally on 9 enp12s0 [fe80::a797:cc4f:d5bf:44f6%2]:123

Jun 23 10:56:38 think ntpd[2204]: Listen normally on 10 wlp3s0 [fd5c:6ed:b6c0:0:2db5:bc7:4aff:83dc]:123

Jun 23 10:56:38 think ntpd[2204]: Listen normally on 11 wlp3s0 [2a02:a03f:610b:1300:44b:ab0:1b07:f72f]:123

Jun 23 10:56:38 think dhcpcd[1625]: wlp3s0: leased 192.168.2.51 for 3600 seconds

Jun 23 10:56:38 think dhcpcd[1625]: wlp3s0: adding route to 192.168.2.0/24

Jun 23 10:56:38 think dhcpcd[1625]: wlp3s0: adding default route via 192.168.2.1

......

Jun 23 10:58:33 think dhcpcd[1625]: enp12s0: REPLY6 received from fe80::3291:8fff:feb5:92a8

Jun 23 10:58:33 think dhcpcd[1625]: enp12s0: refresh in 600 seconds

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: carrier lost

Jun 23 11:00:01 think kernel: r8169 0000:0c:00.0 enp12s0: Link is Down

Jun 23 11:00:02 think start-stop-daemon: Will stop /usr/sbin/ntpd

Jun 23 11:00:02 think start-stop-daemon: Will stop PID 2498

Jun 23 11:00:02 think start-stop-daemon: Sending signal 15 to PID 2498

......

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: deleting address 2a02:a03f:610b:1300:66b8:5ce7:5b03:b9ef/64

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: deleting address fd5c:6ed:b6c0:0:89fb:86:5784:9ae4/64

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: deleting route to fd5c:6ed:b6c0::/64

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: deleting route to 2a02:a03f:610b:1300::/64

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: deleting default route via fe80::3291:8fff:feb5:92a8

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: deleting address fe80::a797:cc4f:d5bf:44f6

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: deleting route to 192.168.2.0/24

Jun 23 11:00:02 think dhcpcd[1625]: enp12s0: deleting default route via 192.168.2.1

......

Jun 23 11:08:47 think ntpd[3301]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized

Jun 23 11:26:33 think dhcpcd[1625]: wlp3s0: fe80::3291:8fff:feb5:92a8: router expired

Jun 23 11:26:33 think dhcpcd[1625]: wlp3s0: part of a Router Advertisement expired

Jun 23 11:26:33 think dhcpcd[1625]: wlp3s0: deleting default route via fe80::3291:8fff:feb5:92a8

```

It is strange that before I did the wpa_supplicant setup and added it to runlevel default, ntpd worked fine. But it can be that this is a specific ntpd issue right now.

----------

## Spanik

Really no ideas?

----------

## Goverp

Take your config for wlp3s0 out of conf.d/net; you've got two network managers (net.wlp3s0 and wpa_supplicant) fighting over the same interface.

----------

## Spanik

Ok, changed /etc/conf.d/net to:

```
dns_domain_lo="thuis"

config_enp12s0="dhcp"
```

But no difference. I also saw that rc isn't happy so I let it log and found this:

```
* Bringing up interface enp12s0

 *   Caching network module dependencies

 *   dhcp ...

 *     Running dhcpcd ...

sending commands to dhcpcd process

 [ ok ]

 *     received address 

 [ ok ]

 *   Waiting for tentative IPv6 addresses to complete DAD (5 seconds) .

 [ ok ]

 * Bringing up interface wlp3s0

 *   Caching network module dependencies

 *   Starting wpa_supplicant on wlp3s0 ...

Successfully initialized wpa_supplicant

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

nl80211: kernel reports: Match already configured

ctrl_iface exists and seems to be in use - cannot override it

Delete '/var/run/wpa_supplicant/wlp3s0' manually if it is not used anymore

Failed to initialize control interface '/var/run/wpa_supplicant'.

You may have another wpa_supplicant process already running or the file was

left by an unclean termination of wpa_supplicant in which case you will need

to manually remove this file before starting wpa_supplicant again.

nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0

 *   start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'

 [ !! ]

 * ERROR: net.wlp3s0 failed to start

 * ERROR: cannot start netmount as net.wlp3s0 would not start
```

I deleted the fiel /var/run/wpa_supplicant/wpls3s0 as mentioned but this makes no difference. After a reboot I get the same faults and the file is back.

----------

## Goverp

Not sure why, but I think the problem is whatever is issuing the message 

```
Bringing up interface wlp3s0
```

 AFAIK that's not from wpa_supplicant.

My rc.log has only 

```
loopback             | * Bringing up network interface lo ...
```

 and no messages about wlan0 at all.

For completeness, here are all the messages for rc default (with the [ok] messages moved to the relevant line; not sure why my rc,log gets garbled):

```
rc default logging started at Sun Jun 27 11:07:23 2021

syslog-ng            | * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ... [ ok ]

laptop_mode          | * Starting laptop_mode ...  [ ok ]

syslog-ng            | * Starting syslog-ng ...  [ ok ]

gpm                  | * Starting gpm ...  [ ok ]

cronie               | * Starting cronie ...

wpa_supplicant       | * Starting WPA Supplicant Daemon ...  [ ok ]

wpa_supplicant       |Successfully initialized wpa_supplicant  [ ok ]

display-manager      | * Setting up sddm ... [ ok ]

dhcpcd               | * Starting DHCP Client Daemon ...  [ ok ]

ntpd                 | * Starting ntpd ...  [ ok ]

local                | * Starting local ...  [ !! ]

rc default logging stopped at Sun Jun 27 11:07:24 2021
```

and from my syslog for my wlan0

```
 Jun 27 11:07:24 dhcpcd[2905]: wlan0: waiting for carrier

 Jun 27 11:07:24 dhcpcd[2905]: wlan0: carrier acquired

 Jun 27 11:07:24 dhcpcd[2905]: wlan0: IAID f2:09:1a:11

 Jun 27 11:07:24 dhcpcd[2905]: wlan0: adding address fe80::99ae:96d6:d34b:71b2

 Jun 27 11:07:24 dhcpcd[2905]: wlan0: carrier lost

 Jun 27 11:07:24 dhcpcd[2905]: wlan0: deleting address fe80::99ae:96d6:d34b:71b2

 Jun 27 11:07:25 kernel: [    4.931010] wlan0: authenticate with 60:e3:27:37:e9:00

 Jun 27 11:07:25 kernel: [    5.177572] wlan0: send auth to 60:e3:27:37:e9:00 (try 1/3)

 Jun 27 11:07:25 kernel: [    5.179337] wlan0: authenticated

 Jun 27 11:07:25 kernel: [    5.179527] wlan0: associate with 60:e3:27:37:e9:00 (try 1/3)

 Jun 27 11:07:25 kernel: [    5.182922] wlan0: RX AssocResp from 60:e3:27:37:e9:00 (capab=0x431 status=0 aid=3)

 Jun 27 11:07:25 kernel: [    5.183167] wlan0: associated

 Jun 27 11:07:25 dhcpcd[2905]: wlan0: carrier acquired

 Jun 27 11:07:25 dhcpcd[2905]: wlan0: connected to Access Point: Seamus Android

 Jun 27 11:07:25 kernel: [    5.236696] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

 Jun 27 11:07:25 dhcpcd[2905]: wlan0: IAID f2:09:1a:11

 Jun 27 11:07:25 dhcpcd[2905]: wlan0: adding address fe80::699c:57c4:e738:a13d

 Jun 27 11:07:26 dhcpcd[2905]: wlan0: soliciting an IPv6 router

 Jun 27 11:07:26 dhcpcd[2905]: wlan0: soliciting a DHCP lease

 Jun 27 11:07:27 ntpd[3231]: unable to create socket on wlan0 (4) for fe80::699c:57c4:e738:a13d%3#123

 Jun 27 11:07:27 dhcpcd[2905]: wlan0: Router Advertisement from fe80::62e3:27ff:fe37:e900

 Jun 27 11:07:27 dhcpcd[2905]: wlan0: requesting DHCPv6 information

 Jun 27 11:07:29 dhcpcd[2905]: wlan0: probing address 192.168.1.124/24

 Jun 27 11:07:29 ntpd[3231]: Listen normally on 5 wlan0 [fe80::699c:57c4:e738:a13d%3]:123

 Jun 27 11:07:34 dhcpcd[2905]: wlan0: leased 192.168.1.124 for 86400 seconds

 Jun 27 11:07:34 dhcpcd[2905]: wlan0: adding route to 192.168.1.0/24

 Jun 27 11:07:34 dhcpcd[2905]: wlan0: adding default route via 192.168.1.1

 Jun 27 11:07:35 ntpd[3231]: Listen normally on 6 wlan0 192.168.1.124:123

 Jun 27 11:07:37 dhcpcd[2905]: wlan0: failed to request DHCPv6 information

 Jun 27 11:07:37 dhcpcd[2905]: wlan0: no advertising IPv6 router wants DHCP
```

----------

## Goverp

Did you "rc-update add net.wlp3s0"?  If so, remove it; IIUC that's part of netifrc, and you're using wpa_supplicant instead; at the moment I think you effectively have both configured.  Removing the lines from /etc/conf.d/net merely means netifrc uses the defaults for wlp2s0.

----------

## Spanik

I have been playing a bit with rc-services. What I find is that

1: both net.wlp3s0 AND wpa_supplicant are on runlevel default

2: if wpa_supplicant is running before net.wlp3s0, then I get a load of errors, just like when it starts all during boot

3: if I stop both services and then first start net.wlp3s0 and then next I start wpa_services, it works as I expect (I see the interface in wpa_gui and can select a network, start a scan etc)

So it seems that the issue is the order of starting net.wlp3s0 and wpa_supplicant. Is there a way I can tell rc which order to start both?

----------

## Spanik

It is also a permissions issue.

When I start the net.wlp3s0 and wpa_supplicant service in orde I need to be root. If I then look as my ormal user at wpa_gui, there is no interface. But if I then start wpa_gui as root, I do see the interface and can connect and disconnect. But I have no idea what specific thing needs to get permissions set.

----------

## Goverp

I believe you should not need net.wlp3s0 started at all.  wpa_supplicant should do everything necessary.  That's how my laptop does it.  I'll have to look at permissions on it tomorrow.

----------

## ian.au

Spanik,

Goverp has told you the problem. You'll end up in the weeds on wireless unless you start exactly one service to bring up wpa_supplicant.

I do it differently to him though, I bring up the interface and then call up wpa_supplicant via /etc/conf.d/net 

Edit to say here that you simply can't start both wpa_supplicant and your net.wlpXsX remove one of them via rc_update. 

You can start one or the other, and use the one you start to call the other. In the below I start the device, so to follow that, you'd remove wpa_supplicant

Here's how I configure wireless:

Once having identified the device and configured any kernel / firmware:

```
gw-01 / # tree /sys/class/net

/sys/class/net

├── lo -> ../../devices/virtual/net/lo

├── sit0 -> ../../devices/virtual/net/sit0

└── wlp6s0 -> ../../devices/pci0000:00/0000:00:1c.2/0000:06:00.0/net/wlp6s0

3 directories, 0 files
```

Add the device to the boot run level

```
rc-update add wlp6s0 default
```

Setup /etc/conf.d/wpa_supplicant

```
gw-01 / # cat /etc/conf.d/wpa_supplicant

# conf.d file for wpa_supplicant

# uncomment this if wpa_supplicant starts up before your network interface

# is ready and it causes issues

# rc_want="dev-settle"

# Please check man 8 wpa_supplicant for more information about the options

# wpa_supplicant accepts.

wpa_supplicant_args="-B -M -c/etc/wpa_supplicant/wpa_supplicant.conf"
```

Setup /conf.d/net

```
gw-01 / # cat /etc/conf.d/net

modules_wlp6s0="wpa_supplicant"

wpa_supplicant_wlp6s0="-Dnl80211 -d -f /var/log/wpa_supplicant.log"

config_wlp6s0="dhcp"
```

Setup /etc/wpa_supplicant/wpa_supplicant.conf

Note the changed ctrl_interface_group - that will fix your permissions with eg. unpopulated wpa_gui etc.. you may also have to add your user to the netdev group.

```
gw-01 / # cat /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=users

network={

        ssid="Yeah"

        #psk="Right"

        psk=LetsPutThatHere:)

}

network={

        ssid="Yeah"

        #psk="Right"

        psk=LetsPutThatHereToo:)

}
```

That's enough to get me a stable connection and the ability to network-switch via wpa_gui.

Hope it helps.

----------

## Spanik

I did that, and wifi is working right now. The remaining problem is that I cannot use wpa_gui as a standard user. Only as root can I choose which network to connect to.

When I run as standard user, wpa_gui gives blank, no devices, no networks. If I open a terminal and start wpa_gui as root, I have the interface and the list of available networks.

So somewhere there is a permissions issue. But I have no clue where or what needs changing.

----------

## ian.au

 *Spanik wrote:*   

> 
> 
> When I run as standard user, wpa_gui gives blank, no devices, no networks. If I open a terminal and start wpa_gui as root, I have the interface and the list of available networks.
> 
> So somewhere there is a permissions issue. But I have no clue where or what needs changing.

 

Did you try what I suggested?

 *Quote:*   

> Note the changed ctrl_interface_group - that will fix your permissions with eg. unpopulated wpa_gui etc.. you may also have to add your user to the netdev group.

 

----------

## Spanik

 *ian.au wrote:*   

> Did you try what I suggested?
> 
>  *Quote:*   Note the changed ctrl_interface_group - that will fix your permissions with eg. unpopulated wpa_gui etc.. you may also have to add your user to the netdev group. 

 

I missed that! Indeed, changing the crtl_interface_group to "users" was what was missing.

----------

## ian.au

 *Spanik wrote:*   

> 
> 
> I missed that! Indeed, changing the crtl_interface_group to "users" was what was missing.

 

Great, mark the thread solved, maybe someone else will find it useful later.

----------

