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)
Terrance
  • 41,612
  • 7
  • 124
  • 183
plex
  • 11
  • 2
  • 1
    What exactly have you tried? I had a similar problem, fixed it with disabling power management on the WiFi card. – ajgringo619 Oct 14 '19 at 22:51
  • @ajgringo619 i tried these methods: [https://www.youtube.com/watch?v=n49kukPf8HI] [https://askubuntu.com/questions/761180/wifi-doesnt-work-after-suspend-after-16-04-upgrade] [https://ubuntu-mate.community/t/yet-another-wifi-issue-after-suspend-in-ubuntu-mate-16-04-3/14688] and none of them worked. how did you disable power management? – plex Oct 14 '19 at 23:14

2 Answers2

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.

ajgringo619
  • 1,172
  • 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. – ajgringo619 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.

  • 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 01: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. – WinEunuuchs2Unix Oct 15 '19 at 01: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? – WinEunuuchs2Unix Oct 15 '19 at 15:15
  • no changes after resuming, wifi is still disabled. here is the output of sudo lshw -c network: https://pastebin.com/TbeAbMyW – plex Oct 16 '19 at 01:41
  • @plex I see you are running kernel 5 perhaps kernel 4.14 like I'm running or 4.19 will work. When you boot grub and select Advanced Options do you have previous kernel versions in your menu? – WinEunuuchs2Unix Oct 16 '19 at 02:56
  • How do i change the kernel? i don't know how to boot GRUB. is there going to be any massive diferences if i change my kernel? if that's the only solution then i'm wiliing to try it. – plex Oct 16 '19 at 16:11
  • Grub boots first but it sounds like yours is hidden: https://askubuntu.com/questions/347203/what-exactly-is-grub – WinEunuuchs2Unix Oct 16 '19 at 17:25
  • Another thing to try is rfkill list all is anything being blocked? – WinEunuuchs2Unix Oct 16 '19 at 22:09
  • only Bluetooth is soft blocked, everything else looks fine. i'll try to downgrade my kernel to 4.19 now, how do i do that? – plex Oct 18 '19 at 18:53