Wifi ceases to function after wake-up from suspend

Good evening,

when waking up from suspend (lid opening), often times, my Wi-Fi does not work any more. The hardware seems inaccessible, no scan is possible.
Restarting the NetworkManager.service solves the problem (nm-applet disappears, though). This is why I suspect the last update of systemd.

I'm on unstable, KDE.
Please help me narrow down the issue.

Data: journalctl of last boot

System:    Host: sumomo Kernel: 4.7.0-0-MANJARO x86_64 (64 bit gcc: 6.1.1) Desktop: KDE Plasma 5.7.3 (Qt 5.7.0)
           Distro: Manjaro Linux
Machine:   System: HP (portable) product: HP Spectre x360 Convertible
           Mobo: HP model: 804E v: 33.24 Bios: American Megatrends v: F.42 date: 06/22/2016
Battery    BAT0: charge: 46.7 Wh 100.0% condition: 46.7/46.7 Wh (100%)
           model: Hewlett-Packard Primary status: Full
CPU:       Dual core Intel Core i7-6500U (-HT-MCP-) cache: 4096 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10371
           clock speeds: max: 3100 MHz 1: 500 MHz 2: 499 MHz 3: 499 MHz 4: 499 MHz
Graphics:  Card: Intel HD Graphics 520 bus-ID: 00:02.0
           Display Server: X.Org 1.17.4 driver: intel Resolution: 1920x1080@60.00hz
           GLX Renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2)
           GLX Version: 3.0 Mesa 12.0.1 Direct Rendering: Yes
Audio:     Card Intel Sunrise Point-LP HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.7.0-0-MANJARO
Network:   Card: Intel Wireless 7265 driver: iwlwifi bus-ID: 02:00.0
           IF: wlo1 state: up mac: 18:5e:0f:76:e2:5b
Drives:    HDD Total Size: 256.1GB (40.0% used) ID-1: /dev/sda model: SAMSUNG_MZNTE256 size: 256.1GB
Partition: ID-1: / size: 92G used: 88G (98%) fs: ext4 dev: /dev/sda5
           ID-2: swap-1 size: 8.59GB used: 0.00GB (0%) fs: swap dev: /dev/sda4
Sensors:   System Temperatures: cpu: 37.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 218 Uptime: 2:25 Memory: 2710.5/7900.2MB Init: systemd Gcc sys: 6.1.1
           Client: Shell (bash 4.3.461) inxi: 2.3.0
1 Like

Try this. If it works, it will give you a temporary solution until you find a definite one.

1 Like

Thanks for the suggestion. I want to clarify: You mean loading and unloading the module on wake up from suspend? (For instance by systemd in /etc/systemd/system/resume@.service . )

I do it manually because it doesn't always happen and I'll also try to find another fix when I get the time to do it. You can include it in the service you mentioned, but be aware that problem doesn't happen only on resume (at least for me). There's some more info about WiFi troubleshooting here.

You might need to disable the power management for your wifi device.

Check out this link https://itechscotland.wordpress.com/2011/09/25/how-to-permanently-turn-off-wi-fi-power-management-in-ubuntu/. Though this is for ubuntu, I guess it will work for Manjaro as well.

1 Like

Here are the links from Arch forums.




1 Like

Same thing.
After last update.
After hibernate, wifi at network manager no working. Need restart networkmanager service.
Kernel 4.6

this helped me: downgrade networkmanager for 6 versions ago.

1 Like

Thanks for your input! I will report, if I find a solution.
Searching for answers, I came across this lid-open-related bug one should not confuse this with: https://bugs.archlinux.org/task/46465 .

I've seen this off and on for many releases but it was on Opensuse.
It is usually not 100% failure, but ofen enough to be annoying.

You can chase through settings and write scripts and all sorts of stuff, but in the end, I found it much easier to use the keyboard key comb or the physical switch that toggels Airplane Mode on, wait 3 seconds, then toggel it off again.

Fixes it 100% of time on my hardware.
(not tested on manjaro).

In my case this problem is not related with the hard switch. I can turn it on and off but it doesn't make a difference. It happens after a fresh boot or a resume, but not always. The easiest way I found to circumvent this is to unload and reload the driver (it was the first thing I tried to do anyway).

You misunderstand. I didn't suggest it was related to the a problem with switch.
Turning airplane mode ON, (shutting down the radios) in most distros triggers an unloading of the modules. Turning if off agina, triggers reloading the modules.

Therefore you can do this without dicking around at the command line trying to remember what the squence of commands.

By the way, this works on three different linux distros, as well as openbsd on twi different brands of the laptops ive tried it with.
The trick is to wait at least three seconds after turning airplane mode on to allow the module unload before turning it off again.

1 Like

Sorry. I missunderstood your point because when you mentioned the key comb or switch I immediately thought on the hard switch. I didn't even knew airplane mode caused the modules to unload. Thanks for the explanation. I"ll try that out. It's easier than writing.

EDIT: just tried it. Not only it doesn't work for me, as the modules remain loaded. I don't know if there's any difference between a hardware and a software airplane mode switch, but there shouldn't be a difference in what concerns to the modules. The reason I'm referring this is because I can't activate airplane mode by hardware, just by software. I tried it in both desktop and laptop (this issue only happens in my laptop though). Have you checked if the modules get unloaded in airplane mode? Maybe we're talking about different issues, or maybe manjaro/arch kernel behaves differently (it could also be the applet used to activate it). Does your card just stops working out of nowhere, or does it happen only after boot/resume?
About dicking around in the command line, you can just create an executable with both commands to unload and load the module. You can even put those commands in a .desktop file and put it in a menu or on the desktop. You can also make a keybind/shortcut for the executable. It isn't a big deal if you need to do it (like me, since airplane mode doesn't work).

So, in my case, if I'm fast enough entering my password this doesn't happen. And if I disable lock screen on resume, this issue is fixed. Some kind of timing problem with password management?

Correction: The issue is still present, but noticeably less frequent.

im having the same issue after the current stable update, it works after i restart network manager
its not a big deal to do that but i suspend my laptop alot and as you might imagine, its annoying after a while

i hope this gets patched in the next update

Same problem here on Xfce after the last update.

I had the same problem, and tried a lot of different solutions out there, that had worked for other people, to no avail. What I settled for in the end is not really a solution, but something I can live with; I wrote a small script to restart Network Manager, and made it so it would run as root without prompting for the password, and finally bound it to ctrl+alt+N keyboard shortcut.
Here is how if you are interested:

open a new file in the text editor of your choice (and of course substitute every "username" with your username):
systemctl restart NetworkManager
Save as: /home/username/restartnetman.sh
Make it owned by root:
sudo chown root.root /home/username/restartnetman.sh
Setting SetUID bit to make it executable for all and writable only for (and always run as) root:
sudo chmod 4755 /home/username/restartnetman.sh
Log in as root in a terminal (for example ctrl+alt+F3 will give you a new terminal, ctrl+alt+F7 to get back to user and GUI)
only for Manjaro Arch (for other distroes you might have to edit the real /etc/sudoers, and then you have to give caution and probably use visudo):
nano /etc/sudoers.d/10-installer and input:
Cmnd_Alias CMDS = /home/username/restartnetman.sh
In XFCE press super key (Windows key), write "Settings Manager" and hit eneter. Find "Keyboard," press the "Application Shortcuts" tab, and where it says command:
sudo /home/username/restartnetman.sh
Then press the key-combination you want (I use ctrl+alt+I). This method works for FXCE, if you use a different DE, google how to add shortcuts.

Sorry for over-explaining, just annoys me as a noob myself when i google, and things are not dumbed down enough for me :slight_smile: This sulution is very far from perfect in many ways, but works for me as the problem does not occur evry time a close the lid.

I appreciate you stepping this out line by line. I got overzealous without knowing the saving process of visudo and rewrote the 10-intaller without much in it at all. I believe that if i can get the original file back but cannot find it anywhere online.

I am currently getting this error

sudo: parse error in /etc/sudoers.d/10-installer near line 32
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

Besides a fresh install I am not sure what to do to get my sudo back.

etc/sudoers.d/10-installer should only have a

%wheel ALL = (ALL) ALL

All is well. Good learning experience

1 Like

Wow... this thread is really old and very likely out of date now.

If there are still issues please start a new thread with up-to-date information.

Forum kindly sponsored by