2

I have been searching through the forums for a general solution to this problem for 18.04 (such as this one or this one).

The first example was originally posted for 14.04 and tells me to add a script to the /etc/pm/sleep.d. I tried two different scripts:

#!/bin/bash
case "$1" in
thaw|resume)
sudo nmcli nm sleep false
sudo pkill -f wpa_supplicant
;;
*)
;;
esac
exit $?

and

#!/bin/sh

case "${1}" in
  resume|thaw)
    nmcli r wifi off && nmcli r wifi on ;;
esac

but neither of them worked. I'm not proficient enough in Linux to understand exactly what the scripts are doing but I do get that this should run when resuming from suspend (I did make it executable using sudo chmod +x). In fact just running

nmcli nm sleep false

in a terminal gave me "Error: argument 'nm' not understood"

An answer on this post says that sleep.d is no longer active as of 16.04 and that the script should be put in /lib/systemd/systemd-sleep.

The second post seems to be specific to Lenovo laptops as it says to run:

sudo tee /etc/modprobe.d/blacklist-ideapad.conf <<< "blacklist ideapad_laptop"

but I have an HP Pavilion with an Intel Corporation Wireless 3160[8086:08b3] rev (83), as per lspci | grep Network, and there is no "blacklist-ideapad.conf" file in /etc/modprobe.d

There is no hard switch on my laptop for the Wifi adapter so I was hoping someone could help me tweak these answers for my situation. How would I add a similar script to the systemd-sleep since its not a folder or script (that I can read anyway)?

Thanks for the help! Jeremy

0

When I'm right the module iwlwifi is for your wlan.

Please create the file /etc/modprobe.d/iwlwifi.conf with content

options iwlwifi remove_when_gone=1

Remove dev from PCIe bus if it is deemed inaccessible

Since then I had no Problem anymore with connection after wakeup from suspend to ram or suspend to disk.

More Option for the module modinfo iwlwifi | fgrep parm

  • Thanks for your response @nobody. I don't really understand the part about "removing dev from PCIe bus if it is deemed inaccessible". I don't even know how I would know if it were inaccessible, let alone where to begin to remove a dev. Also, to create the file would I use sudo touch /etc/modprobe.d/iwlwifi.conf – JJGabe Sep 16 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.