4

I have Ubuntu 16.04 LTS, my wifi was working perfectly but around one month ago every time after suspending the session my wifi doesn't work anymore, although the wifi-interface confirms that the connection has been established. The command

sudo service network-manager restart  

works fine, but I must call it every time I get back from suspending, and it's kind of annoying.

I followed the instructions of wifi still sleeping when resume, but unfortunately the proposed solution fails in my case when calling

sudo systemctl enable wifi-resume.service

returning "command not found". How could I generate a script to fix this problem?

More info on my wireless can be found here: http://paste.ubuntu.com/24334731/

bruco
  • 313
  • 1
  • 4
  • 13
  • The executable should be located in /bin/systemctl and be able to run without specifying the full path. It is part of the systemd package which comes preinstalled with 16.04. Please show the output of `apt policy systemd` to verify you have the necessary package installed. – chili555 Apr 10 '17 at 13:23
  • @chili555 here you are with the output you requested: `systemd: Installed: 229-4ubuntu16 Candidate: 229-4ubuntu16 Version table: *** 229-4ubuntu16 500 500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages 100 /var/lib/dpkg/status 229-4ubuntu10 500 500 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages 229-4ubuntu4 500 500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages` – bruco Apr 11 '17 at 08:58
  • How about: `ls -al /bin/systemctl` I wonder if you have a permissions issue. – chili555 Apr 11 '17 at 12:55
  • @chili555 that's what i get: `-rwxr-xr-x 1 root root 659848 janv. 18 23:04 /bin/systemctl` – bruco Apr 12 '17 at 08:37
  • I wonder if you have a 'path' issue, about which I know little. I will propose a solution in a few minutes. – chili555 Apr 12 '17 at 13:02
  • The answer here would work for you too: http://askubuntu.com/questions/898297/wifi-signal-icon-switches-to-ethernet-icon-up-down-arrows-after-suspend/899304#899304 – WinEunuuchs2Unix Apr 12 '17 at 17:15

3 Answers3

2

Both systemd and systemctl seem to be correct. However, to try to help solve your issue, please try:

sudo -i
/bin/systemctl enable wifi-resume.service
exit

Please post any errors or warnings.

chili555
  • 58,968
  • 8
  • 93
  • 129
  • I just tried again with the instructions of your answer http://askubuntu.com/questions/748113/wifi-still-sleeping-when-resume/748130?noredirect=1#comment1413928_748130 and this time it worked. – bruco Apr 13 '17 at 09:54
0

In my case, I "fixed" it with sudo ifconfic <wireless_card> up evey time I suspend the computer. It's not perfect, but it works eventually.

0

In the present case, after coming out of sleep my wifi was rfkill-blocked (normally this doesnt happen) and it only had to be unblocked.

(sidenote: I found out after trying to manually bring up the wifi interface with sudo ip link set wlp6s0 up -> output was: RTNETLINK answers: Operation not possible due to RF-kill)

solution was:

rfkill list       # (to show all interfaces, if anyone has soft or hard-block "yes" it cant be used)
# output:
#   2: phy0: Wireless LAN
#      Soft blocked: no
#      Hard blocked: no
sudo rfkill unblock wlan    # you can use the number or the name/category, see `man rfkill`

after unblocking (maybe check again with rfkill list), wifi was working again

MacMartin
  • 333
  • 2
  • 9