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


  Reply
#2
Seems to do the trick. Just tested and came back from a suspend with wifi applet working an showing connection as normal.
  Reply
#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.
  Reply
#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


  Reply
#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.
  Reply
#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
  Reply
#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.
  Reply
#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


  Reply
#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.
  Reply
#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


  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Wifi I/F on Pinebook 11.6" eblot 2 373 05-19-2019, 04:53 PM
Last Post: Shoananas
  Pinebook will not wake from suspend MECZero 6 681 12-02-2018, 12:17 PM
Last Post: oloturia
  WiFi on Xenial Minimal soupbowl 3 743 08-12-2018, 07:54 AM
Last Post: jblakeharris
  Flakey WIFI (problems authenticating, etc.) robbiemacg 5 684 01-11-2018, 12:44 PM
Last Post: naviathan
Information How to manage Wifi in xenial-i3 i3wm image UPDATE MarkHaysHarris777 4 901 09-14-2017, 12:12 AM
Last Post: dahni
  Xenial Mate 0.7.5-88 - LCD off after resume nicole.f 4 368 07-22-2017, 07:48 PM
Last Post: pfeerick

Forum Jump:


Users browsing this thread: 1 Guest(s)