NanoPi R4S-RK3399 is a great new OpenWrt device

Others might have better advice but squashfs is nice if you have a known working state you want to be able to revert to, whether that is stock or a modified image with your settings.

ext4 is nice on removable media (sd cards) because you can just plug it into another device and edit configs if things go awry. Technically you can mount and edit squashfs also, but permissions and such are nicer with ext4 by default on most desktop distros.

As pointed out in other posts I would really say it depends what you require. The basic snapshot build is running super stable in my case. On top of the standard build I installed luci, luci-app-ddns, luci-app-wireguard, luci-app-stats, curl and msmtp. All those work without any problems in my case.

Nevertheless, there are quite some compatibility problems at the moment due to the switch from iptables (firewall3) to nftables (firewall4), one of them being dockerd, which I guess is one of the most commonly used packages on a powerful device like the R4S.

The best resource I found to track this is here: Certain upstream switch to firewall4 aka nftables instead of iptables · Issue #5409 · openwrt/luci · GitHub, specifically the "heads up" links.

1 Like

In case someone is interested, I measured the power usage of the R4S (using an Anker Nano PowerPort III to power the R4S, using snapshot ... i.e. not overclocked):

  • On IDLE its power consumption hovers around 2.7 Watts (+/- 0.1 Watt).
  • Under stress (all CPUs at 100%) it hovers around 8 Watts.

When it comes to temperatures cooling does not seem to be a real problem. I'm hiding the R4S in a sideboard (really poor ventilation / no air flow, room temperature ~23° Celsius):

  • If I don't stress the device it temperature would hover around 47° Celsius in this closed ambient ... as soon as it is getting more air the temperature drops considerably to ~40.
  • What I did in my setting was putting an old CPU heat sink I had somewhere on top of the R4S, without any thermal paste. This reduces temperature to ~42° Celsius in the closed ambient with no real air flow.
3 Likes

Today I faced the first major issue with snapshot. The one dated 2022-02-25 renders the R4S network connection unstable. I moved back to 2022-02-17 which is solid.

Now I understand @xShARkx skepticism regarding snapshots better … where active development happens instabilities occurs too. I need to gather more experience how frequent faulty snapshots are.

depends on your definition of faulty but it's around 1 in 50-100

the general best thing to do if you are 'stuck' with only snapshot as an option is to not update more than once every 2-3 months unless you;

  • know there is something new you need or
  • something is reportedly fixed

(with custom build images, you should always retain a copy of your last known good image)

1 Like

Snapshots can be faulty at any time, but at the same time they might not be.

Another issue is, package installation, as per https://openwrt.org/releases/snapshot

"snapshots are built daily, and that sets time limits to installing new packages with opkg. Due to kernel version checksums, you can only install “kmod” kernel modules and other kernel version dependent modules from the exactly same snapshot build. So, a few hours after flashing the firmware you may not be able to install new modules with opkg any more (as the next snapshot has been built into the download repo and has different checksums)."

They are the edge of development.

Can someone help me understand this file:

#!/bin/sh

[ "$ACTION" = add ] || exit

get_device_irq() {
	local device="$1"

	local line=$(grep -m 1 "${device}\$" /proc/interrupts)
	echo ${line} | sed 's/:.*//'
}

set_interface_core() {
	local core_mask="$1"
	local interface="$2"
	local device="$3"

	[ -z "${device}" ] && device="$interface"

	local irq=$(get_device_irq "$device")

	echo "${core_mask}" > /proc/irq/${irq}/smp_affinity
}

case "$(board_name)" in
friendlyarm,nanopi-r2s | \
friendlyelec,nanopi-r2)
	set_interface_core 2 "eth0"
	set_interface_core 4 "eth1" "xhci-hcd:usb3"
	;;
friendlyelec,nanopi-r4s)
	set_interface_core 2 "eth0"
	set_interface_core 4 "eth1"
	;;
esac

I am doing a custom build of friendlywrt, and i want to fix the cpu affinity permanently! Cause on friendlywrt last build, its really fucked up the cpu affinity! Everything is being throw at core 2 or 3, yes only one core to handle the IRQ and queues for the SQM.

I found the file but i am really trying to understand how to set irq on two or four a53 cores and the queues on the a72 cores.

Better visualization:

https://openwrt.org/toh/friendlyarm/nanopi_r4s_v1#cpu_management - has how to do it manually. all you have to do is pick your cores and put it in a script.

Their script appears to be dual use for both the r2s and r4s.

1 Like

Yes, i know about the manually tuning :smiley: Is just that i want to fix it permanently, so that way i don't need to add the commands to execute every time the router reboots. Also the IRQ manually commands don't work for kernel 5.15, only the queues ones work.

I am also curious about what is fucked in this file that is throwing everything at core 2 or 3(i don't remember which core right now, but its only one core which gets to 100% use).

Hi all rather new with openwrt.
Bought a R4S and installed friendlywrt everything setup I have just one problem.
I use nginx as a reverse proxy and this works for example test.duckdns.org from outside my network.
Only when I connect to test.duckdns.org from the lan is does not work.
Hope anybody can help me :smile:

!A little bit more info I have adguardhome as my DNS server installed on a separate device.

1 Like

friendlywrt =/= openwrt

That being said... you wont be able to reach your external routed interface via your lan. use a phone on 4g or another external connection to test your connections. its like trying to ring your own doorbell from sat on your couch :slight_smile:

(if you want it resolvable internally you'd have to add a host entry so your internal dns knows what to look for.)

1 Like

Thanks for the quick reply.

Any explanation for a beginner on how to set this up ?
(if you want it resolvable internally you'd have to add a host entry so your internal dns knows what to look for.)

either put an entry in your etc/hosts file
or as you have AGH installed. use its DNS Rewrites feature from the Filters tab.

so assuming you have your test server set up at 192.168.1.2 just put test.duckdns.org as the dns and the server ip. that way requests internal to your lan get the internal ip. external to your lan they will come in your WAN and get directed to your server.

2 Likes

Did the DNS rewrite on my adguardhome server. :pray:

Does anyone know if the new 21.02.2 release includes the fixes needed for R4S?

It does not, R4S support is still snapshot only.

1 Like

I hope this changes with 21.02.3 :slight_smile:

21.02.x will not support backport. Upcoming 22.xx release will support.

2 Likes

No, cause there is no 21.02.2 stable release for the R4S! We only have snapshots right now, the R4S will only get a stable release of openwrt on the next major version 22.0X that will get released now in April or May.

1 Like

22.0x is definitely not coming in April or May, it'll be branched and take several months of fixing and polish (especially with nftables). Probably this fall? Master snapshot builds work well for now though, are stable, and continues to improve. My main router (WRT32X) is running a master snapshot with 80 day uptime and I use a lot of packages (SQM at 500 Mbit/s, Adblock, USB3 storage, Samba4 hits 120 MB/s), it's fast and perfectly stable on kernel 5.10. My point is just continue to use master snapshots for now.

2 Likes