1

newbie Ubuntu MATE user here.

First off, I know this is a well documented issue, i've tried multiple solutions from various sites and none of them worked. I'm running Ubuntu 18.04.3, and whenever i suspend my computer (close the lid), wifi disables. i can't even get it back on using sudo service network-manager restart, so i don't know what the problem is.

If you want me to show you more information about my computer please let me know which commands to use, i'm not very experienced with Linux. here's my uname -a info:

Linux plex 5.0.0-31-generic #33~18.04.1-Ubuntu SMP Tue Oct 1 10:20:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

and my lspci info:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] (rev c5)
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Host Bridge
00:02.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Port
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Port
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Host Bridge
00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Port
00:08.0 Encryption controller: Advanced Micro Devices, Inc. [AMD] Device 1578
00:09.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 157d
00:09.2 Audio device: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Audio Controller
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 20)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 49)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 49)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 4a)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 5
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
02:00.0 Network controller: Qualcomm Atheros QCA6164 802.11ac Wireless Network Adapter (rev 20)
06:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] (rev 83)
2
1

Disabling WiFi power management solved this problem for me. In the file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf, I changed it to look like this:

[connection]
wifi.powersave = 2

Restart NetworkManager (sudo systemctl restart NetworkManager) and it should be go to go.

3
  • thank you for answering, but sadly this didn't resolve my problem. my settings were already set to 2, i restarted the network manager and it didn't start again. i really don't know what to do :(
    – plex
    Oct 14 '19 at 23:33
  • If none of the other suggestions (from your links) help, then I'm at a loss. Oct 14 '19 at 23:38
  • well, thanks anyway. if you know someone from this community that may know a solution that would be cool. i'll try some other solutions and answer if one of them works.
    – plex
    Oct 14 '19 at 23:48
0

The driver isn't mentioned but I'll assume it is ath10k_pci like mine. To verify use:

$ sudo lshw -c network

  *-network
       description: Wireless interface
       product: QCA6174 802.11ac Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:3c:00.0
       logical name: wlp60s0
       version: 32
       serial: 9c:b6:d0:10:37:f7
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath10k_pci driverversion=4.14.140-0414140-generic firmware=WLAN.RM.4.4.1-00079-QCARMSWPZ-1 ip=192.168.0.10 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:137 memory:dd200000-dd3fffff

Notice second last line "configuration" reveals driver=ath10k_pci. Using this information create the script:

sudo -H gedit /lib/systemd/system-sleep/ath10k-reset

with these lines:

#!/bin/sh

# NAME: /lib/systemd/system-sleep/ath10k-reset
# DESC: Resets  QCA6174 802.11ac WiFi after a long suspend.
# DATE: October 14. 2019.

MYNAME=$0

restart_wifi() {
    /usr/bin/logger $MYNAME 'restart_wifi BEGIN'
    /sbin/modprobe -v -r ath10k_pci
    /sbin/modprobe -v ath10k_pci
#    systemctl restart NetworkManager.service
    /usr/bin/logger 'systemctl restart NetworkManager.service (SUPPRESSED)'
    /usr/bin/logger $MYNAME 'restart_wifi END'
}

/usr/bin/logger $MYNAME 'case=[' ${1}' ]'
case "${1}/${2}" in
    hibernate|suspend|pre*)
      ;;
    resume|thaw|post*)
      restart_wifi;;
esac

Save the script and mark it executable with:

sudo chmod a+x /lib/systemd/system-sleep/ath10k-reset

After the next reboot the script will automatically run during suspend/resume.

11
  • have the same driver as yours, sorry for not providing it. i hope your answer works, but when i saved the script i got a warning saying that gedit-spell-language isn't supported. what is this issue? i made the script executable, but i don't know if it worked (given that warning). i'm sorry if i'm being a total noob right now.
    – plex
    Oct 15 '19 at 1:20
  • @plex To see it working (or anything else for that matter) after rebooting you should be able to use: journalctl | grep ath10k-reset after resuming from suspend. The real test though is to see if WiFi is working. Oct 15 '19 at 1:52
  • only the first command worked, i rebooted my system, suspended it and wifi is still disabled, i can't even restart it with a command, the only option is to reboot
    – plex
    Oct 15 '19 at 13:43
  • i forgot to tag you)
    – plex
    Oct 15 '19 at 14:12
  • You don't need to tag me under my own answer only if I comment under your question. What does sudo lshw -c network look like after resume? Any changes from before suspend? Oct 15 '19 at 15:15

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.