0

I have a Rock960 board running Ubuntu server. It suffers from a "bug" where SSH is extremely laggy because WiFi power management is turned on.

I've tried various solutions to permanently disable it:

None of them work (permanently). Something on the system is forcing power management on a few seconds after it's turned off, whether manually or through some config file. I've fixed this by running a bash script via rc.local which polls iw every few seconds and disables power management if it's turned on. This works, but it's frustrating not knowing what the actual problem is. Even running a cronjob every minute isn't enough.

The system is using NetworkManager as far as I can tell, but none of the configuration overrides seem to work.

Is there a way of figuring out what's enabling power management (perhaps via a log)?

The script, in case anyone finds it useful:

#!/bin/bash

management_off="Power Management: off"

while true; do
  status=`/sbin/iw wlan0 | grep "Power Management"`

  if  [ "$status" != "$management_off" ]; then
    /sbin/iw wlan0 set power_save off
  fi

  sleep 5

done
Josh
  • 150
  • Are you using tlp? https://askubuntu.com/questions/545841/installing-tlp-power-save-stopped-my-wifi-adapter-from-working – WinEunuuchs2Unix Jun 17 '19 at 15:18
  • It's installed, but /etc/default/tlp has WIFI_PWR_ON_AC=off and WIFI_PWR_ON_BAT=off. – Josh Jun 18 '19 at 16:26
  • Some people have to use cron job to turn it off every minute: https://unix.stackexchange.com/questions/269661/how-to-turn-off-wireless-power-management-permanently – WinEunuuchs2Unix Jun 18 '19 at 17:19
  • As I mentioned in my post, a minute isn't frequent enough. It renables within seconds. – Josh Jun 18 '19 at 22:30
  • My comment was to point out how other people have similar problems and what they did to solve them. I thought you might find their answers helpful. – WinEunuuchs2Unix Jun 18 '19 at 23:02
  • No problem - I think most of the common suggestions are in the second link. – Josh Jun 19 '19 at 12:47

1 Answers1

0

Change in /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf wifi.powersave = 2 this should disable it with Network-Manger.source git hub

Without Network-Manger you can create an udev rule. KERNEL=="wlan*", ACTION=="add", RUN+="/sbin/iwconfig wlan0 power off" For wlan* set the name of your interface.

nobody
  • 5,437
  • As I mentioned in my post, none of the recommended suggestions in those two links work e.g. altering default-wifi-powersave-on.conf. I've already done that and it has no effect.

    I'll try your second suggestion though.

    – Josh Jun 18 '19 at 16:22