Artix Linux Forum

Init systems => runit => Topic started by: jcrcx on 29 June 2020, 15:49:39

Title: Wifi interface "UP" but no internet
Post by: jcrcx on 29 June 2020, 15:49:39
Hi there,

I have installed Artix with runit on my laptop and the ethernet is working well with the dhcpcd service. But with the wireless network I'm having troubles. I'm using the wpa_supplicant service.

Code: [Select]
[jcrcx@core ~]$ ip link show 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether a8:1e:84:6e:d3:6a brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 58:00:e3:91:8c:d7 brd ff:ff:ff:ff:ff:ff

Thanks for your help :)

Title: Re: Wifi interface "UP" but no internet
Post by: phoenix_king_rus on 29 June 2020, 17:23:33
Is there anything relevant in your dmesg? Also what HW is it?
Title: Re: Wifi interface "UP" but no internet
Post by: alium on 29 June 2020, 21:53:57
Did you use networkmanager, which can you automaticaly connect ? What for "troubles" have you?? Provide more info please.
Title: Re: Wifi interface "UP" but no internet
Post by: Dudemanguy on 30 June 2020, 01:23:35
You need to edit the conf file in /etc/runit/sv/wpa_supplicant to match your interface name if you haven't done so already.
Title: Re: Wifi interface "UP" but no internet
Post by: mixagrip on 30 June 2020, 02:42:24
I have same problem before and solve this problem using connman, you can use connman and follow this documentation https://wiki.archlinux.org/index.php/ConnMan
Title: Re: Wifi interface "UP" but no internet
Post by: jcrcx on 30 June 2020, 05:28:09
You need to edit the conf file in /etc/runit/sv/wpa_supplicant to match your interface name if you haven't done so already.

I did as I normaly did with my other installation - Void linux.

Code: [Select]
[jcrcx@core ~]$ cat /etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf 
ctrl_interface=DIR=/var/run/wpa_supplicant-wlp2s0 GRUP=wheel
 
network={
        ssid="IENTC.mx 8031"
        #psk="dk53DM03qv"
        psk=b76459c8e907ef26a9907d5f5fadf643b38dbb39e88be8f9cec84355cd3fa4c2
}
network={
        ssid="SM-G96001896"
        #psk=",iu{g:9H"
        psk=8123db8f6ff67d924707b7230eb4c3453a8c534889a088bb9a4443c8322d7cfd
}


and

Code: [Select]
ln -s /etc/runit/sv/wpa_supplicant-wlp2s0 /run/runit/service

(PS. that code is from the artix instalation)
Title: Re: Wifi interface "UP" but no internet
Post by: jcrcx on 30 June 2020, 05:55:44
Also when I try wpa_cli, I get:

Code: [Select]
[jcrcx@core ~]$ wpa_cli
wpa_cli v2.9
Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.



Interactive mode

Could not connect to wpa_supplicant: (nil) - re-trying
Title: Re: Wifi interface "UP" but no internet
Post by: Dudemanguy on 30 June 2020, 15:19:02
I don't know how void handles it, but what you're doing looks incorrect. The name of the installed service directory is "/etc/runit/sv/wpa_supplicant". Unless you copied it and made a separate "/etc/runit/sv/wpa_supplicant-wlp2s0" directory, that symbolic link will do nothing. Also again, check the conf file in the /etc/runit/sv/wpa_supplicant directory and edit it parameters to match what you need.
Title: Re: Wifi interface "UP" but no internet
Post by: jcrcx on 30 June 2020, 19:36:44
Code: [Select]
[jcrcx@core ~]$ sudo iw dev wlp2s0 link 
Connected to c0:25:67:47:f6:c0 (on wlp2s0)
        SSID: IENTC.mx 8031
        freq: 2412
        RX: 829113 bytes (6182 packets)
        TX: 1318 bytes (13 packets)
        signal: -14 dBm
        rx bitrate: 72.2 MBit/s MCS 7 short GI
        tx bitrate: 1.0 MBit/s
 
        bss flags:      short-slot-time
        dtim period:    1
        beacon int:     100

With that output I don know if I'm connected or not. The ip link output shows that my wlp2s0 interface is UP but I still get not wireless connection. Also I checked the /etc/runit/sv/wpa_supplicant-wlp2s0/conf and /etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf according to the Artix documentation. But nothing
Title: Re: Wifi interface "UP" but no internet
Post by: Dudemanguy on 30 June 2020, 21:02:18
Also I checked the /etc/runit/sv/wpa_supplicant-wlp2s0/conf and /etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf according to the Artix documentation. But nothing

Like I said before, this is most likely incorrect. Why are you adding the name of the interface to these directories/files? Nowhere in any Artix or Arch documentation does it tell you to do this. The directory that the wpa_supplicant service is installed to is /etc/runit/wpa_supplicant. The config file that wpa_supplicant reads is /etc/wpa_supplicant.conf. Unless you've went out of your way to reconfigure everything to those directories/files (unlikely), this is wrong.
Title: Re: Wifi interface "UP" but no internet
Post by: jcrcx on 30 June 2020, 21:33:58
Like I said before, this is most likely incorrect. Why are you adding the name of the interface to these directories/files? Nowhere in any Artix or Arch documentation does it tell you to do this. The directory that the wpa_supplicant service is installed to is /etc/runit/wpa_supplicant. The config file that wpa_supplicant reads is /etc/wpa_supplicant.conf. Unless you've went out of your way to reconfigure everything to those directories/files (unlikely), this is wrong.

I understand that, I've already corrected it. But I still not get wireless connection, I don't know why.
Code: [Select]
[jcrcx@core ~]$ sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf 
Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: Could not set interface 'p2p-dev-wlp2s0' UP
nl80211: deinit ifname=p2p-dev-wlp2s0 disabled_11b_rates=0
p2p-dev-wlp2s0: Failed to initialize driver interface
P2P: Failed to enable P2P Device interface
Title: Re: Wifi interface "UP" but no internet
Post by: Dudemanguy on 30 June 2020, 22:44:11
-B forks the daemon into the background. Are you absolutely positive you don't have multiple instances of wpa_supplicant running? You should only have one at a time.
Title: Re: Wifi interface "UP" but no internet
Post by: jcrcx on 30 June 2020, 23:15:12
-B forks the daemon into the background. Are you absolutely positive you don't have multiple instances of wpa_supplicant running? You should only have one at a time.

There is nothing on the background
Code: [Select]
# ps -e | grep wpa 
no output