Hibernation & Resume

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Hibernation & Resume

Post by rene »

There's indication that this same issue was solved for RTL8169 by kernel 4.17. For Mint 19, 4.18.0-13 is available from Update Manager (View -> Linux kernels). Upgrading to that might be the simplest fix...
Appoloin
Level 3
Level 3
Posts: 174
Joined: Sun Apr 28, 2013 3:58 am

Re: Hibernation & Resume

Post by Appoloin »

Solved. I've updated the kernel to 4.18, backed out the previous changes, and added modprobe additions to the wifi-sleep.service and wifi-resume.service

/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=/sbin/modprobe -r ath10k_pci  
ExecStart=/bin/systemctl stop network-manager.service

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
wifi-resume.serivce

Code: Select all

[Unit]
Description=Enable networkmanager after sleep
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/sbin/modprobe ath10k_pci
ExecStart=/bin/systemctl restart network-manager.service

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Hibernation & Resume

Post by rene »

Appoloin wrote: Fri Dec 21, 2018 8:21 am Solved. I've updated the kernel to 4.18, backed out the previous changes, and added modprobe additions to the wifi-sleep.service and wifi-resume.service
Thanks for posting back; had never even noticed those service files (I don't use Wi-Fi). Yes, the additions make perfect sense in the context of the problem description. Only question: I suppose you tested that they were in fact necessary also on 4.18?

In any case, well done...
Appoloin
Level 3
Level 3
Posts: 174
Joined: Sun Apr 28, 2013 3:58 am

Re: Hibernation & Resume

Post by Appoloin »

The firmware is still crashing if the network is disconnected by applet or command line.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Hibernation & Resume

Post by rene »

Thanks once again; know what to advise a potential next poster with this problem then.
Locked

Return to “Scripts & Bash”