Ahoj,
In my new installation, I use NetworkManager.
I am on an OpenRC based system, and I have according to
pacman -Qqs 'networkmanager|nm\-' the following NetworkManager related packages installed:
libnm
libnma
libnma-common
network-manager-sstp
networkmanager
networkmanager-l2tp
networkmanager-openconnect
networkmanager-openrc
networkmanager-openvpn
networkmanager-pptp
networkmanager-qt
networkmanager-ssh
networkmanager-strongswan
networkmanager-vpnc
nm-connection-editor
nm-duid
nm-tray
ovpnsplit
python-protonvpn-nm-lib
NetworkManager initscript is activated in the "boot" runlevel.
After system startup, NetworkManager does
not recognise the network devices. I have to unload their kernel modules and reload them so that NetworkManager recognises them.
Previously it was only with
wlan0, while
eth0 was still recognised. Then I had during computer uptime unloaded and reloaded the driver for
eth0, and now after a reboot NetworkManager also does not recognise
eth0 until I unload and reload it's kernel module. But both
wlan0 and
eth0 are present and can be managed manually e.g. by
ifconfig and
iwconfig.
nmcli device after everything has been sorted:
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected WLAN opiplus
lo loopback connected (externally) lo
eth0 ethernet disconnected --
p2p-dev-wlan0 wifi-p2p disconnected --
When I do a
/etc/init.d/NetworkManeger restart after I have reloaded the kernel module, NetworkManage also manages the devices automatically. So it is really somehow a boot issue, not an isolated NetworkManager start issue.
Anyone an idea what might go awry here, and how to track it down?
Output of
rc-update:
NetworkManager | boot
acpid | boot
agetty.tty1 | default
agetty.tty2 | default
agetty.tty3 | default
agetty.tty4 | default
agetty.tty5 | default
agetty.tty6 | default
alsasound | boot
binfmt | boot
bootmisc | boot
cgroups | sysinit
cupsd | default
dbus | default
devfs | sysinit
dmesg | sysinit
dovecot | default
dropbear | default
elogind | boot
fcron | default
fsck | boot
gpm | boot
hostname | boot
hwclock | boot
keymaps | boot
killprocs | shutdown
kmod-static-nodes | sysinit
local | default nonetwork
localmount | boot
loopback | boot
metalog | boot
modules | boot
mount-ro | shutdown
mtab | boot
net.lo | boot
netmount | default
opensysusers | boot
opentmpfiles-dev | sysinit
opentmpfiles-setup | boot
postfix | default
procfs | boot
root | boot
save-keymaps | boot
save-termencoding | boot
savecache | shutdown
sddm | default
seedrng | boot
swap | boot
sysctl | boot
sysfs | sysinit
termencoding | boot
udev | sysinit
udev-trigger | sysinit
uksmd | default
grep . /etc/rc.conf | grep -v '^#' (i.e. lines that have non-commented out content):
rc_parallel="NO"
rc_interactive="YES"
rc_shell=/usr/bin/sulogin
rc_depend_strict="NO"
rc_logger="NO"
rc_log_path="/var/log/rc.log"
rc_verbose=no
rc_start_wait=0
rc_crashed_stop=NO
rc_crashed_start=YES
rc_nocolor=NO
unicode="YES"
rc_tty_number=12
My bet is "boot" is too early. Put it in "default".
And here I have the output of
nmcli device and
nmcli device show straight after reboot:
DEVICE TYPE STATE CONNECTION
lo loopback connected (externally) lo
eth0 ethernet unmanaged --
wlan0 wifi unmanaged --
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 100 (connected (externally))
GENERAL.CONNECTION: lo
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY: --
IP4.ROUTE[1]: dst = 127.0.0.0/8, nh = 127.0.0.1, mt = 0
IP6.ADDRESS[1]: ::1/128
IP6.GATEWAY: --
GENERAL.DEVICE: eth0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 00:9E:9F:03:02:A6
GENERAL.MTU: 1500
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
WIRED-PROPERTIES.CARRIER: off
IP4.GATEWAY: --
IP6.GATEWAY: --
GENERAL.DEVICE: wlan0
GENERAL.TYPE: wifi
GENERAL.HWADDR: B8:9A:2A:40:D6:D4
GENERAL.MTU: 1500
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.GATEWAY: --
IP6.GATEWAY: --
Note that when I unload and then reload the kernel module for
eth0 and
wlan0 it changes from "unmanaged" to "disconnected" or "connected" (i.e. managed by NetworkManager).
My
/etc/NetworkManager/NetworkManager.conf (except blank lines and lines that are only comments, and private ping test URI censored):
[main]
plugins=keyfile
dhcp=dhcpcd
no-auto-default=*
ignore-carrier=*
hostname-mode=none
dns=default
rc-manager=resolvconf
systemd-resolved=false
autoconnect-retries-default=2
slaves-order=name
[logging]
level=INFO
domains=ALL
backend=syslog
ethernet.cloned-mac-address=preserve
wifi.cloned-mac-address=stable
[device]
wifi.scan-rand-mac-address=true
[connectivity]
enabled=true
uri=<censored>
response=NetworkManager is online
interval=60
No, this did not help.
Also note that this problem was not there initially; it only appeared after I manually once unloaded the corresponding kernel module, and then persisted.
EDIT:A simple restart of NetworkManager (
rc-service NetworkManager restart) does not help,
and if I unload and reload the kernel module when NetworkManager is stopped, it also helps:
rc-service NetworkManager stop
rmmod r8169
rmmod realtek
rmmod mdio_devres
modprobe r8169
ethtool -s eth0 wol d
rc-service NetworkManager start
does work; NetworkManager state seems not to be relevant.
Also if I stop NetworkManager, onload the driver for
eth0 and
wlan0, start NetworkManager, and only then load the drivers, NetworkManager then starts to manage the interfaces.
What other daemons might be doing stuff with network?
Look what dmesg says. Maybe there will be some clues.
Also, have you tried to add these modules in initcpio?
Solved:
Turned out that I manually mounted some temporary filesystem at /run, not having recognised that the init scripts already mount a tmpfs there.
So there is a time where /run gets over-mounted and so the old content hidden. And this broke things.
I now removed my manual mount and NetworkManager at bootup works as expected.
Regards!