You are not logged in.

#1 2022-04-26 05:57:07

parsody
Member
Registered: 2022-04-21
Posts: 32

[SOLVED]automating fixing wifi (reload module)

so my wifi chipset doesn't seem to be well supported on some boots (about 1/6 times) wifi module fails to load so i made a simple script to reload modules if they are not loaded:
http://0x0.st/oTge.sh
i put this in my ~/.profile it worked but the problem is on an affected boot network manager tries to start and fail  increasing my boot time by about a minute (says a start job is running)
is there any way to make this a systemd service and ensure it runs before NetworkManager? is there any other option i should consider?
from my understanding kernel modules load before systemd so im clear on that side right?
wifi chipset: Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 31)

Last edited by parsody (2022-04-27 14:09:00)

Offline

#2 2022-04-26 06:48:44

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

is there any other option i should consider?

How about we look at why the module fails itfp.
Please post the complete system journal for an affected boot.

Online

#3 2022-04-26 07:43:14

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:

is there any other option i should consider?

How about we look at why the module fails itfp.
Please post the complete system journal for an affected boot.

journalctl -b

output from affected boot : https://pastebin.ubuntu.com/p/XbX6kbvV2R/plain/
all lines with 'ath10k' : http://0x0.st/oTEK.txt
sorry im a noob please tell if more info is needed

Last edited by parsody (2022-07-25 18:01:53)

Offline

#4 2022-04-26 08:05:07

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

Apr 26 13:09:00 arch kernel: ath10k_pci 0000:03:00.0: wmi service ready event not received
Apr 26 13:09:00 arch kernel: ath10k_pci 0000:03:00.0: could not init core (-110)
Apr 26 13:09:00 arch kernel: ath10k_pci 0000:03:00.0: could not probe fw (-110)

but there's no bogus event ID and the firmware doesn't crash.

Is there a parallel windows installation?
Output of "lsmod | grep wmi"?
Try to disable TLP and see whether the module starts reliably then.

Online

#5 2022-04-26 08:20:07

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

no windows i just hv arch linux installed
output of "lsmod | grep wmi" : http://0x0.st/oTEb.out (from affected boot)
module still failed after diabling tlp
journalctl of affected boot after disabling tlp: http://0x0.st/oTEc.txt

Last edited by parsody (2022-04-26 08:26:13)

Offline

#6 2022-04-26 08:40:30

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:
Apr 26 13:09:00 arch kernel: ath10k_pci 0000:03:00.0: wmi service ready event not received
Apr 26 13:09:00 arch kernel: ath10k_pci 0000:03:00.0: could not init core (-110)
Apr 26 13:09:00 arch kernel: ath10k_pci 0000:03:00.0: could not probe fw (-110)

but there's no bogus event ID and the firmware doesn't crash.

Is there a parallel windows installation?
Output of "lsmod | grep wmi"?
Try to disable TLP and see whether the module starts reliably then.

no windows i just hv arch linux installed
output of "lsmod | grep wmi" : http://0x0.st/oTEb.out (from affected boot)
module still failed after diabling tlp
journalctl of affected boot after disabling tlp:

Last edited by parsody (2022-07-25 18:04:36)

Offline

#7 2022-04-26 14:31:45

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

Since it happens in return of the NM scanning attempt and a couple of NICs don't like it, try to disable https://wiki.archlinux.org/title/Networ … domization
If that's not it and you disable NM and only start it somewhat after the boot, do you still get the "wmi service ready event not received" timeout?

Online

#8 2022-04-26 15:06:28

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:

Since it happens in return of the NM scanning attempt and a couple of NICs don't like it, try to disable https://wiki.archlinux.org/title/Networ … domization
If that's not it and you disable NM and only start it somewhat after the boot, do you still get the "wmi service ready event not received" timeout?

disabling NetworkManager and starting it with .bash_profile seems to hv worked!
thanks a lot for your time
however starting with .bash_profile is a bit of hassle since i hv to enter my pasword twice do you know any other way? i use startx btw
putting in .xinitrc doesn't work bc it has to be started as root
or how would i go about trying to find out why this is happening? would do if there's no way to start NM automatically without having to enter password twice
also boot is blazing fast now

Last edited by parsody (2022-04-26 15:16:54)

Offline

#9 2022-04-26 15:39:42

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

You didn't get away w/ disabling the MAC randomization?

Otherwise you could augment the NM unit, https://wiki.archlinux.org/title/Systemd#Drop-in_files and add

ExecStartPre=/usr/bin/sleep 10

to delay the NM start by 10 seconds.

Online

#10 2022-04-26 15:53:40

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:

You didn't get away w/ disabling the MAC randomization?

Otherwise you could augment the NM unit, https://wiki.archlinux.org/title/Systemd#Drop-in_files and add

ExecStartPre=/usr/bin/sleep 10

to delay the NM start by 10 seconds.

disabling randomized mac address did nothing
from what i understand doing sudo systemctl edit NetworkManager
i can override some values so i added the line in [service] section uncommented [service] and the line i left everything else commented
it didn't work still get the same error in journalctl

Last edited by parsody (2022-04-26 15:56:30)

Offline

#11 2022-04-26 15:56:42

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

systemctl show NetworkManager.service

Online

#12 2022-04-26 15:58:23

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:
systemctl show NetworkManager.service

http://0x0.st/oTI2.txt

Offline

#13 2022-04-26 16:03:28

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

Well, the ExecStartPre is clearly not there.

How exactly did you go about your first attempt?
Revert that.
The

sudo systemctl edit NetworkManager.service

nb. the line that says

### Lines below this comment will be discarded

You cannot just  muck around in the original service that's displayed below but have to add the augmentation above that line.
And make sure to use proper the Cases ("Service", not! "service")

Online

#14 2022-04-26 16:16:18

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:

Well, the ExecStartPre is clearly not there.

How exactly did you go about your first attempt?
Revert that.
The

sudo systemctl edit NetworkManager.service

nb. the line that says

### Lines below this comment will be discarded

You cannot just  muck around in the original service that's displayed below but have to add the augmentation above that line.
And make sure to use proper the Cases ("Service", not! "service")

ok now systemctl show NM shows the line i added and wifi module is loading reliably
but in middle of booting it says start job of NM is running counts to 13 sec, is it actually doing nothing for those 13 seconds? is there anyway so that NM service gets delayed by 10s not affecting boot process otherwise?

Last edited by parsody (2022-04-26 16:26:08)

Offline

#15 2022-04-26 20:02:34

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

You will probably get away w/ a much shorter delay (2-3 seconds?) - but if other services depend on the network and NM is what provides the network, there's no reasonable way to delay NM and not have it stall the boot.

Online

#16 2022-04-26 20:08:31

progandy
Member
Registered: 2012-05-17
Posts: 5,196

Re: [SOLVED]automating fixing wifi (reload module)

So with the delay in networkmanager it is now possible to start without reloading the module?
Maybe you can add the wifi module to the initramfs so it is loaded earlier and has more time before networkmanager is started so you can reduce the sleep even more or even remove it.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#17 2022-04-27 04:24:16

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:

You will probably get away w/ a much shorter delay (2-3 seconds?) - but if other services depend on the network and NM is what provides the network, there's no reasonable way to delay NM and not have it stall the boot.

thanks i will experiment more with time  tomorrow

Offline

#18 2022-04-27 04:26:50

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

progandy wrote:

So with the delay in networkmanager it is now possible to start without reloading the module?
Maybe you can add the wifi module to the initramfs so it is loaded earlier and has more time before networkmanager is started so you can reduce the sleep even more or even remove it.

how do i do that? i found some guides but they seem to be about dracut

Offline

#19 2022-04-27 06:21:50

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

https://wiki.archlinux.org/title/Mkinit … figuration
You'll likely also have to add the firmware and possibly (some of) the wmi module(s) but since the issue does not exist (is not confirmed) for reloading the module and google finds this problem a lot (mostly resume from suspend) and they all seem dell related, this might indeed be the HW too slow to wake up.

Online

#20 2022-04-27 06:31:13

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:

https://wiki.archlinux.org/title/Mkinit … figuration
You'll likely also have to add the firmware and possibly (some of) the wmi module(s) but since the issue does not exist (is not confirmed) for reloading the module and google finds this problem a lot (mostly resume from suspend) and they all seem dell related, this might indeed be the HW too slow to wake up.

yeah i do hv the problem half the time it doesn't wake after suspend i hv to reboot
that's probably a hw problem tho bc it was slow to wake up on windows too
well this seems like a lot work ig it would be best to stick with the plan of the script running after login anyway appreciate your help!

Last edited by parsody (2022-04-27 06:39:28)

Offline

#21 2022-04-27 06:43:07

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

For the S3 problem, you could likewise try to stop NM ahead and restart it w/ a delay, https://wiki.archlinux.org/title/Power_ … stem-sleep

Online

#22 2022-04-27 06:49:26

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:

For the S3 problem, you could likewise try to stop NM ahead and restart it w/ a delay, https://wiki.archlinux.org/title/Power_ … stem-sleep

sorry im totally clueless here

[Unit]
Description=%I sleep hook
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=-/usr/bin/systemctl stop %i
ExecStop=-/usr/bin/systemctl start %i

[Install]
WantedBy=sleep.target

as i understand i hv to stop NM before sleep and start it after sleep with delay of a few seconds? i hv no idea how do i that above is the example script from wiki

Offline

#23 2022-04-27 07:45:44

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

You just drop in the script and run "systemctl stop NetworkManager.service" "pre" and "sleep 5; systemctl start NetworkManager.service" "post"

Online

#24 2022-04-27 08:15:15

parsody
Member
Registered: 2022-04-21
Posts: 32

Re: [SOLVED]automating fixing wifi (reload module)

seth wrote:

You just drop in the script and run "systemctl stop NetworkManager.service" "pre" and "sleep 5; systemctl start NetworkManager.service" "post"

thanks a lot it worked i had no idea NM was causing the sleep issue

Offline

#25 2022-04-27 12:58:34

seth
Member
Registered: 2012-09-03
Posts: 51,269

Re: [SOLVED]automating fixing wifi (reload module)

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB