WIFI doesn't work - Help with gutting Network and installing it anew from live system

If you feel your adapter is not on when it should be at boot then it is possible Windows (on a dual boot), or power saving are interfering with it.

To disable power saving you could try this:



Disable wifi power saving with a Network Manager dispachter script:

Create:

/etc/NetworkManager/dispatcher.d/disable_pwrsave.sh

With the following contents:

#!/bin/bash

IFACE=$1 STATUS=$2
IW=/usr/bin/iw
WLAN_IFACE=$(hwinfo --wlan | grep "Device File" | cut -d " " -f5)

if [ ! -x $IW ]; then
    exit 1
fi

if [ "$IFACE" = $WLAN_IFACE ] && [ "$STATUS" = "up" ]; then
    echo "[SCRIPT] Disabling wifi power_save"
    $IW dev $IFACE set power_save off
fi

Save the script, then make it executable:

sudo chmod +x /etc/NetworkManager/dispatcher.d/disable_pwrsave.sh

Set the file permissions:

sudo chown root:root  /etc/NetworkManager/dispatcher.d/disable_pwrsave.sh
sudo chmod 755 /etc/NetworkManager/dispatcher.d/disable_pwrsave.sh

Restart Network Manager:

sudo systemctl restart NetworkManager


Thanks, will try the script. Is it really disable_pwrsave.sh and not disable_powrsave.sh?

@dglt, good plan but unfortunately I don't have 20GB spare space.

You can name the script whatever you want, but then all the other commands must be amended to match the name.

I'll leave the name as it is then. I assume the scrip will activate itself?

Any network related script in the /etc/NetworkManager/dispatcher.d directory is executed automatically when Network Manager is started.

I checked so many things but forgot to check the state of NetworkManager itself.

I run the restart command and then the state. Things got interesting, finally some info. I translated polish parts into English so some things may sound weird :wink:

● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
             └─NetworkManager-ovs.conf
     Active: active (running) since Tue 2020-03-24 22:01:06 CET; 1min 30s ago
       Docs: man:NetworkManager(8)
   Main PID: 8081 (NetworkManager)
      Tasks: 3 (limit: 9370)
     Memory: 4.7M
     CGroup: /system.slice/NetworkManager.service
             └─8081 /usr/bin/NetworkManager --no-daemon

mar 24 22:01:06 alienware-PC NetworkManager[8081]: <info>  [1585083666.7899] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
mar 24 22:01:06 alienware-PC NetworkManager[8081]: <info>  [1585083666.7907] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
mar 24 22:01:06 alienware-PC NetworkManager[8081]: <info>  [1585083666.8697] device (wlan0): set-hw-addr: set MAC address to DE:92:2D:13:0E:DF (scanning)
mar 24 22:01:07 alienware-PC NetworkManager[8081]: <info>  [1585083667.1205] modem-manager: ModemManager available
mar 24 22:01:07 alienware-PC NetworkManager[8081]: <info>  [1585083667.1215] agent-manager: agent[cdb8943823f8f251,:1.33/org.kde.plasma.networkmanagement/1000]: agent registered
mar 24 22:01:07 alienware-PC NetworkManager[8081]: <info>  [1585083667.1224] ovsdb: Can't connect: there is no such file or directory
mar 24 22:01:07 alienware-PC NetworkManager[8081]: <warn>  [1585083667.1233] supplicant: failed to acquire wpa_supplicant proxy: Wi-Fi and 802.1x will not be available (Error during call of methods StartServiceByName for fi.w1.wpa_supplicant1: Unit wpa_supplicant.service is masked.)
mar 24 22:01:07 alienware-PC NetworkManager[8081]: <info>  [1585083667.1446] manager: (A0:B4:A5:12:B5:46): new Bluetooth device (/org/freedesktop/NetworkManager/Devices/4)
mar 24 22:01:07 alienware-PC NetworkManager[8081]: <info>  [1585083667.1451] device (A0:B4:A5:12:B5:46): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
mar 24 22:01:07 alienware-PC NetworkManager[8081]: <info>  [1585083667.1476] device (A0:B4:A5:12:B5:46): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')

I believe this should be more comprehensive to you. I suspect that this masking is due to some lack of files, or those are two issues at once?

Did you install iwd and enable the iwd.service. I see you have wpa_supplicant masked?

I installed iwd and enabled as you showed above, hence the change of the device names. Maybe something went wrong? Is ovsdb a part of iwd?

Or maybe doing it from chroot screwed something? I noticed that chroot regularly breaks grub configs so I have to fix them from installed OS. It looks like a common problem, so maybe chroot is breaking some other things?

Please post:

systemctl list-unit-files --state=enabled --no-pager

systemctl list-unit-files --state=masked --no-pager

systemctl list-unit-files --state=failed --no-pager
[root@manjaro /]# systemctl list-unit-files --state=enabled --no-pager
UNIT FILE                                             STATE   VENDOR PRESET
var-lib-snapd-snap-bitwarden-21.mount                 enabled disabled     
var-lib-snapd-snap-bitwarden-23.mount                 enabled disabled     
var-lib-snapd-snap-core-8592.mount                    enabled disabled     
var-lib-snapd-snap-core-8689.mount                    enabled disabled     
var-lib-snapd-snap-core18-1650.mount                  enabled disabled     
var-lib-snapd-snap-core18-1668.mount                  enabled disabled     
var-lib-snapd-snap-gnome\x2d3\x2d26\x2d1604-97.mount  enabled disabled     
var-lib-snapd-snap-gnome\x2d3\x2d26\x2d1604-98.mount  enabled disabled     
var-lib-snapd-snap-gnome\x2d3\x2d28\x2d1804-110.mount enabled disabled     
var-lib-snapd-snap-gnome\x2d3\x2d28\x2d1804-116.mount enabled disabled     
var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1353.mount enabled disabled     
var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1440.mount enabled disabled     
var-lib-snapd-snap-rambox-10.mount                    enabled disabled     
var-lib-snapd-snap-rambox-11.mount                    enabled disabled     
org.cups.cupsd.path                                   enabled disabled     
autovt@.service                                       enabled disabled     
avahi-daemon.service                                  enabled disabled     
bluetooth.service                                     enabled disabled     
cronie.service                                        enabled disabled     
dbus-org.bluez.service                                enabled disabled     
dbus-org.freedesktop.Avahi.service                    enabled disabled     
dbus-org.freedesktop.ModemManager1.service            enabled disabled     
dbus-org.freedesktop.network1.service                 enabled disabled     
dbus-org.freedesktop.NetworkManager.service           enabled disabled     
dbus-org.freedesktop.nm-dispatcher.service            enabled disabled     
display-manager.service                               enabled disabled     
getty@.service                                        enabled enabled      
iwd.service                                           enabled disabled     
ModemManager.service                                  enabled disabled     
network-restart.service                               enabled disabled     
NetworkManager-dispatcher.service                     enabled disabled     
NetworkManager.service                                enabled disabled     
nmb.service                                           enabled disabled     
optimus-manager.service                               enabled disabled     
org.cups.cupsd.service                                enabled disabled     
sddm.service                                          enabled disabled     
smb.service                                           enabled disabled     
snapd.service                                         enabled disabled     
sshd.service                                          enabled disabled     
swapspace.service                                     enabled disabled     
systemd-networkd-wait-online.service                  enabled disabled     
systemd-networkd.service                              enabled enabled      
systemd-timesyncd.service                             enabled enabled      
teamviewerd.service                                   enabled disabled     
tlp.service                                           enabled disabled     
ufw.service                                           enabled disabled     
zramswap.service                                      enabled disabled     
avahi-daemon.socket                                   enabled disabled     
org.cups.cupsd.socket                                 enabled disabled     
snapd.socket                                          enabled disabled     
systemd-networkd.socket                               enabled disabled     
remote-fs.target                                      enabled enabled      
fstrim.timer                                          enabled disabled     
pamac-cleancache.timer                                enabled disabled     
pamac-mirrorlist.timer                                enabled disabled     

55 unit files listed.
[root@manjaro /]# systemctl list-unit-files --state=masked --no-pager
UNIT FILE              STATE  VENDOR PRESET
wpa_supplicant.service masked disabled     


1 unit files listed.

[root@manjaro /]# systemctl list-unit-files --state=failed --no-pager
UNIT FILE STATE VENDOR PRESET

The last one seems to be pointless from chroot thou. Or maybe they all are pointless from chroot?

It's been a while since I've manipulated services from chroot. I can't recall the best practice. Sometimes I simply modify the service itself from chroot.
It's not something I've done very often.

OK. So why it tries to use wpa when I have iwd? It's as if iwd was only partially working: it changed devices names but is not called to work.

Any idea what to do? I have no idea what supplicant does, how it works or what it's for. Only that without it network won't start. Maybe some of things I tried did work but without properly working iwd it was always showed as failed?

You could try replacing Network Manager with networkmanager-iwd from the AUR.

2 Likes

@tbg would know what packages are involved in networking but why not try reinstalling all of them with the --overwrite flag.

sudo pacman -S <packages> --overwrite '*'

that should put everything back to defaults including configuration files

1 Like

I installed networkmanager-iwd and networkmanager-iwd-overlay with their dependencies and Wifi is back! Yay!

At this point it's uncertain if the iwd was the solution in itself or something I did between installing iwd for the first time and then replacing networkmanager with iwd version, but at least it finnaly worked! I booted in, was asked about wifi password and voila, all runs like before :smiley:

2 Likes

You may find that nm-iwd will break on you a little ways down the road. Usually the nm-iwd version lags a little behind the regular NM release. So, the next time nm-iwd is updated you may have problems. Hopefully by that time a new version of the mainline NM will have been released with some new bug fixes.

Unfortunately Network Manager is in a constant state of flux and you never know when an update might break your networking. I have only experienced one breakage because of NM in the last several years, but using the most up to date version of NM does introduce a lot of uncertainty.

You could also test out a manager such as WICD that is far more static and is unlikely to introduce new bugs. I haven't used wicd in years but it was always a solid network manager and there are still plenty of people who rely on it. It won't have the advanced support for VPN's that Network Manager has, but if your not using a VPN then it should do the job for you.

Glad to hear you got things working.

The issue is not fully over yet :frowning:

I had to check and suspended computer. My AC wasn't plugged off but after waking up, there was no wifi and I had again wlan0 as DOWN and DORMANT. However, this time all elements were in place so system wasn't so unresponsive and vague to commands as before.


Right after suspend I got:

● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
             └─NetworkManager-ovs.conf
     Active: active (running) since Thu 2020-03-26 16:58:55 CET; 40s ago
       Docs: man:NetworkManager(8)
   Main PID: 982 (NetworkManager)
      Tasks: 3 (limit: 9370)
     Memory: 14.7M
     CGroup: /system.slice/NetworkManager.service
             └─982 /usr/bin/NetworkManager --no-daemon

mar 26 16:58:56 alienware-PC NetworkManager[982]: <info>  [1585238336.3329] device (wlan0): new IWD device state is disconnecting
mar 26 16:58:56 alienware-PC NetworkManager[982]: <info>  [1585238336.3330] modem-manager: ModemManager available
mar 26 16:58:56 alienware-PC NetworkManager[982]: <info>  [1585238336.3333] device (wlan0): new IWD device state is disconnected
mar 26 16:58:56 alienware-PC NetworkManager[982]: <info>  [1585238336.3336] manager: startup complete
mar 26 16:59:00 alienware-PC NetworkManager[982]: <info>  [1585238340.3383] agent-manager: agent[40e6bec3c3d0f8ce,:1.24/org.kde.plasma.networkmanagement/1000]: agent registered
mar 26 16:59:00 alienware-PC NetworkManager[982]: <info>  [1585238340.9737] manager: NetworkManager state is now ASLEEP
mar 26 16:59:03 alienware-PC NetworkManager[982]: <info>  [1585238343.5634] manager: (A0:B4:A5:12:B5:46): new Bluetooth device (/org/freedesktop/NetworkManager/Devices/4)
mar 26 16:59:14 alienware-PC NetworkManager[982]: <info>  [1585238354.8616] audit: op="radio-control" arg="wireless-enabled" pid=1273 uid=1000 result="success"
mar 26 16:59:17 alienware-PC NetworkManager[982]: <info>  [1585238357.4873] audit: op="radio-control" arg="wireless-enabled" pid=1273 uid=1000 result="success"
mar 26 16:59:18 alienware-PC NetworkManager[982]: <info>  [1585238358.5330] audit: op="radio-control" arg="wireless-enabled" pid=1273 uid=1000 result="success"

Now I see that NetworkManager state is now ASLEEP and also, new IWD device state is disconnected

After

sudo ip link set wlan0 mode default
sudo systemctl restart NetworkManager

wifi was still no go and info changed a bit:

● NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
└─NetworkManager-ovs.conf
Active: active (running) since Thu 2020-03-26 17:07:44 CET; 12s ago
Docs: man:NetworkManager(8)
Main PID: 2173 (NetworkManager)
Tasks: 4 (limit: 9370)
Memory: 4.7M
CGroup: /system.slice/NetworkManager.service
└─2173 /usr/bin/NetworkManager --no-daemon

mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4364] device (lo): carrier: link connected
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4366] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4374] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4385] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4536] device (wlan0): new IWD device state is disconnected
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4545] modem-manager: ModemManager available
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4559] agent-manager: agent[e4630cd24d95b5da,:1.26/org.kde.plasma.networkmanagement/1000]: agent registered
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4567] ovsdb: Nie można połączyć: Nie ma takiego pliku ani katalogu
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4618] manager: (A0:B4:A5:12:B5:46): new Bluetooth device (/org/freedesktop/NetworkManager/Devices/4)
mar 26 17:07:44 alienware-PC NetworkManager[2173]: <info>  [1585238864.4636] manager: startup complete

As usual, reboot did nothing and wlan0 was going back to be DORMANT.

There is still some issue with ovsdb, whatever it is. Do you know what ovsdb is or where does it come from?

In the end, I launched the restart service and that full load of scripts did the trick and the wifi is working. I'm not sure if after reboot my wifi will be still working.

The irritating part is that I have both countermeasures for wifi not being stopped during suspend and yet it is switched permanently off and won't wake up by itself.

The issue remains but the main thing is, I have a quick way to start wifi:

set wlan0 to DEFAULT
use networkmanager restart service

This installation is over 3,5 years old and till now I didn't have any issues with wifi. But to be honest, a few months ago situation got worse and I had the need to add this restart service and now it became even worse.

Maybe we finally get to the bottom of this? Something is still missing.

can you post a current inxi -Fxxxza

 michaldybczak  alienware-PC  ~  inxi -Fxxxza
System:    Host: alienware-PC Kernel: 5.5.13-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.5-x86_64 root=UUID=05f58c13-0021-44f7-abc9-05a091c4535b rw ipv6.disable=1 
           pcie_aspm=off net.ifnames=0 
           Desktop: KDE Plasma 5.18.3 tk: Qt 5.14.1 info: latte-dock wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: Alienware product: Alienware 17 R3 v: 1.7.0 serial: <filter> Chassis: type: 10 
           serial: <filter> 
           Mobo: Alienware model: 0GH72M v: A00 serial: <filter> UEFI: Alienware v: 1.7.0 date: 01/18/2019 
Battery:   ID-1: BAT1 charge: 92.0 Wh condition: 92.0/96.0 Wh (96%) volts: 17.1/15.0 model: COMPAL PABAS0241231 type: Li-ion 
           serial: <filter> status: Full 
CPU:       Topology: Quad Core model: Intel Core i7-6700HQ bits: 64 type: MT MCP arch: Skylake-S family: 6 model-id: 5E (94) 
           stepping: 3 microcode: D6 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 41621 
           Speed: 900 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 893 2: 894 3: 900 4: 900 5: 891 6: 900 7: 900 8: 900 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: tsx_async_abort mitigation: Clear CPU buffers; SMT vulnerable 
Graphics:  Device-1: Intel HD Graphics 530 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:191b 
           Device-2: NVIDIA GM204M [GeForce GTX 970M] vendor: Dell driver: nouveau v: kernel bus ID: 01:00.0 
           chip ID: 10de:13d8 
           Display: x11 server: X.Org 1.20.7 driver: modesetting compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 530 (SKL GT2) v: 4.6 Mesa 20.0.2 direct render: Yes 
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:a170 
           Sound Server: ALSA v: k5.5.13-1-MANJARO 
Network:   Device-1: Qualcomm Atheros Killer E2400 Gigabit Ethernet driver: alx v: kernel port: d000 bus ID: 3b:00.0 
           chip ID: 1969:e0a1 
           IF: eth0 state: down mac: <filter> 
           Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter vendor: Bigfoot Networks driver: ath10k_pci 
           v: kernel port: d000 bus ID: 3c:00.0 chip ID: 168c:003e 
           IF: wlan0 state: up mac: <filter> 
           Device-3: Qualcomm Atheros type: USB driver: btusb bus ID: 1-5:4 chip ID: 0cf3:e300 
Drives:    Local Storage: total: 1.02 TiB used: 673.56 GiB (64.6%) 
           ID-1: /dev/sda vendor: Kingston model: SM2280S3G2120G size: 111.79 GiB block size: physical: 512 B logical: 512 B 
           speed: 6.0 Gb/s serial: <filter> rev: 01.R scheme: GPT 
           ID-2: /dev/sdb vendor: HGST (Hitachi) model: HTS721010A9E630 size: 931.51 GiB block size: physical: 4096 B 
           logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: A3P0 scheme: GPT 
RAID:      Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 port: f060 bus ID: 00:17.0 
           chip ID: 8086.282a rev: 31 
Partition: ID-1: / raw size: 39.06 GiB size: 38.32 GiB (98.11%) used: 33.20 GiB (86.6%) fs: ext4 block size: 4096 B 
           dev: /dev/sda4 
           ID-2: /home raw size: 72.53 GiB size: 71.26 GiB (98.26%) used: 56.97 GiB (79.9%) fs: ext4 block size: 4096 B 
           dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 44.5 C mobo: N/A gpu: nouveau temp: 44 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 283 Uptime: 1h 52m Memory: 7.65 GiB used: 3.28 GiB (43.0%) Init: systemd v: 245 Compilers: gcc: 9.3.0 
           clang: 9.0.1 Shell: bash v: 5.0.16 running in: konsole inxi: 3.0.37

did you just recently do a firmware update?
any recent changes to kernel parameters in the last week?

the problems your having i wonder if an acpi_osi parameter might help. unless it's the pcie_aspm=off parameter causing problems but i've only ever seen that fix problems, not create them. :man_shrugging:

Forum kindly sponsored by