Hibernation on 4.15 kernel and ath10 firmware
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Hibernation on 4.15 kernel and ath10 firmware
I'm looking for a way to automate the enabling and disabling of the network. Kernel 4.8 was last kernel the ath10 firmware didn't crash on entering hibernation. But if the network was disabled before enter hibernation the laptop will successful enter and exit hibernation.
Option B is go back to kernel 4.4 if it's available for LM19
Option B is go back to kernel 4.4 if it's available for LM19
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Hibernation on 4.15 kernel and ath10 firmware
It looks like it's kernel 4.4 for a while yet. I tried the follow scripts but couldn't get them to work
SLEEP
AWAKE
SLEEP
Code: Select all
sudo -H xed /etc/systemd/system/wifi-sleep.service
Code: Select all
[Unit]
Description=Stop networkmanager before sleep
Before=suspend.target
Before=hibernate.target
Before=hybrid-sleep.target
[Service]
Type=oneshot
ExecStart=/bin/systemctl stop network-manager.service
[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
Code: Select all
systemctl enable wifi-sleep.service
Code: Select all
sudo -H xed /etc/systemd/system/wifi-resume.service
Code: Select all
[Unit]
Description=Enable networkmanager after sleep
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target
[Service]
Type=oneshot
ExecStart=/bin/systemctl start network-manager.service
[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
Code: Select all
systemctl enable wifi-resume.service
Re: Hibernation on 4.15 kernel and ath10 firmware
This should do it:
Create a script in
Don't forget to make it executable.
Even cleaner is probably to just unload the kernel driver that's creating the issue. Do
Create a script in
/lib/systemd/system-sleep
like this
Code: Select all
#!/bin/sh
case "$1" in
pre)
nmcli networking off
;;
post)
nmcli networking on
;;
esac
Even cleaner is probably to just unload the kernel driver that's creating the issue. Do
inxi -N
to find the driver name, then substitute it for <kernelDriver> in the below and use that for the script instead:Code: Select all
#!/bin/sh
case "$1" in
pre)
modprobe -r <kernelDriver>
;;
post)
modprobe <kernelDriver>
;;
esac
Re: Hibernation on 4.15 kernel and ath10 firmware
Thanks, I'll give a try.
P.S
I would argue my last post was not a hijacking, AndrewSmith and I are both looking for a similar if not the same solution to a problem.
P.S
I would argue my last post was not a hijacking, AndrewSmith and I are both looking for a similar if not the same solution to a problem.
Re: Hibernation on 4.15 kernel and ath10 firmware
His issue was trying to find a solution on how to run a script pre/post sleep.
You already had a solution for that but are struggling with a kernel driver.
So at the end of the day it's really quite different I think even though I basically gave you the same template I gave him, except for the actual command, but that's because it's just simpler than the implementation you've been working on. At least as long as my solution works for you, but it should.
Re: Hibernation on 4.15 kernel and ath10 firmware
It kind of worked, using "modprobe -r ath10k_pci" has stopped the firmware from crashing but there's a new error in the log
This like play whack-a-mole.
Code: Select all
Freezing user space processes ...
Freezing of tasks failed after 20.006 seconds (5 tasks refusing to freeze, wq_busy=0):
wpa_supplicant D 0 957 1 0x00000004
This like play whack-a-mole.
Re: Hibernation on 4.15 kernel and ath10 firmware
Does this also happen with the first version of the script I posted that turns networking off? If not, just use that.
Otherwise change the other script like this:
Otherwise change the other script like this:
Code: Select all
#!/bin/sh
case "$1" in
pre)
systemctl stop wpa_supplicant
modprobe -r ath10k_pci
;;
post)
modprobe ath10k_pci
systemctl start wpa_supplicant
;;
esac
Re: Hibernation on 4.15 kernel and ath10 firmware
"nmcli networking" didn't work, the log still showed the firmware was crashing
Re: Hibernation on 4.15 kernel and ath10 firmware
I used the network applet to disable the wifi. "systemctl stop wpa_supplicant" didn't work.
Code: Select all
Freezing of tasks failed after 20.010 seconds (6 tasks refusing to freeze, wq_busy=0):
wpa_supplicant D 0 902 1 0x00000004
Re: Hibernation on 4.15 kernel and ath10 firmware
Oh weird. Wifi off from the applet should be including in the complete networking off.
Because of that I'm wondering if this is a timing issue. You could try to add a
nmcli radio wifi off
would only turn the wifi off, but it should really be the same thing. Because of that I'm wondering if this is a timing issue. You could try to add a
sleep 5
to the script after turning the networking off in the script.Re: Hibernation on 4.15 kernel and ath10 firmware
I tried "nmcli networking off" with sleep 5 and the firmware crashed,
Re: Hibernation on 4.15 kernel and ath10 firmware
Have you considered disabling NetworkManager and using /etc/network/interfaces to control your network devices? This solved my suspend problem; I would think that suspend/hibernate are related in how they shutdown devices.
Re: Hibernation on 4.15 kernel and ath10 firmware
You mean ifdown and ifup
Re: Hibernation on 4.15 kernel and ath10 firmware
Yes - should have clarified that /etc/network/interfaces is the config file, not the actual command(s).
Re: Hibernation on 4.15 kernel and ath10 firmware
For a while I've been using the 4.4 kernel but after an update to wpasupplicant this kernel/firmware in now affected by this bug