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.

JohnnySL wrote:

My router just completely crashed and rebooted a moment ago. scratching my head why that happened. Of course i don't have an external syslog server :facepalm:

@Makarel: what is true is that the kernel log shows that cpu throttling functionality is disabled for the 385, and that it is always running at 1.6ghz. That might make it run a bit hotter. Can agree on that.
can't remember seeing very high cpu temps though.

hmm, it's maybe a little hot now (even though it is idle and ambient temperature is ~18 degrees):
69.4 degrees C. if read this correctly?

#DDR~ cat hwmon0/temp1_input
42500
#WIFI~ cat hwmon0/temp2_input
44188
#CPU~ cat hwmon1/temp1_input
69405


You read correctly. My v1, starts to crash very often when the CPU reaches temps above 65C. Can you try to put a fan above it, just to see if the temp will go down and the crash rate decreases?

I'm not seeing these speed issues and my temp is up there.  My v1 router has been up for days and I still can max out my connection at 120mbps from wifi to wan.

I also have CONFIG_ARMADA_THERMAL=y and I see my cpu speeds dropped by half at idle.


root@ZOMGWTFBBQWIFI:~# sensors
armada_thermal-virtual-0
Adapter: Virtual device
temp1:        +68.9C

tmp421-i2c-0-4c
Adapter: mv64xxx_i2c adapter
temp1:        +54.3C
temp2:        +55.2C

root@ZOMGWTFBBQWIFI:~# grep . /sys/kernel/debug/clk/cpu?/clk_rate
/sys/kernel/debug/clk/cpu0/clk_rate:600000000
/sys/kernel/debug/clk/cpu1/clk_rate:600000000
root@ZOMGWTFBBQWIFI:~# yes > /dev/null &
root@ZOMGWTFBBQWIFI:~# yes > /dev/null &
root@ZOMGWTFBBQWIFI:~# grep . /sys/kernel/debug/clk/cpu?/clk_rate
/sys/kernel/debug/clk/cpu0/clk_rate:1200000000
/sys/kernel/debug/clk/cpu1/clk_rate:1200000000
JohnnySL wrote:

My router just completely crashed and rebooted a moment ago. scratching my head why that happened. Of course i don't have an external syslog server :facepalm:

@Makarel: what is true is that the kernel log shows that cpu throttling functionality is disabled for the 385, and that it is always running at 1.6ghz. That might make it run a bit hotter. Can agree on that.
...

you can log to attached usb flash

dmesg -c >> path.to.file
logread -f > path.to.file &

regarding throttling according to this http://www.marvell.com/wireless/avastar/88W8864/

Integrated ARM® Cortex A9 CPU and internal SRAM enables peak data rates approaching theoretical limits while offloaded the host CPU from WLAN processing

the wifi chip has a cpu inside it maybe that one is having problems.. wifi chips are usually very hot.. having a full arm core wont make it colder..

Hmm, wifi doesn't go above 47 degrees. CPU is now 74 though :-x
Is underclocking an option? I rather underclock to test if it runs a little cooler

JohnnySL wrote:

Hmm, wifi doesn't go above 47 degrees. CPU is now 74 though :-x
Is underclocking an option? I rather underclock to test if it runs a little cooler

I'm running with armada thermal management support.  You can try it if you want.  This is the diff of my build tree which has the modified kernel config.

diff --git a/target/linux/mvebu/base-files/sbin/fan_ctrl.sh b/target/linux/mvebu/base-files/sbin/fan_ctrl.sh
index 06e4621..1f717d8 100755
--- a/target/linux/mvebu/base-files/sbin/fan_ctrl.sh
+++ b/target/linux/mvebu/base-files/sbin/fan_ctrl.sh
@@ -1,8 +1,14 @@
 #!/bin/sh

-CPU_TEMP=`cut -c1-2 /sys/class/hwmon/hwmon2/temp1_input`
-DDR_TEMP=`cut -c1-2 /sys/class/hwmon/hwmon1/temp1_input`
-WIFI_TEMP=`cut -c1-2 /sys/class/hwmon/hwmon1/temp2_input`
+WIFI_TEMP_FILE=`find /sys/class/hwmon/hwmon*/ -name temp2_input`
+DDR_TEMP_FILE=`echo $WIFI_TEMP_FILE | sed s/temp2/temp1/`
+CPU_TEMP_FILE=`find /sys/class/hwmon/hwmon*/ -name temp1_input | grep -v $DDR_TEMP_FILE`
+
+FAN_CTRL=`find /sys/devices -name pwm1`
+
+CPU_TEMP=`cut -c1-2 $CPU_TEMP_FILE`
+DDR_TEMP=`cut -c1-2 $DDR_TEMP_FILE`
+WIFI_TEMP=`cut -c1-2 $WIFI_TEMP_FILE`

 CPU_LOW=85
 CPU_HIGH=95
@@ -11,14 +17,6 @@ DDR_HIGH=75
 WIFI_LOW=100
 WIFI_HIGH=115

-if [ -d /sys/devices/pwm_fan ];then
-       FAN_CTRL=/sys/devices/pwm_fan/hwmon/hwmon0/pwm1
-elif [ -d /sys/devices/platform/pwm_fan ];then
-       FAN_CTRL=/sys/devices/platform/pwm_fan/hwmon/hwmon0/pwm1
-else
-       exit 0
-fi
-
 if [ "$CPU_TEMP" -ge "$CPU_HIGH" -o "$DDR_TEMP" -ge "$DDR_HIGH" -o "$WIFI_TEMP" -ge "$WIFI_HIGH" ];then
        echo "255" > $FAN_CTRL
 elif [ "$CPU_TEMP" -ge "$CPU_LOW" -o "$DDR_TEMP" -ge "$DDR_LOW" -o "$WIFI_TEMP" -ge "$WIFI_LOW" ];then
@@ -26,3 +24,4 @@ elif [ "$CPU_TEMP" -ge "$CPU_LOW" -o "$DDR_TEMP" -ge "$DDR_LOW" -o "$WIFI_TEMP"
 else
        echo "0" > $FAN_CTRL
 fi
+
diff --git a/target/linux/mvebu/config-3.18 b/target/linux/mvebu/config-3.18
index a5eac43..c04a7b7 100644
--- a/target/linux/mvebu/config-3.18
+++ b/target/linux/mvebu/config-3.18
@@ -28,6 +28,7 @@ CONFIG_ARM=y
 CONFIG_ARMADA_370_CLK=y
 CONFIG_ARMADA_370_XP_TIMER=y
 CONFIG_ARMADA_38X_CLK=y
+CONFIG_ARMADA_THERMAL=y
 CONFIG_ARMADA_XP_CLK=y
 CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ATAG_DTB_COMPAT=y
@@ -97,6 +98,8 @@ CONFIG_CPU_V7=y
 CONFIG_CRC16=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_WORKQUEUE=y
 CONFIG_CRYPTO_XZ=y
 CONFIG_DCACHE_WORD_ACCESS=y
 CONFIG_DEBUG_INFO=y
@@ -195,6 +198,7 @@ CONFIG_HAVE_UID16=y
 CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HIGHMEM=y
 # CONFIG_HIGHPTE is not set
+CONFIG_HWMON=y
 CONFIG_HZ_FIXED=0
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -208,7 +212,8 @@ CONFIG_IRQ_WORK=y
 CONFIG_LEDS_GPIO=y
 # CONFIG_LEDS_REGULATOR is not set
 CONFIG_LIBFDT=y
-CONFIG_LOG_BUF_SHIFT=14
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_LOG_CPU_MAX_BUF_SHIFT=14
 CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_MACH_ARMADA_370=y
@@ -314,6 +319,7 @@ CONFIG_RWSEM_SPIN_ON_OWNER=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_SCHED_HRTICK=y
 # CONFIG_SCSI_DMA is not set
+CONFIG_SENSORS_PWM_FAN=y
 CONFIG_SERIAL_8250_DW=y
 CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
@@ -327,6 +333,15 @@ CONFIG_SWCONFIG=y
 CONFIG_SWIOTLB=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THERMAL=y
+# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
+# CONFIG_THERMAL_EMULATION is not set
+# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
+CONFIG_THERMAL_GOV_STEP_WISE=y
+# CONFIG_THERMAL_GOV_USER_SPACE is not set
+CONFIG_THERMAL_OF=y
 # CONFIG_THUMB2_KERNEL is not set
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_STATS=y
@@ -344,7 +359,6 @@ CONFIG_USE_OF=y
 CONFIG_VECTORS_BASE=0xffff0000
 CONFIG_VFP=y
 CONFIG_VFPv3=y
-# CONFIG_XEN is not set
 CONFIG_XPS=y
 CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_BCJ=y
nyt wrote:
JohnnySL wrote:

Hmm, wifi doesn't go above 47 degrees. CPU is now 74 though :-x
Is underclocking an option? I rather underclock to test if it runs a little cooler

I'm running with armada thermal management support.  You can try it if you want.  This is the diff of my build tree which has the modified kernel config.

Very interesting. Shouldn't I skip the fan script and the kernel option CONFIG_SENSORS_PWM_FAN?
(As the V2 i have doesn't have a fan)

(Last edited by JohnnySL on 3 Nov 2015, 20:47)

@JohnnySL
So I've installed DD-WRT no problems so far.

I've set up 5Ghz WIFI to use channel 132 upper with a channel-width of 80mhz.

So it is indeed possible to use channels higher than 100 with DD-WRT.

Could you have a quick check what your current CPU temperature is? (should be visible in the gui even)
and maybe post the dmesg output as well? am curious if CPU_IDLE function is enabled again in the DD-WRT build.

JohnnySL wrote:

Could you have a quick check what your current CPU temperature is? (should be visible in the gui even)
and maybe post the dmesg output as well? am curious if CPU_IDLE function is enabled again in the DD-WRT build.

That was actually something i was looking at:
My CPU temp is quite high and rapidly increases by a few degrees centigrade when using speedtest.net:
CPU Temperature
CPU 75.5 °C / WL0 44.5 °C / WL1 45.9 °C

Mine is just as hot, if i don't put  table fan on top to cool it. (53 degrees with the noisy fan on)
my assumption is that this is because the CPU_IDLE  function is disabled, due to a possibility of a hanging kernel when doing really heavy IO.
I'm actually thinking about reverting that patch, as usually a home router doesn't do "heavy IO" for a long time.

v2 gets hot sad

v1 + dd-wrt

13:35:45 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:46 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:47 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:48 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:49 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:50 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:51 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:52 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:53 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:54 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:55 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100
13:35:56 CPUtemp=62 WLOtemp=50 WL1temp=52 fanstatus=100

JohnnySL wrote:

Mine is just as hot, if i don't put  table fan on top to cool it. (53 degrees with the noisy fan on)
my assumption is that this is because the CPU_IDLE  function is disabled, due to a possibility of a hanging kernel when doing really heavy IO.
I'm actually thinking about reverting that patch, as usually a home router doesn't do "heavy IO" for a long time.

Is it adversely affection you're routers performance or functioning of the router?

built an image from r47236 (defaults to 3.18.23 and mwlwifi version 10.3.0.12)
so far on wrt1900ac v2 (2 days):
- no ssh session stalls
- no hard lockups (like with 1.3.0.8)
- 75 deg
- 2000 interrupts per second
- at 200 mbps wifi <-> nat <-> 87% cpu idle, 10% sirq

(Last edited by risk on 3 Nov 2015, 22:04)

@risk Try htop so you can see both cores

@northbound, even with htop my cpu's never crosses 20% per core. and when idling it shows 0%

@JohnnySL I have a v1 so it may be different. Hmm.

@northbound: jup.
Currently running into a new issue. I've got native IPV6 added today and now my router crashes roughly every 3 hours <sigh>. It does it even when cooling the cpu with a fan (cpu <50 degrees c)
Seriously thinking about swapping back to my old router and chucking this thing in a corner for the rest of the year. Think i'll try stock CC tomorrow with the updated driver and see if that is more stable, might even go back to stock linksys code for a while, and use it just as an ap.

northbound wrote:

@JohnnySL I have a v1 so it may be different. Hmm.

If you would, let me know if the soft irq has been fixed, and I'll download and install again.

Thanks,

davidc502 wrote:
northbound wrote:

@JohnnySL I have a v1 so it may be different. Hmm.

If you would, let me know if the soft irq has been fixed, and I'll download and install again.

Thanks,

There has not been a commit yet from kaloz . Still waiting.

first , i brick my router , and now i'm trying to unblrick it with my macbook air with usb to ttl . first try i get Marvell> . then typed reset after that . i just get
BootROM: Bad header at offset 03F80000
BootROM: Bad header at offset 03F90000
BootROM: Bad header at offset 03FA0000
BootROM: Bad header at offset 03FB0000
BootROM: Bad header at offset 03FC0000
BootROM: Bad header at offset 03FD0000
BootROM: Bad header at offset 03FE0000
BootROM: Bad header at offset 03FF0000
BootROM: Trying UART

i tried press ESC  with no luck . is there any thing i can do  . i have linksys wrt1900ac v1

@bdaweesh: did you try the 4-times reset trick already to switch to the other bootrom?

@all: managed to capture my router crash, when using IPV6:

Wed Nov  4 16:29:41 2015 kern.alert kernel: [ 4162.623720] Unable to handle kernel paging request at virtual address 0000258c
Wed Nov  4 16:29:41 2015 kern.alert kernel: [ 4162.630986] pgd = c0004000
Wed Nov  4 16:29:41 2015 kern.alert kernel: [ 4162.633714] [0000258c] *pgd=00000000
Wed Nov  4 16:29:41 2015 kern.emerg kernel: [ 4162.637314] Internal error: Oops: 17 [#1] SMP ARM
Wed Nov  4 16:29:41 2015 kern.warn kernel: [ 4162.642036] Modules linked in: pppoe ppp_async iptable_nat pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_REJECT ipt_MASQUERADE
Wed Nov  4 16:29:41 2015 kern.warn kernel: [ 4162.733832] Workqueue: phy0 ieee80211_iface_work [mac80211]

Does anybody have an idea? I've opened a bug as wel

(Last edited by JohnnySL on 4 Nov 2015, 16:55)

JohnnySL wrote:

@bdaweesh: did you try the 4-times reset trick already to switch to the other bootrom?

@all: managed to capture my router crash, when using IPV6:

Wed Nov  4 16:29:41 2015 kern.alert kernel: [ 4162.623720] Unable to handle kernel paging request at virtual address 0000258c
Wed Nov  4 16:29:41 2015 kern.alert kernel: [ 4162.630986] pgd = c0004000
Wed Nov  4 16:29:41 2015 kern.alert kernel: [ 4162.633714] [0000258c] *pgd=00000000
Wed Nov  4 16:29:41 2015 kern.emerg kernel: [ 4162.637314] Internal error: Oops: 17 [#1] SMP ARM
Wed Nov  4 16:29:41 2015 kern.warn kernel: [ 4162.642036] Modules linked in: pppoe ppp_async iptable_nat pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_REJECT ipt_MASQUERADE
Wed Nov  4 16:29:41 2015 kern.warn kernel: [ 4162.733832] Workqueue: phy0 ieee80211_iface_work [mac80211]

Does anybody have an idea? I've opened a bug as wel

Are you still using you're own compiled build built of trunk?  If so you might want to try something more stable and tested.

bdaweesh wrote:

first , i brick my router , and now i'm trying to unblrick it with my macbook air with usb to ttl . first try i get Marvell> . then typed reset after that . i just get
BootROM: Bad header at offset 03F80000
BootROM: Bad header at offset 03F90000
BootROM: Bad header at offset 03FA0000
BootROM: Bad header at offset 03FB0000
BootROM: Bad header at offset 03FC0000
BootROM: Bad header at offset 03FD0000
BootROM: Bad header at offset 03FE0000
BootROM: Bad header at offset 03FF0000
BootROM: Trying UART

i tried press ESC  with no luck . is there any thing i can do  . i have linksys wrt1900ac v1

Your bootloader is corrupt. Please read the appropriate section on how to recover from this here: http://wiki.openwrt.org/toh/linksys/wrt1900ac

nitroshift

davidc502 wrote:
northbound wrote:

@JohnnySL I have a v1 so it may be different. Hmm.

If you would, let me know if the soft irq has been fixed, and I'll download and install again.

Thanks,

FYI
https://github.com/kaloz/mwlwifi/issues/43

JohnnySL wrote:

Hmm, wifi doesn't go above 47 degrees. CPU is now 74 though :-x
Is underclocking an option? I rather underclock to test if it runs a little cooler

If yours is like a v1 in this respect.
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
the only other option is ondemand
scaling_setspeed is unsupported
There may be something I am missing though
possibly set scaling_max_freg same as scaling_min_freq.

(Last edited by northbound on 5 Nov 2015, 00:23)

Sorry, posts 8476 to 8475 are missing from our archive.