Surface Pro 1796 Wifi not resuming after suspend

Have you tried this yet:

echo 1 | sudo tee /sys/bus/pci/rescan

That triggers a full rescan of the PCI bus after suspend, and may help fix your issue.

Reboot

Does not work, same result.

Well I hope someone else has some suggestions cause I'm running low on ideas.

Don't worry. Your help is much appreciated. My idea is, that systemd creates all the sockets first. Frankly I don't know where these things are beeing created. But when we could just kick that thing...

How about powering off your router completely, leave it off. Do a couple of suspend cycles to see if there is any difference.

Hmm, I could start an hotspot on my phone.

That would be good too. I want to know if your router is balking at randomized mac addresses. Try it without the hot spot first.

No, this router is in my house. I can connect anything to it. the router in my truck is strictly set up only to serve certain MACs. But let me shut down that thing anyway. It'll be a momen.

No. Same result w/ or w/o router or phone hotspot.

Kind of figured, but I just wanted to rule out the the other end as having involvement. I sure wish somebody had some fresh ideas as I'm running low.

Well, iam gonna call it a day. thanks for ur help.

Sorry I went through most of those steps on the other thread. I was hoping with different symptoms and hardware you'd have better luck. I'll keep my eyes open for any other fixes. It may be kernel related and if that's the case there's not much you can do except try kernel 4.4 or wait for new kernel updates.

I'll try the 3.16 Kernel now. This only takes a couple of minutes. I will have a kernel night sleep anyways and not doing it now will keep me awake :smile:

1 Like

You may get lucky on an oldy, good luck.

Sometimes there are differences between lid close suspend and power button suspend. Try the other method if you haven't already.

tried every available kernel. Everything older than 4.9 will not boot on this device. Tried the real time also. Nothing works out. I think the hardware is just to new. The battery is not recognized either. So iam giving it some time. Sticking around with the 4.17 because I don't see any instability right now.

Best of luck, hopefully updates will fix thing soon.

Yes!!! I don't know why but pulling the mwifiex_pcie before suspend and putting it back in after resume works now. What is the best place to script this?

Which DE are you using, I'm only familiar with KDE. Too bad you weren't doing reboots between all these changes. I'm assuming a reboot triggered a change and that's why it's working now.

(edit) I'll have to do some checking. I was thinking start and shutdown scripts, which is very easy. This may involve systemd which I'm not that familiar with using.

i found the solution here
Ubuntu Forum
I choosed the last option because it seems to be the most flexible. Created file '/etc/systemd/suspend-modules.conf'

[suchus@PSYCHO ~]$ cat /etc/systemd/suspend-modules.conf 
mwifiex_pcie

just list all the modules you want to kick before sleep (one per line).
Then i modified the script just a little

[suchus@PSYCHO ~]$ cat /usr/lib/systemd/system-sleep/unload-load_modules.sh 
#!/bin/sh
# unload/load modules before sleep/resume
# 
case $1 in
    pre)
        echo "Going to $2..."
	for mod in $(</etc/systemd/suspend-modules.conf); do
	    /usr/bin/modprobe -v -r $mod
	done
        ;;
    post)
        echo "Waking up from $2..."
	for mod in $(</etc/systemd/suspend-modules.conf); do
	    /usr/bin/modprobe -v $mod
	done
	;;
esac

U can easily try the script by just running it from shell. It must be executable of course. After reboot systemd will grab it everytime before suspend. Closing the lid works too. It takes sometimes half a minute for wifi to get up but mostly less than 10. Which i think is fine and an acceptable workaround until there is another fix around.

I was just writing a systemd unit file to unload your driver. You beat me to it good for you. Awesome work.

Forum kindly sponsored by