Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wlan does no start
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 584
Location: Switzerland

PostPosted: Wed Aug 26, 2020 10:37 am    Post subject: wlan does no start Reply with quote

Hi
After messing up the installation of my hp pavilion i did complete new installation.

I followed the instructions of the Wifi manual and the wpa_supplicant manual as far as possible (some of the config parameters in the manuals don't exist in my config file)
This is the output of 'lspci -k' regardin the WLAN:
Code:
05:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter
   DeviceName: WLAN
   Subsystem: Hewlett-Packard Company Realtek RTL8822BE 802.11ac 2 x 2 Wi-Fi + Bluetooth 4.2 Combo Adapter (MU-MIMO supported)
   Kernel driver in use: rtw_pci
   Kernel modules: rtwpci


the kernel module is loaded:
Code:
~ # lsmod | grep rtw
rtwpci                 28672  0
rtw88                 495616  1 rtwpci
mac80211              970752  2 rtwpci,rtw88
cfg80211              835584  2 mac80211,rtw88


My net configuration is:
Code:
~ # cat /etc/conf.d/net
modules="wpa_supplicant"
config_wlo1="dhcp"


And i copied a wpa_supplicant config from a working laptop:
Code:
~ # cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface_group=0
ap_scan=1
ctrl_interface=/var/run/wpa_supplicant

network={
   priority=1
   ssid="mynetwork"
   mode=0
   key_mgmt=WPA-PSK
   psk="mypassword"
}


i have made the links in init.d:
Code:
 lrwxrwxrwx 1 root root     6 Aug 26 09:56 /etc/init.d/net.eno1 -> net.lo
-rwxr-xr-x 1 root root 19780 Mar 12 02:00 /etc/init.d/net.lo
lrwxrwxrwx 1 root root     6 Aug 26 09:56 /etc/init.d/net.wlo1 -> net.lo
and added wpa_supplicant to the default level:
Code:
~ # rc-update | grep wpa_supplicant
       wpa_supplicant |      default             


When i reboot the computer the ethernet interface is running (even though i make no mention of it in /etc/conf.d/net):
Code:
~ # /etc/init.d/net.eno1 status
 * status: started

but the wireless does not work - it shows up in ifconfig but it has no IP-Address:
Code:
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.102  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::ead8:d1ff:fe36:887b  prefixlen 64  scopeid 0x20<link>
        ether e8:d8:d1:36:88:7b  txqueuelen 1000  (Ethernet)
        RX packets 883  bytes 126378 (123.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 314  bytes 46994 (45.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 40:5b:d8:68:1e:85  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

(and the /etc/init/d/net.wlo1 is 'stopped').

When i stop wpa_supplicant and start net.wlo1 manualy i also have no success:
Code:
~ # /etc/init.d/wpa_supplicant stop
 * Stopping WPA Supplicant Daemon ...                                                                                                                      [ ok ]
~ # /etc/init.d/net.wlo1 start
 * Bringing up interface wlo1
 *   Caching network module dependencies
need dbus
 *   Starting wpa_supplicant on wlo1 ...
Successfully initialized wpa_supplicant                                                                                                                       [ ok ] 
 *   Backgrounding ... ...                                                                                                                                              [ ok ]
 * WARNING: net.wlo1 has started, but is inactive

I get the same result if i assign a fixed IP-Adress to wlo1:
Code:
modules="wpa_supplicant"

config_wlo1="192.168.0.103 netmask 255.255.255.0 brd 192.168.0.255"
routes_wlo1="default via 192.168.0.1"


I know that the wireless is working - it did so until yesterday when i reinstalled gentoo from scratch.
I don't know if this is relevant, but while i was fiddling around with the config file, the network name for the wireless (shown in ifconfig) changed from "wlo1" to "wlan0" after booting, and when i changed the conf.d/net file to configure "wlan0", the name changed back to "wlo1". BUt now i can't reproduce this effect anymore.

So the questions are
- Why is 'wlo1' not started properly?
- Why is 'eno1' started by wpa_supplicant even though there is no configuration entry for it?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Wed Aug 26, 2020 5:29 pm    Post subject: Reply with quote

jody,

I suspecf that you have multiple things trying to control your wifi, so its up and down every few seconds, or less.

Look in dmesg for disconnected reason 3 (Or is that -3)
Anyway, it means it was asked to disconnect.

I would not put wpa_supplicant in the default runlevel.
Its called from /etc/conf.d/net.

By default, any interfaces listed in /etc/init.d are started.
If they are not mentioned in /etc/conf.d/net, the default action in to use dhcpcd.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 584
Location: Switzerland

PostPosted: Fri Aug 28, 2020 3:00 pm    Post subject: Reply with quote

In the dmesg output i don't see 'disconnect' or 'reason'.
There is however:
Code:
[    4.302835] rtw_pci 0000:05:00.0 wlo1: renamed from wlan0


The problem is, that when wpa_supplicant is stopped and i manually start /etc/init.d/net.wlo1 it seems to come up a bit, but not all the way:
Code:
~ # /etc/init.d/wpa_supplicant stop
 * Stopping WPA Supplicant Daemon ...                                                                                                                         [ ok ]
~ # /etc/init.d/net.wlo1 start
 * Bringing up interface wlo1
 *   Caching network module dependencies
need dbus
 *   Starting wpa_supplicant on wlo1 ...
Successfully initialized wpa_supplicant                                                                                                                       [ ok ]
 *   Starting wpa_cli on wlo1 ...                                                                                                                             [ ok ]
 *   Backgrounding ... ...
 * WARNING: net.wlo1 has started, but is inactive
~ # ifconfig wlo1
wlo1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 40:5b:d8:68:1e:85  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

~ # /etc/init.d/net.wlo1 status
 * status: inactive

But when wpa_supplicant is running, i can't srart wlo1 manually:
Code:
~ # /etc/init.d/net.wlo1 stop
 * Bringing down interface wlo1
 *   Stopping wpa_cli on wlo1 ...                                                                                                                             [ ok ]
 *   Stopping wpa_supplicant on wlo1 ...                                                                                                                      [ ok ]
~ # /etc/init.d/wpa_supplicant start
 * Starting WPA Supplicant Daemon ...
Successfully initialized wpa_supplicant                                                                                                                       [ ok ]
~ # /etc/init.d/net.wlo1 start
 * Bringing up interface wlo1
 *   Starting wpa_supplicant on wlo1 ...
Successfully initialized wpa_supplicant
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlo1' 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=wlo1 disabled_11b_rates=0
 *   start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'                                                                                            [ !! ]
 * ERROR: net.wlo1 failed to start
Back to top
View user's profile Send private message
Ralphred
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2013
Posts: 117

PostPosted: Tue Sep 01, 2020 3:12 pm    Post subject: Reply with quote

Issue sounds familiar to those I had before switching to a totally different style of set-up.
In both cases I was getting similar errors to you, as in half configured wlan interfaces etc.
Both times it was fixed for me by:
    Removing all references to wpa_supplicant in run levels/disabling with systemctl
    Copying a VALID /etc/wpa_supplicant/wpa_supplicant.conf to /etc/wpa_supplicant/wpa_supplicant-interface_name.conf
    Having config_interface_name="DHCP" and modules_interface_name="wpa_supplicant" in conf.d/net (there is some automagical stuff going on with systemd, never had any reference to wpa_supplicant and it was marked as unstarted and disabled, but a daemon was still running)
    Reboot.

This is roughly the same advice I gave to a friend setting up Gentoo on two different devices, and he's never came back saying it didn't work, that's not proof of owt so take as you will.
This also had the effect of having wlan interfaces up and running properly independently of logging into any X environment that may/may-not of had some kind of network/wifi managment GUI run on login, assuming a valid ssid was found in the wpa config file ofc.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6714

PostPosted: Tue Oct 06, 2020 9:52 am    Post subject: Reply with quote

mikahawkins wrote:
In case you're running Windows 10, look for Wifi investigating, and open the outcome, Identify and fix network issues.
Regards,
Mika Hawkins

Why do you talk like you've been run through Google Translate, and why do you assume someone on a Gentoo forum is using Windows 10?

All of your posts have been utterly misleading. Time to prove you're a real human.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum