OpenWrt Forum Archive

Topic: Update on Linksys WRT1900AC support

The content of this topic has been archived between 16 Sep 2014 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

OK, thanks for testing it.

Experimenting a bit further it looks like it's probably a side effect of something else and not cpufreq scaling itself. Assuming it does what it's supposed to when I lock the CPU to 600MHz I still occasionally see slow runs in between faster ones. The faster ones then tend to be a bit flakier than before. It looks like it does *something*, just not what we want.

Edit: it's worth noting the slower runs tend to stick around 380mbps, which is similar to what you saw with your setup

(Last edited by leitec on 23 Sep 2015, 20:34)

leitec wrote:

OK, thanks for testing it.

Experimenting a bit further it looks like it's probably a side effect of something else and not cpufreq scaling itself. Assuming it does what it's supposed to when I lock the CPU to 600MHz I still occasionally see slow runs in between faster ones. The faster ones then tend to be a bit flakier than before. It looks like it does *something*, just not what we want.

Edit: it's worth noting the slower runs tend to stick around 380mbps, which is similar to what you saw with your setup

I wonder if it has something to do with which core is processing the interfaces?

can you check/force interrupt affinity to the same/different CPUs?

AFAIK, linux will eventually spread the load across both cores, but if you somehow start off with everything running on one core, it could act as if you are running at half speed

at least that's my gut reaction :-)

Yeah, that probably has something to do with it. Not necessarily the affinity for which processor handles the interrupt, but which one does the processing. RPS is at work there, so which processor takes the (hardware) interrupt isn't that important. If you look at /proc/softirqs while doing transfers, sometimes it seems to distribute the load between the two cores while other times it will mostly trigger on one or the other. I'm not sure if that's expected behavior or not.

You can set affinity specifically for RPS. I haven't experimented with that yet. Its default is set to 3, so it'll distribute over both cores. If you set it to 0 you get the old pre-RPS behavior where the core that takes the hardware interrupt processes the packet. That returns some of the bad, old, shaky behavior. (edit: I should say I've only experimented with setting it to zero, since I'm describing it smile

FWIW, I was able to test a vanilla OpenWrt CC image and config (except static IP on the WAN as before) between my old laptop and my wife's 2011 laptop. My laptop was still the iperf server on the WAN port of the router. In the "upstream" direction (standard iperf3 -- sends from client to server) I could not get it to go beyond 600mbps. In the other direction (iperf3 -R) I got 920mbps over several tests, although some were a bit shaky and moved between 800 and 900mbps.

The exact same config with the client switched out for my desktop went up to 930 in both directions as before.

(Last edited by leitec on 24 Sep 2015, 03:09)

Some of you guys may remember me for having an issue connection to my router with the openwrt install. I still have the same issue but I resolved the problem for the time being by being connected to the new router/modem that the ISP gave me.

So I started wondering since I have this awesome and powerful router that is blazing fast but being connected to a cheap modem/router device that maybe the first device is acting as a bottle neck? Do you think I am better of with just a modem because when I called the ISP that said that they could give me a device that is just the modem if I wanted it. In fact the technician believed that it was wrong for me to connect a router to there modem/router but it does seem to work with out any issues. So I think I am going to stick to this set up for the time being unless you guys think that the modem/router that the ISP gave me is like a donkey and I have a horse in the barn.

I am still having collectd issues with the final chaos calmer build...

Check out this sequence? Can someome confirm which libthread library should be used?

root@OpenWrt:~# opkg list | grep libpthread
libpthread - 1.1.11-1

root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/chaos_calm … ckages.gz.
[snip]
Signature check passed.

root@OpenWrt:~# opkg list | grep libpthread
libpthread - 0.9.33.2-1 - POSIX thread library
libpthread - 1.1.11-1

root@OpenWrt:~# /etc/init.d/collectd start
/usr/sbin/collectd: can't load library 'libpthread.so.0'
root@OpenWrt:~#


root@OpenWrt:~# opkg install libpthread
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Package libpthread (1.1.11-1) installed in root is up to date.

I don't know much about the package management stuff. Can someone confirm the right library that should be used?

thanks

Paul

paul.culmsee wrote:

I am still having collectd issues with the final chaos calmer build...

Check out this sequence? Can someome confirm which libthread library should be used?

root@OpenWrt:~# opkg list | grep libpthread
libpthread - 1.1.11-1

root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/chaos_calm … ckages.gz.
[snip]
Signature check passed.

root@OpenWrt:~# opkg list | grep libpthread
libpthread - 0.9.33.2-1 - POSIX thread library
libpthread - 1.1.11-1

root@OpenWrt:~# /etc/init.d/collectd start
/usr/sbin/collectd: can't load library 'libpthread.so.0'
root@OpenWrt:~#


root@OpenWrt:~# opkg install libpthread
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Package libpthread (1.1.11-1) installed in root is up to date.

I don't know much about the package management stuff. Can someone confirm the right library that should be used?

thanks

Paul


Check your /lib folder for the file. You should have something like that:

root@NAS:/lib# ls -l libpthread*
-rwxr-xr-x     1 root     root         65979 Sep  4  19:00 libpthread-0.9.33.2.so
lrwxrwxrwx    1 root     root              22 Sep 16 00:47 libpthread.so.0 -> libpthread-0.9.33.2.so

You may be missing the symbolic link.

I checked it and that file does not exist in the /lib folder at all!

root@OpenWrt:/lib# find / -name libpthr*
/overlay/upper/usr/lib/opkg/info/libpthread.prerm
/overlay/upper/usr/lib/opkg/info/libpthread.list
/overlay/upper/usr/lib/opkg/info/libpthread.postinst
/overlay/upper/usr/lib/opkg/info/libpthread.control
/usr/lib/opkg/info/libpthread.prerm
/usr/lib/opkg/info/libpthread.list
/usr/lib/opkg/info/libpthread.postinst
/usr/lib/opkg/info/libpthread.control


i.trankolov wrote:

Check your /lib folder for the file. You should have something like that:

root@NAS:/lib# ls -l libpthread*
-rwxr-xr-x     1 root     root         65979 Sep  4  19:00 libpthread-0.9.33.2.so
lrwxrwxrwx    1 root     root              22 Sep 16 00:47 libpthread.so.0 -> libpthread-0.9.33.2.so

You may be missing the symbolic link.

paul.culmsee wrote:

I checked it and that file does not exist in the /lib folder at all!

root@OpenWrt:/lib# find / -name libpthr*
/overlay/upper/usr/lib/opkg/info/libpthread.prerm
/overlay/upper/usr/lib/opkg/info/libpthread.list
/overlay/upper/usr/lib/opkg/info/libpthread.postinst
/overlay/upper/usr/lib/opkg/info/libpthread.control
/usr/lib/opkg/info/libpthread.prerm
/usr/lib/opkg/info/libpthread.list
/usr/lib/opkg/info/libpthread.postinst
/usr/lib/opkg/info/libpthread.control


i.trankolov wrote:

Check your /lib folder for the file. You should have something like that:

root@NAS:/lib# ls -l libpthread*
-rwxr-xr-x     1 root     root         65979 Sep  4  19:00 libpthread-0.9.33.2.so
lrwxrwxrwx    1 root     root              22 Sep 16 00:47 libpthread.so.0 -> libpthread-0.9.33.2.so

You may be missing the symbolic link.

Here you are:
https://dl.dropboxusercontent.com/u/177 … thread.tar

Untar, copy to /lib and create a symlink named libpthread.so.0 pointing to libpthread-0.9.33.2.so (ln -s libpthread-0.9.33.2.so libpthread.so.0) in the same directory (/lib).

paul.culmsee wrote:

I checked it and that file does not exist in the /lib folder at all!

IMHO

I would flash back to OEM, then a complete NEW flash of openwrt.

If you did a sysupdate from RC3 > CC 15.05 might be your root problem.

Who knows whats missing.

Yeah... I did a wget of the libpthread package from the opkg repositories and installed it from /tmp. That worked but my router became very unstable. I have just flashed back to Linksys fw, but I vaguely recall I need to go right back to OEM fw yeah?

(Tried to flash back to CC, bricked it and recovered to Linksys fw via the off/on trick)

gufus wrote:
paul.culmsee wrote:

I checked it and that file does not exist in the /lib folder at all!

IMHO

I would flash back to OEM, then a complete NEW flash of openwrt.

If you did a sysupdate from RC3 > CC 15.05 might be your root problem.

Who knows whats missing.

Does anyone know the terminal command to disable just the 5G wifi radio1/wlan1, and re-enable it?

IvanRaide wrote:

Trying to build a daemon that restarts 5G when necessary.  I've noticed that if I reboot (or run the command "wifi" that will do an down/up on wifi), 5G doesn't come up well enough for my 5G apple devices to connect. (common problem I believe).  I think I am close to getting a hack around this...

* what I'm thinking is: on startup, start this daemon, give it 1 minute or 2 to wait, look for anyone on 5G yet, if not, disable 5G radio (only) wait, enable.  you could kill it at this point, or try again, etc


iwinfo wlan1 assoclist | grep 'No such'  -- this will tell us if the 5G isnt connected to anything (this somewhat assumes you have a present 5G device that is always around (which I do), worse case just turning 5G on/off when no one is connected, so not a big deal either way....


But I cant figure out the syntax to make wlan1.  I believe it will be something like  iw phy phy1 interface add wlan1 type ap but that needs more.  Or something with netifd and /var/run/hostapd-phy1.conf.  I basically want to do whatever luci does when you hit disable and then enable on radio1, cause I have noticed that when I do that, the devices will eventually connect.

    toggle.className = 'cbi-button cbi-button-reset';
else
    toggle.className = 'cbi-button cbi-button-reload';

I'm struggling to get rrdtool working on my v1.

I've installed rrdtool1 package (apparently successfully) but for the life of me, I can't get it to work from the command line.

If I type: opkg install rrdtool1
I get: Package rrdtool1 (1.0.50-2) installed in root is up to date.

But then: rrdtool1
Gives: -ash: rrdtool1: not found

...from anywhere.

Frustrated sad Any ideas?

(Last edited by ChippyAft on 25 Sep 2015, 23:11)

ChippyAft wrote:

I'm struggling to get rrdtool working on my v1.

I've installed rrdtool1 package (apparently successfully) but for the life of me, I can't get it to work from the command line.

If I type: opkg install rrdtool1
I get: Package rrdtool1 (1.0.50-2) installed in root is up to date.

But then: rrdtool1
Gives: -ash: rrdtool1: not found

...from anywhere.

Frustrated sad Any ideas?

I don't know about this program/package, but maybe the executable name is different to the package name?

try:

opkg files rrdtool1

to list the files installed by the package.

@kaloz

I just wanted to say...

Thank You!

I'm enjoying running OpenWrt on my router. It works well.

Your efforts are to be commented.

Kind Regards

    Kevin

DavidMcWRT wrote:

I don't know about this program/package, but maybe the executable name is different to the package name?

try:

opkg files rrdtool1

to list the files installed by the package.

Hi David -
Many thanks for your advice - good thinking. Here's what I see:

root@WRT1900AC:~# opkg files rrdtool1
Package rrdtool1 (1.0.50-2) is installed on root and has the following files:
/usr/bin/rrdtool
/usr/bin/rrdupdate
root@WRT1900AC:~# cd /usr/bin
root@WRT1900AC:/usr/bin# rrdtool
-ash: rrdtool: not found
root@WRT1900AC:/usr/bin# ls -ail
[snip]
    521 -rwxr-xr-x    1 root     root         17568 Sep 24 17:07 rrdcgi
    478 -rwxrwxrwx    1 root     root         17644 Sep 24 17:07 rrdtool
    479 -rwxr-xr-x    1 root     root         13580 Sep 24 17:07 rrdupdate
[snip]
root@WRT1900AC:/usr/bin# 

@ChippyAft

rrdtool is the command you're after.

nitroshift

For me RC Final was very unstable.. there were some days with multiple lockups. However RC3 was very stable for me, so I've reverted back, and it's stable again.

Interesting thing that happened was someone had talked about changing the cpu profile to performance... I did that on RC3, and had a lock-up within an hour. Keep in mind, I've gone 30 days without a lock up on RC3.

Makes me wonder how the cpu or wifi is interacting with each other whilst CPU is running at 1200mhz? Maybe just coincidence?

(Last edited by davidc502 on 27 Sep 2015, 00:34)

davidc502 wrote:

Makes me wonder how the cpu or wifi is interacting with each other whilst CPU is running at 1200mhz? Maybe just coincidence?

I have...

# Set the cpu governor to performance (it will allways work on 1.2GHz)
# Set the CPU affinity of the wifi interfces to CPU1 (Core 2)

You see how hard mwlwifi is on CPU1 (Core 2)

/$ cat /proc/interrupts
           CPU0       CPU1       
 16:   26400218   26403255  armada_370_xp_irq   5  armada_370_xp_per_cpu_tick
 18:    5584144          0  armada_370_xp_irq  31  mv64xxx_i2c
 19:         21          0  armada_370_xp_irq  41  serial
 25:       1090          0  armada_370_xp_irq  45  ehci_hcd:usb1
 26:    2534274          0  armada_370_xp_irq   8  mvneta
 27:    1443409          0  armada_370_xp_irq  10  mvneta
 28:          0          0  armada_370_xp_irq  55  f10a0000.sata
 29:     294714          0  armada_370_xp_irq 113  f10d0000.nand
 69:          0          0  f1018140.gpio   0  gpio_keys
 70:          0          0  f1018140.gpio   1  gpio_keys
 87:        305   48639669  armada_370_xp_irq  59  mwlwifi
 88:         86   17681852  armada_370_xp_irq  60  mwlwifi
 89:          2          0  armada_370_xp_irq  51  f1060900.xor
 90:          2          0  armada_370_xp_irq  52  f1060900.xor
 91:          2          0  armada_370_xp_irq  94  f10f0900.xor
 92:          2          0  armada_370_xp_irq  95  f10f0900.xor
 93:     353023          0  armada_370_xp_msi_irq   0  xhci_hcd
IPI0:          0          0  CPU wakeup interrupts
IPI1:          0          0  Timer broadcast interrupts
IPI2:    2416328    2431697  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:     472841    1332341  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:          0          0  IRQ work interrupts
IPI7:          0          0  completion interrupts
Err:          0
gufus wrote:
davidc502 wrote:

Makes me wonder how the cpu or wifi is interacting with each other whilst CPU is running at 1200mhz? Maybe just coincidence?

I have...

# Set the cpu governor to performance (it will allways work on 1.2GHz)
# Set the CPU affinity of the wifi interfces to CPU1 (Core 2)

You see how hard mwlwifi is on CPU1 (Core 2)

/$ cat /proc/interrupts
           CPU0       CPU1       
 16:   26400218   26403255  armada_370_xp_irq   5  armada_370_xp_per_cpu_tick
 18:    5584144          0  armada_370_xp_irq  31  mv64xxx_i2c
 19:         21          0  armada_370_xp_irq  41  serial
 25:       1090          0  armada_370_xp_irq  45  ehci_hcd:usb1
 26:    2534274          0  armada_370_xp_irq   8  mvneta
 27:    1443409          0  armada_370_xp_irq  10  mvneta
 28:          0          0  armada_370_xp_irq  55  f10a0000.sata
 29:     294714          0  armada_370_xp_irq 113  f10d0000.nand
 69:          0          0  f1018140.gpio   0  gpio_keys
 70:          0          0  f1018140.gpio   1  gpio_keys
 87:        305   48639669  armada_370_xp_irq  59  mwlwifi
 88:         86   17681852  armada_370_xp_irq  60  mwlwifi
 89:          2          0  armada_370_xp_irq  51  f1060900.xor
 90:          2          0  armada_370_xp_irq  52  f1060900.xor
 91:          2          0  armada_370_xp_irq  94  f10f0900.xor
 92:          2          0  armada_370_xp_irq  95  f10f0900.xor
 93:     353023          0  armada_370_xp_msi_irq   0  xhci_hcd
IPI0:          0          0  CPU wakeup interrupts
IPI1:          0          0  Timer broadcast interrupts
IPI2:    2416328    2431697  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:     472841    1332341  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:          0          0  IRQ work interrupts
IPI7:          0          0  completion interrupts
Err:          0

Interesting.  So, since setting it up like this the lockups have stopped?

davidc502 wrote:

Interesting.  So, since setting it up like this the lockups have stopped?

Test it, and see what happens smile


Using username "root".
SSH implementation OpenSSH 6.8
Authenticating with public key "imported-openssh-key"


BusyBox v1.23.2 (2015-07-24 23:41:29 CEST) built-in shell (ash)

OpenWrt Chaos Calmer 15.05
Security is enabled, and your IP address has been logged.

root@AC1900M:~# uptime
15:59:42 up 3 days,  1:06,  load average: 0.00, 0.01, 0.04
root@AC1900M:~#

# create a copy of installed packages
opkg list-installed | cut -f 1 -d ' ' > /etc/config/packages.list
# Set the cpu governor to performance (it will allways work on 1.2GHz)
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
# Set the CPU affinity of the wifi interfces to CPU1 (Core 1)
echo 2 > /proc/irq/`cat /proc/interrupts | grep 'armada_370_xp_irq  59' | cut -f1 -d':' | cut -f2 -d' '`/smp_affinity
echo 2 > /proc/irq/`cat /proc/interrupts | grep 'armada_370_xp_irq  60' | cut -f1 -d':' | cut -f2 -d' '`/smp_affinity
# Increase the amount of reserved memory
echo 16384 > /proc/sys/vm/min_free_kbytes
echo 50 > /proc/sys/vm/vfs_cache_pressure
echo 1 > /proc/sys/vm/swappiness

http://www.gypsy-designs.com/1.jpg

(Last edited by gufus on 27 Sep 2015, 02:06)

Props to @gufus for his fan daemon. Don't know why someone hasn't made that the default setting. Much better.
I added a few logger outputs for my own benefit but it's well made. Thanks.

Appreciate it Gufus... I'll save the commands listed above, but will wait more time to see how other are doing before I go back to final. I have a wife that works from home, and she can't have interruptions.

A lot of good things were posted in this ginormous thread (7'824 posts!), but if you don't follow it very closely you miss also a lot of the good stuff. Could we please have a section in the router's wiki were we could add things like fan scripts, CPU governor settings etc.?