Web lists-archives.com

Re: [Asus x205ta] Wireless not working after suspend-resume




Ric Moore <wayward4now@xxxxxxxxx> writes:

> On 03/19/2018 11:57 AM, Leandro Noferini wrote:
>
>> I wrote a little script in /lib/systemd/system-sleep/brcmfmac like:
>
> Be careful when you "write a little script". Try this:
> https://askubuntu.com/questions/761180/wifi-doesnt-work-after-suspend-after-16-04-upgrade
>
> https://askubuntu.com/questions/761180/wifi-doesnt-work-after-suspend-after-16-04-upgrade

[...]


Greg Wooledge <wooledg@xxxxxxxxxxx> writes:

> On Mon, Mar 19, 2018 at 05:10:53PM -0400, Ric Moore wrote:
>> On 03/19/2018 11:57 AM, Leandro Noferini wrote:
>> 
>> > I wrote a little script in /lib/systemd/system-sleep/brcmfmac like:
>
> Also, anything *you* write for systemd locally as the sysadmin should
> be in /etc/systemd/system/ not in /lib.

Ok, I followed your kind suggestions and I wrote these two little
scripts in /usr/local/sbin/ (working called directly from prompt)

=====wifi-suspend.sh=======
systemctl stop network-manager.service
rmmod brcmfmac
rmmod brcmutil
rmmod cfg80211
=====wifi-suspend.sh=======

=====wifi-resume.sh=======
modprobe cfg80211
modprobe brcmutil
modprobe brcmfmac
systemctl start network-manager.service
=====wifi-resume.sh=======

And I tried to call them with these two systemd services

====wifi-suspend.service====
#/etc/systemd/system/wifi-resume.service
#sudo systemctl enable wifi-resume.service
[Unit]
Description=Stop networkmanager at suspend
Before=suspend.target
Before=hibernate.target
Before=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/wifi-suspend.sh

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

====wifi-resume.service====
#/etc/systemd/system/wifi-resume.service
#sudo systemctl enable wifi-resume.service
[Unit]
Description=Restart networkmanager at resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/wifi-resume.sh

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

But after resume wifi does not work....

What is wrong?

-- 
Ciao
leandro
http://6xukrlqedfabdjrb.onion/blog/
Alla bellezza preferisco la verità.
E il dubbio è l'unità di misura.

Attachment: signature.asc
Description: PGP signature