Atheros ath9k can't restart wifi after sleep mode

Hello,

I recently installed Manjaro on a laptop and the major problem I encounter with it is the wifi after sleep mode.
I made a research and saw that it was a common problem with many people.
From what I understood to fix this problem we can create a service that will unload/reload the driver of the wifi to make it work.

I checked this post and found that some people are disabling the wifi before suspending to enable it after resume, and some that disabling/enabling after resume.

I tried few services but none of them was working. It looks like that after re-enabling the driver, I can't set up the ip link (I don't know if what I'm saying make sense, I'm not very good at this).

Basically, I have a ath9k driver, and in the exemple of this service:

sudo -u $USER /bin/bash -lc 'nmcli networking off'
systemctl stop NetworkManager
ip link set wlp1s0  down
rmmod  ath9k
modprobe ath9k
ip link set wlp1s0 up
systemctl start NetworkManager
sudo -u $USER /bin/bash -lc 'nmcli networking on'
sudo -u $USER /bin/bash -lc 'nmcli r wifi off'
sudo -u $USER /bin/bash -lc 'nmcli r wifi on'

I have a error after trying to set up the ip link

# sudo -u $USER /bin/bash -lc 'nmcli networking off'
# systemctl stop NetworkManager
# ip link set wlp1s0  down
# rmmod  ath9k
# modprobe ath9k
# ip link set wlp1s0 up
Cannot find device "wlp1s0"

Here is my network status before going in sleep mode:

$ inxi -n
Network:   Device-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter driver: ath9k 
           IF: wlp1s0 state: up mac: 74:40:bb:47:aa:f5 
           Device-2: Qualcomm Atheros type: USB driver: btusb  

And here after:

$ inxi -n
Network:   Device-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter driver: ath9k 
           IF: wlp1s0 state: down mac: 46:16:3e:0e:db:56 
           Device-2: Qualcomm Atheros type: USB driver: btusb 

Here some output that I saw people was asking from other threads (in case it can be usefull):

$ hwinfo --netcard --wlan --bluetooth | grep -Ei "model\:|driver\:|status\:|cmd\:|file\:|detected\:" | grep -v "Config Status"
  Model: "Dell Vostro 3470"
  Driver: "ath9k"
  Device File: wlp1s0
  Link detected: yes
    Driver Status: ath9k is active
    Driver Activation Cmd: "modprobe ath9k"
  Model: "Qualcomm Atheros Bluetooth Device"
  Driver: "btusb"
    Driver Status: ath3k is active
    Driver Activation Cmd: "modprobe ath3k"
    Driver Status: btusb is active
    Driver Activation Cmd: "modprobe btusb"
$ pacman -Qsq linux | grep linux | grep -v -E '(arch|util|sys|api|firmware)'
linux56
$ inxi -Fxxxz
System:
  Host: kiggyComputer Kernel: 5.6.19-2-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 10.1.0 Desktop: KDE Plasma 5.19.3 tk: Qt 5.15.0 wm: kwin_x11 dm: SDDM 
  Distro: Manjaro Linux 
Machine:
  Type: Laptop System: Dell product: Inspiron 15-3573 v: 1.8.0 serial: <filter> 
  Chassis: type: 10 serial: <filter> 
  Mobo: Dell model: 0RK4VG v: A00 serial: <filter> UEFI: Dell v: 1.8.0 
  date: 10/03/2019 
Battery:
  ID-1: BAT0 charge: 32.9 Wh condition: 32.9/41.4 Wh (79%) volts: 17.1/14.8 
  model: SMP-SDI2.8 DELL GR43747 type: Unknown serial: <filter> status: Full 
CPU:
  Topology: Quad Core model: Intel Pentium Silver N5000 bits: 64 type: MCP 
  arch: Goldmont Plus rev: 1 L2 cache: 4096 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 8756 
  Speed: 796 MHz min/max: 800/2700 MHz Core speeds (MHz): 1: 775 2: 781 3: 768 
  4: 784 
Graphics:
  Device-1: Intel UHD Graphics 605 vendor: Dell driver: i915 v: kernel 
  bus ID: 00:02.0 chip ID: 8086:3184 
  Display: x11 server: X.Org 1.20.8 driver: intel unloaded: modesetting 
  alternate: fbdev,vesa compositor: kwin_x11 resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 605 (GLK 3) v: 4.6 Mesa 20.1.3 
  direct render: Yes 
Audio:
  Device-1: Intel vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:0e.0 
  chip ID: 8086:3198 
  Sound Server: ALSA v: k5.6.19-2-MANJARO 
Network:
  Device-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter 
  vendor: Dell driver: ath9k v: kernel port: f040 bus ID: 01:00.0 
  chip ID: 168c:0036 
  IF: wlp1s0 state: up mac: <filter> 
  Device-2: Qualcomm Atheros type: USB driver: btusb bus ID: 1-7:6 
  chip ID: 0cf3:e005 
Drives:
  Local Storage: total: 473.00 GiB used: 22.16 GiB (4.7%) 
  ID-1: /dev/sda vendor: Seagate model: ST500LM030-1RK17D size: 465.76 GiB 
  speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: SDM2 scheme: GPT 
  ID-2: /dev/sdb type: USB vendor: Kingston model: DataTraveler G3 size: 7.24 GiB 
  serial: <filter> rev: PMAP scheme: MBR 
Partition:
  ID-1: / size: 449.24 GiB used: 22.15 GiB (4.9%) fs: ext4 dev: /dev/sda2 
  ID-2: swap-1 size: 8.04 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda3 
Sensors:
  System Temperatures: cpu: 41.0 C mobo: 40.0 C sodimm: 29.0 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 187 Uptime: 18m Memory: 3.66 GiB used: 1.22 GiB (33.3%) 
  Init: systemd v: 245 Compilers: gcc: 10.1.0 Shell: bash v: 5.0.18 
  running in: konsole inxi: 3.0.37 

I'm really sorry if it the kind of post you saw quite often, but I read so many of them and didn't succeed to solve the problem :frowning:

Thanks in advance for your help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by