[Solved] Archer C7 V2.0 Overclock

#57

you can do something like:
dd if=/dev/mtd0 of=/tmp/mtd0.bak ( this will save the original u-uboot ), you don't need anything else to recover ( with a programmer ) from a bad u-boot flash

0 Likes

#58

this is what mine says:
[ 0.000000] Clocks: CPU:1480.000MHz, DDR:760.000MHz, AHB:380.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 2582784387 ns
[ 0.000003] sched_clock: 32 bits at 740MHz, resolution 1ns, wraps every 2902004735ns
[ 0.004955] Calibrating delay loop... 738.09 BogoMIPS (lpj=3690496)

0 Likes

#59

you just type sleep 120 or something larger and start a stopwatch at the same time

0 Likes

#60

Run sleep 60 and use your watch to see if command returns after 60 seconds.

That's why all your tests results are broken and fake. Internal clock ticks at constant value (IIRC, half of the CPU frequency) but the kernel "thinks" that it runs much faster than in reality.

0 Likes

#61

So how to do proper bench of the CPU then? Will my small overclock have the same clock drift? O and what happens if i don't do the thing with the MAC addresses?

0 Likes

#62

regarding how to bench, not really sure, still evaluating this. Right now I don't experience clock drift up to 1000mhz cpu clock and all other clocks stock. it drifts at 1080mhz and up. will try 1040mhz next.
I am doing as suggested by pepe2k with sleep 60. I would say for now that if it doesn't drift, then it's ok.
Will post my findings later on.

Regarding not setting the MAC address what will happen ( it happened to me ) is that on every boot you will have random MAC addresses for all the four interfaces.

0 Likes

TP-Link Archer C2600 performance with 17.01.4
#63

1000 MHz doesn't look like correct value for me either :slight_smile:
There must be a bug somewhere in clock reading inside kernel and/or Breed clocks setup routines.

That 60 second tests would work only with big differences between real clock and what kernel calculates based on registers (you aren't able to find out small differences with this test). To be able to confirm that clock what you set is what hardware actually runs at... you need a high-end scope and enable one of clock observation features in SOC (for example, search for CLK_OBS5 in QCA9558 datasheet).

0 Likes

#64

for performance wise is easy
use NAT speed test, connect two modern pc with gigabit adapter, one connected to wan and another to lan and do an iperf/iperf3 between them (assign correct ip address for wan, other than 192.168.1.0/24), normal speed is around ~340 mb/s on this soc without fast classifier kernel module

0 Likes

What's your favourite cheap LEDE/OpenWrt device?
#65

I devised another test for clock drifting that is more accurate:
ntpclient -s -h pt.pool.ntp.org ( sets date )
ntpclient -c 1 -h pt.pool.ntp.org ( compares current date with pt.pool.ntp.org
ntpclient -i 60 -c 30 -h pt.pool.ntp.org >ntplog.log & ( logs this over time ).
awk -f rate.awk< ntplog.log
gnuplot:
plot "ntplog.log" using (($1-36765)*86400+$2):5:($3+$6-$4) with yerrorbars

When set to a frequency that make the clock drift the difference is huge. it drifts around 2 seconds for every 20 seconds on a real clock. when set to a frequency that doesn't make the clock drift the drift is very very small and only noticeable with the test above ( and comparable in magnitude with stock clocks ). So I do think that I am getting close. 1000mhz seems the maximum my router will go. 1040mhz and up and it starts to drift.

rate.awk:

1 Like

Overclocking Router Devices
#66

or you can do an easy scp test from /dev/zero from local to /dev/null on router and see the speed difference

0 Likes

#67

Hi could you explain a bit more on how to do this pleas? I am a Linux newbie

0 Likes

#68

from another linux host (this is my example of wrt3200acm)

 dd if=/dev/zero bs=4096 count=1048576 | ssh root@192.168.1.1 'cat > /dev/null'
root@192.168.1.1's password:
1048576+0 records in
1048576+0 records out
4294967296 bytes (4,3 GB, 4,0 GiB) copied, 273,711 s, 15,7 MB/s
0 Likes

[solved] Can't connect even when in failsafe mode
[GCC 7.2 BUILD] Optimized TP-Link Archer C7 V2 AC1750 LEDE Firmware
#69

There is indeed, as @neheb and @pepe2k suggested something fishy going on.
Basically, frequencies reported by the kernel past 1000MHZ are bogus. I strongly believe that up until 1000MHZ speeds reported are real.
from 720MHZ to 1000MHZ there is no clock drift and past 1000MHZ clock drifts around 2-3s for each 20s on a real clock.

[ 0.000000] Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
[ 0.000007] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
[ 0.008684] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
no clock drift

Clocks: CPU:960.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3981792597 ns
[ 0.000006] sched_clock: 32 bits at 480MHz, resolution 2ns, wraps every 4473924606ns
[ 0.008679] Calibrating delay loop... 479.23 BogoMIPS (lpj=2396160)
no clock drift

Clocks: CPU:1000.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3822520893 ns
[ 0.000006] sched_clock: 32 bits at 500MHz, resolution 2ns, wraps every 4294967295ns
[ 0.008674] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
no clock drift

Clocks: CPU:1000.000MHz, DDR:760.000MHz, AHB:380.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3822520893 ns
[ 0.000005] sched_clock: 32 bits at 500MHz, resolution 2ns, wraps every 4294967295ns
[ 0.008506] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
no clock drift

Clocks: CPU:1040.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3675500859 ns
[ 0.000005] sched_clock: 32 bits at 520MHz, resolution 1ns, wraps every 4129776127ns
[ 0.007894] Calibrating delay loop... 518.55 BogoMIPS (lpj=2592768)
3s clock drift in 20s sleep agaist external clock

Clocks: CPU:1080.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3539371197 ns
[ 0.000005] sched_clock: 32 bits at 540MHz, resolution 1ns, wraps every 3976821759ns
[ 0.007463] Calibrating delay loop... 537.39 BogoMIPS (lpj=2686976)
3s clock drift in 20s sleep agaist external clock

What is interesting is that resolution changes from 2ns to 1ns ( from when there is no drift to when there is drift )

@lucize lucize benchmarking idea is a good one, as the dropbear process eats up all the router cpu and the clock is external.

stock benchmark:
Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
dd if=/dev/zero bs=4096 count=1048576 | ssh root@192.168.88.254 'cat > /dev/null'
root@192.168.88.254's password:
1048576+0 records in
1048576+0 records out
4294967296 bytes (4,3 GB, 4,0 GiB) copied, 1170,7 s, 3,7 MB/s

Overclocked benchmark:
Clocks: CPU:1000.000MHz, DDR:760.000MHz, AHB:380.000MHz, Ref:40.000MHz
dd if=/dev/zero bs=4096 count=1048576 | ssh root@192.168.88.254 'cat > /dev/null'
root@192.168.88.254's password:
1048576+0 records in
1048576+0 records out
4294967296 bytes (4,3 GB, 4,0 GiB) copied, 1000,08 s, 4,3 MB/s

this is how my frequencies look on the bootloader:
no_drift

1 Like

#70

You could also try iperf benchmarks and compare results to the other end and see how well they match up.

1 Like

#71

Just shooting up suggestion here
Does CONFIG_HZ affect Clock Drift?
AR71XX default CONFIG_HZ should be 100MHZ

0 Likes

#72

I tried @Pedro's settings of 1000Mhz, DDR 760Mhz, and my router never booted up (but it did function as a dumb LAN switch, no WiFi). Archer C7V2.

Afterwards, I tried to set it back to stock (720Mhz, DDR 600Mhz, AHB 200Mhz). Now, the router still doesn't boot up, and it is inaccessible. I'm not even able to get into Breed by holding down WPS when booting up (WPS LED never turns on)! I also tried to TFTP using 192.168.1.66, which still doesn't work.

It still functions as a dumb Gigabit switch at this point though.

Any way to get it back?

0 Likes

#73

Try this tutorial, which works for several TP-Link routers -

Rename the stock firmware file archerC7v2_tp_recovery.bin

Common issues I see when it doesn't work...

  1. TFTP server running on the attached computer does not have permissions through the firewall.

  2. Router not powered off first.

  3. Reset button not held in for at least 10 seconds after the router is powered on.

0 Likes

#74

I did attempt this using 192.168.1.66 as the IP address, however I'm not certain that Breed U-boot still allows this method to rescue the router...

I checked that TFTP server is allowed through firewall, and it is.

0 Likes

#75

Try 192.168.0.66

0 Likes

#76

What's the SSH command to get MACs?

0 Likes