Jump to content

Wifi stability on Orange Pi Prime


Lazar Obradovic

Recommended Posts

Hi all, 

 

I was struggling to have a stable Wifi connection on my new Orange Pi Primes, and believe I found a solution, so I thought it's nice to share it ;)

 

Symptoms: 

Wifi would connect right after reboot, but would disappear if Orange Pi Prime was idle for about 30min.

The only way to reactivate would be to either pull the cable out (as there are no buttons yet), or to login via ethernet, perform ifconfig down && if config up. I didn't liked either of the options, so I decided to investigate. 

My log was full of: 

[89201.577208] RTL8723BS: nolinked power save enter
[89201.967063] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[89202.187266] RTL8723BS: nolinked power save leave
[89208.120724] RTL8723BS: nolinked power save enter
[89214.307901] RTL8723BS: nolinked power save leave

It's clear that power saving was a culprit, so I needed to find how to disable it.

 

Attempts to solve the issue

I tried disabling power saving using iwconfig command, but that didn't work:

$ sudo iwconfig wlan0 power off
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not permitted.

I also tried doing that from Network Manager, by editing /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf:

$ cat /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf 
[connection]
# 2 = power saving off
# 3 = power saving on
wifi.powersave = 2    

$ mv /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf /etc/NetworkManager/conf.d/default-wifi-powersave-off.conf

but that didn't work either (even after reboot).

 

Working solution

Seems that RTL8723B (Wifi driver user by Orange Pi Prime) can only set powermode during module load, so I created /etc/modprobe.d/r8723bs.conf with following content:

$ cat /etc/modprobe.d/r8723bs.conf
options r8723bs rtw_power_mgnt=0 rtw_enusbss=0


$ ls -lsa /etc/modprobe.d/r8723bs.conf
4 -rw-r--r-- 1 root root 47 Jan 11 10:07 /etc/modprobe.d/r8723bs.conf

(make sure ownership and permissions are right), and after a reboot, Wifi remained up and running for days.

 

Hope this helps someone.

Link to comment
Share on other sites

1 hour ago, Lazar Obradovic said:

Seems that RTL8723B (Wifi driver user by Orange Pi Prime) can only set powermode during module load

 

This is known but currently we implemented this only in a somewhat hackish attempt for Pine64/Pinebook (and obviously no one so far took care of OPi Prime): https://github.com/armbian/build/blob/91ce8682cf672c44061fbf03b611b9fcf1226624/config/sources/sun50iw1.conf#L66

 

No idea though how to solve this in a more generic way (or without additional hacks)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines