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
Seems to do the trick. Just tested and came back from a suspend with wifi applet working an showing connection as normal.
06-26-2017, 10:53 PM
(This post was last modified: 06-26-2017, 11:48 PM by pfeerick.
Edit Reason: removed what I thought was working code which doesn't appear to be working
)
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.
(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 :
This is the first thing that has actually worked for me insofar - many connects and disconnects and the applet works corrently.
06-27-2017, 09:23 PM
(This post was last modified: 06-27-2017, 09:36 PM by pfeerick.)
(06-27-2017, 02:20 AM)Luke Wrote: Well the reason I suggested it and sought feedback is because nothing else worked for me
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. 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.
06-28-2017, 01:00 AM
(This post was last modified: 06-28-2017, 01:13 AM by pfeerick.)
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]
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
(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]
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.
(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]
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.
(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
(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.
(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
(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
|