Wifi applet after resume from suspend
#1
I would appreciate if others could try this out and see if it fixes wifi applet dying on occasion after resuming from suspend in Mate.

Code:
sudo nano /etc/systemd/system/wifi-resume.service

Paste the follwoing and save:

Code:
#/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=/bin/systemctl restart network-manager.service

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

And lastly:

Code:
sudo systemctl enable wifi-resume.service
You can find me on IRC, Discord and Twitter


#2
Seems to do the trick. Just tested and came back from a suspend with wifi applet working an showing connection as normal.
#3
Is restarting the network manage service necessary? Or is just restarting the misbehaving nm-applet enough?

I thought I had some working code that would restart just the nm-applet, but whilst it does kill the applet, nm-applet doesn't want to start up again, so restarting network-manager is the best workaround for now.
#4
(06-26-2017, 10:53 PM)pfeerick Wrote: Is restarting the network manage service necessary? Or is just restarting the misbehaving nm-applet enough?

I thought I had some working code that would restart just the nm-applet, but whilst it does kill the applet, nm-applet doesn't want to start up again, so restarting network-manager is the best workaround for now.

Well the reason I suggested it and sought feedback is because nothing else worked for me :Sad
This is the first thing that has actually worked for me insofar - many connects and disconnects and the applet works corrently.
You can find me on IRC, Discord and Twitter


#5
(06-27-2017, 02:20 AM)Luke Wrote: Well the reason I suggested it and sought feedback is because nothing else worked for me Sad
This is the first thing that has actually worked for me insofar - many connects and disconnects and the applet works correctly.

I got close... can kill the applet, but I can't get the context right for restarting the applet. From a terminal, I can easily kill and restart it like "killall nm-applet && nm-applet &", but it seems the easiest way out using a systemd service is just restarting the whole network-manager stack. It's just annoying because it's only an icon playing up for me... wireless is still connected and working just fine. If more than that is happening for you, then maybe network-manager does need a restart anyway on resume. That's why I was trying to ask you before on the IRC what is the actual problem... wireless not working or just the icon being stupid. Sad Because it's the latter, we need more noise on this issue tracker, as it's a long standing bug that was thought to have been fix and has been reverted again.
#6
And note to self... if I ever start fiddling with network-manager and network-manager-gnome (swapping in new debian builds) can somebody hit me over the head with a good sized 2x4? I've been swapping packages in and out and having to work out how to recover the stock network-manager with no internet working :-( [following the 'has been fixed in upstream debian jessie' rabbithole rumor]  Big Grin

I meant to also mention in my last message that since the 21st of May, that restarting network-manager on resume is baked in as an option:
Code:
sudo systemctl enable restart-network-manager-after-resume
#7
(06-28-2017, 01:00 AM)pfeerick Wrote: And note to self... if I ever start fiddling with network-manager and network-manager-gnome (swapping in new debian builds) can somebody hit me over the head with a good sized 2x4? I've been swapping packages in and out and having to work out how to recover the stock network-manager with no internet working :-( [following the 'has been fixed in upstream debian jessie' rabbithole rumor]  Big Grin

I meant to also mention in my last message that since the 21st of May, that restarting network-manager on resume is baked in as an option:
Code:
sudo systemctl enable restart-network-manager-after-resume

So I take it that it hasn't been fixed upstream? That's a bummer. Like everyone else I have the issue with my PB but as I use the one access point most of the time, it's more of an aesthetic nuisance.

The systemd script at the top of the thread doesn't work for me - still have the dodgy double arrow icon. I haven't tried the systemd service you mention but I assume it will likewise not fix the issue.

M.
#8
(06-28-2017, 03:42 PM)falcon15500 Wrote:
(06-28-2017, 01:00 AM)pfeerick Wrote: And note to self... if I ever start fiddling with network-manager and network-manager-gnome (swapping in new debian builds) can somebody hit me over the head with a good sized 2x4? I've been swapping packages in and out and having to work out how to recover the stock network-manager with no internet working :-( [following the 'has been fixed in upstream debian jessie' rabbithole rumor]  Big Grin

I meant to also mention in my last message that since the 21st of May, that restarting network-manager on resume is baked in as an option:
Code:
sudo systemctl enable restart-network-manager-after-resume

So I take it that it hasn't been fixed upstream? That's a bummer. Like everyone else I have the issue with my PB but as I use the one access point most of the time, it's more of an aesthetic nuisance.

The systemd script at the top of the thread doesn't work for me - still have the dodgy double arrow icon. I haven't tried the systemd service you mention but I assume it will likewise not fix the issue.

M.

The systemd script I posted DOES solve the issue.
You can find me on IRC, Discord and Twitter


#9
(06-28-2017, 04:48 PM)Luke Wrote: The systemd script I posted DOES solve the issue.

Not so fast Luke! He said the script you posted at the top of the thread didn't fix it for him! :-P So either we have operator error, or a different issue Wink

(06-28-2017, 03:42 PM)falcon15500 Wrote: So I take it that it hasn't been fixed upstream? That's a bummer. Like everyone else I have the issue with my PB but as I use the one access point most of the time, it's more of an aesthetic nuisance.

I can't work out heads of tails of that. I see mention in the bug tracker that it is fixed in the debian jessie repo, but it seems there are too many dependencies to install that newer version cold turkey on xenial 16.04. Someone else says they've done their own fix, but have only provided x86/x64 builds, so no armhf/arm64 debs. I also mostly use just the one access point, so it's just an aesthetic nuisance for me also. That's why I was curious to know if network-manager is doing it's job or not. Namely, if when moving to a different access point, it it still connects, but the GUI applet just isn't updating. i.e. the output of 'nmcli c' saying that network-manager has connected to a pre-configured access point that wasn't in range when the system was put to sleep, without a restart of the service on resume. If it isn't connecting, then it obviously needs refreshing also.
#10
(06-28-2017, 06:35 PM)pfeerick Wrote:
(06-28-2017, 04:48 PM)Luke Wrote: The systemd script I posted DOES solve the issue.

Not so fast Luke! He said the script you posted at the top of the thread didn't fix it for him! :-P So either we have operator error, or a different issue Wink

(06-28-2017, 03:42 PM)falcon15500 Wrote: So I take it that it hasn't been fixed upstream? That's a bummer. Like everyone else I have the issue with my PB but as I use the one access point most of the time, it's more of an aesthetic nuisance.

I can't work out heads of tails of that. I see mention in the bug tracker that it is fixed in the debian jessie repo, but it seems there are too many dependencies to install that newer version cold turkey on xenial 16.04. Someone else says they've done their own fix, but have only provided x86/x64 builds, so no armhf/arm64 debs. I also mostly use just the one access point, so it's just an aesthetic nuisance for me also. That's why I was curious to know if network-manager is doing it's job or not. Namely, if when moving to a different access point, it it still connects, but the GUI applet just isn't updating. i.e. the output of 'nmcli c' saying that network-manager has connected to a pre-configured access point that wasn't in range when the system was put to sleep, without a restart of the service on resume. If it isn't connecting, then it obviously needs refreshing also.

Indeed a fix that works for one person is not a fix. That said, it has worked flawlessly for me for days now - over 3 different WiFi APs Smile
You can find me on IRC, Discord and Twitter




Possibly Related Threads…
Thread Author Replies Views Last Post
  Wifi doesn't work correctly Fredric92 1 4,189 08-10-2021, 08:39 AM
Last Post: Jean-Marc LACROIX
  Hibernation (suspend to disk) progress NoraCodes 4 9,050 08-28-2020, 03:46 AM
Last Post: ratel
  Flakey WIFI (problems authenticating, etc.) robbiemacg 6 10,214 12-15-2019, 04:31 AM
Last Post: matze79
  Wifi I/F on Pinebook 11.6" eblot 2 4,724 05-19-2019, 04:53 PM
Last Post: Shoananas
  Pinebook will not wake from suspend MECZero 6 9,608 12-02-2018, 12:17 PM
Last Post: oloturia
  WiFi on Xenial Minimal soupbowl 3 5,769 08-12-2018, 07:54 AM
Last Post: jblakeharris
Information How to manage Wifi in xenial-i3 i3wm image UPDATE MarkHaysHarris777 4 7,190 09-14-2017, 12:12 AM
Last Post: dahni
  Xenial Mate 0.7.5-88 - LCD off after resume nicole.f 4 6,284 07-22-2017, 07:48 PM
Last Post: pfeerick

Forum Jump:


Users browsing this thread: 2 Guest(s)