Welcome! Log In Create A New Profile

Advanced

Debian on RN104

Posted by jungle_roger 
Debian on RN104
June 01, 2024 06:56AM
Hi,

I'll start by saying im not an expert at Linux (my main experience comes from using raspberry pi's)

I have installed Debian on my RN104 but im having a couple of issues with it.
I used this guide: https://web.archive.org/web/20230909154806/https://www.katerkamp.de/howto/osinstall/rn104-d-i.xhtml
but I installed bookworm instead.

I keep getting buffer overruns on the ethernet which slows down transfers alot and systemd-journal churns out tons of messages causing high CPU usage.
If I use wifi on the client side its not as bad but still has lots of overruns and is still slower then stock.

I've tried lowering the MTU but made it worse and I'm a little hesitant to start messing with the network as its a headless device and dont want to lose SSH access.

------------------------------------------------------------------------------------------

I also want to be able to use the LCD or at least turn off the backlight.
I see an entry in the DTB for Aux Display but dont think its setup as theres nothing in /sys/class/ although there is a 'backlight' entry but:

cat /sys/class/backlight/value
returns:
cat: /sys/class/backlight/value: No such file or directory

I can see other entires listed in /sys/class/gpio & /sys/class/leds but they seem to be for the disk indicators and power buttons.

I found this post:https://forum.doozan.com/read.php?9,133864
which relates to the LCD but i'm using a different system.


Any help would be appreciated..

Thanks,
Jungle



Edited 1 time(s). Last edit at 06/01/2024 06:59AM by jungle_roger.
Re: Debian on RN104
June 01, 2024 01:33PM
Jungle,

> I keep getting buffer overruns on the ethernet
> which slows down transfers alot and
> systemd-journal churns out tons of messages
> causing high CPU usage.
> If I use wifi on the client side its not as bad
> but still has lots of overruns and is still slower
> then stock.

We don't have this problem runing my rootfs.

Best if you post the output of dmesg and some of those messages. If you have serial console then post the serial console boot log.

> I also want to be able to use the LCD or at least
> turn off the backlight.
> I see an entry in the DTB for Aux Display but dont
> think its setup as theres nothing in /sys/class/
> although there is a 'backlight' entry but:
>
> cat /sys/class/backlight/value
> returns:
> cat: /sys/class/backlight/value: No such file or
> directory
>
> I can see other entires listed in /sys/class/gpio
> & /sys/class/leds but they seem to be for the disk
> indicators and power buttons.
>
> I found this
> post:https://forum.doozan.com/read.php?9,133864
> which relates to the LCD but i'm using a different
> system.

It is quite applicable to your systemd Debian rootfs. It will work the same way, except for a few places where Trond mentioned a sysvinit- specific places, which you need to translate to systemd.

But overall, the testing using printf to write to /dev/lcd should be same in any Linux system.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on RN104
June 01, 2024 06:47PM
Hi,
Thanks for the reply.

I wish I had installed your one first but only found it after.
Do you think there will be an issue just installing yours as I've already followed a different method? or would I need to restore to stock/defaults first?

Thanks,
Jungle
Re: Debian on RN104
June 02, 2024 02:06AM
jungle_roger Wrote:
-------------------------------------------------------
> I have installed Debian on my RN104 but im having
> a couple of issues with it.
> I used this guide:
> https://web.archive.org/web/20230909154806/https://www.katerkamp.de/howto/osinstall/rn104-d-i.xhtml
> but I installed bookworm instead.
>
I'm glad I went to this link and read it as I learned about a useful new tool! I had not heard about the "ModuleAssistant" before, but I will be making extensive use of it in the future.

Ray
Re: Debian on RN104
June 02, 2024 01:43PM
Jungle,

> Do you think there will be an issue just
> installing yours as I've already followed a
> different method? or would I need to restore to
> stock/defaults first?

It's won't be an issue installing, but you need to connect serial console. Take a look at the Initial Installation instruction here and see if you are comfortable with doing manual installation like this.

https://forum.doozan.com/read.php?2,92514

Quote

II. Netgear RN102 Intsallation
Updated 06 Sept 2020
Updated 19 Dec 2022 (added Section C)

========

Since you already have a Debian rootfs, you could also try to install and run my released kernel (latest kernel is linux-6.8.7-mvebu-370xp-tld-1). But the rootfs /boot files structure is probably different, that we need to verify and see how the boot files must be created after running dpkg to install kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on RN104
June 03, 2024 06:00PM
hi Bodhi,

I just did a fresh install with usb, had to use the old 5.2.9 rootfs with the 6.8.7 kernel as the rootfs 6.6.2 with built-in kernel didn't work.
I dont need to 'update' the rootfs, do i?

But good news, no more ethernet overruns and the lcd backlight is off!


Thanks!
Re: Debian on RN104
June 03, 2024 07:49PM
> I just did a fresh install with usb, had to use
> the old 5.2.9 rootfs with the 6.8.7 kernel as the
> rootfs 6.6.2 with built-in kernel didn't work.
> I dont need to 'update' the rootfs, do i?

Jungle,

Whenever you like to update is fine, if you only use the box locally in a closed network.

But eventually you'll need to do dist-upgrade for the rootfs 5.2.9 to Debian bookworm to avoid protential problems. As Debian progress to newer version, it will be more complicate to jump version (i.e. bullseye 11 to trixie 13).


So I'd say once you are happy that the system is running well, backup the USB rootfs, and then do dist-upgrade to bookworm.


> But good news, no more ethernet overruns and the
> lcd backlight is off!
>

Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on RN104
June 10, 2024 05:02AM
Hey Bodhi,

Looks like I spoke too soon, I'm still getting ethernet overruns.
I've started on your rootfs 5.2.9 with kernel 6.8.7
I've been able to update to bookworm but it hasn't fixed it.

The dmesg and serial logs are attached:


Thanks
Jungle



Edited 1 time(s). Last edit at 06/10/2024 06:08AM by jungle_roger.
Attachments:
open | download - dmesg.txt (52.3 KB)
open | download - Serial.txt (3.2 KB)
Re: Debian on RN104
June 10, 2024 02:26PM
Jungle,

You're seeing the same problem as Trond did on the RN102 with kernel 6.8.7.

I did mark it as broken

Quote

Updated 21 May 2024:

Kernel linux-6.8.7-mvebu-370xp-tld-1-bodhi.tar.bz2 package has been uploaded.

New/Updated in this release:

- General kernel upgrade.
- Warning: this kernel version is broken on the Netgear RN102 and 104. Please stay with previous kernel if you have these 2 boxes.

So install kernel linux-6.5.7-mvebu-370xp-tld-1

Quote

Updated 24 Oct 2023:

Kernel linux-6.5.7-mvebu-370xp-tld-1 package has been uploaded.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/10/2024 02:29PM by bodhi.
Re: Debian on RN104
June 11, 2024 03:59AM
Thanks Bodhi,

I've installed the 6.5.7 kernel and it got rid of of the "BUG: scheduling while atomic" error but I'm still getting lots of overrun errors:

[  310.133162] mvneta d0070000.ethernet eth0: bad rx status 0f830000 (overrun error), size=384


Jungle
Re: Debian on RN104
June 11, 2024 03:26PM
Jungle,

Get the status to see if there are errors in RX and TX.
ifconfig -a

====

Try these to see if it helps

1. Turn off flow control

ethtool -A eth0 autoneg off rx off tx off

2. Swap your network cable with a different one.

=====

We don't have network buffer management in the DTS for this box. I'm not sure why, perhaps this network chip (88e1318) does not have that capability. I tried to connect to natisbad.org as I recall he had this Reference Manual.

With that said, even if there is no HW buffer, the network driver buffer should have prevented the overuns. What was the box activity when these overuns occured? are you downloading something or do network files transfering?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on RN104
June 12, 2024 03:37AM
Hi,

It happens during file transfers using smb and its only RX:
RX packets 49808615  bytes 70509970400 (65.6 GiB)
RX errors 25511  dropped 0  overruns 0  frame 0
TX packets 5850581  bytes 54137665733 (50.4 GiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Turning off flow control and swapping cables has no effect.
There's not much else running as all I have installed is samba and mariadb.

Tasks: 145 total,   2 running, 143 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.5 us, 63.5 sy,  0.0 ni,  2.6 id,  0.0 wa,  0.0 hi, 29.4 si,  0.0 st
MiB Mem :    489.7 total,    112.2 free,    267.2 used,    308.4 buff/cache
MiB Swap:   1953.1 total,   1826.5 free,    126.7 used.    222.5 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 3634 ****      20   0  103968  10604   8244 R  72.6   2.1   4:03.27 smbd
 1418 root      20   0   50628   9936   9668 S   6.5   2.0   1:58.18 systemd-journal
 4270 root      20   0       0      0      0 I   6.1   0.0   0:00.28 kworker/u2:1-events_unbound
   48 root      20   0       0      0      0 S   5.8   0.0   4:28.13 kswapd0
 3976 root      20   0       0      0      0 I   2.3   0.0   0:01.91 kworker/u2:2-writeback
 4268 ****      20   0    6676   3960   1948 R   1.6   0.8   0:00.38 top
 1293 root      20   0       0      0      0 S   1.3   0.0   0:39.18 usb-storage
   15 root      20   0       0      0      0 S   0.3   0.0   0:22.75 ksoftirqd/0
   16 root      20   0       0      0      0 I   0.3   0.0   0:16.91 rcu_preempt
 3939 ****      20   0   11144   3280   3000 S   0.3   0.7   0:02.12 sshd
    1 root      20   0   32424   4216   3148 S   0.0   0.8   0:14.07 systemd


Thanks,
Jungle



Edited 2 time(s). Last edit at 06/12/2024 03:42AM by jungle_roger.
Re: Debian on RN104
June 12, 2024 03:13PM
Jungle,

Make sure you are running the 6.5.7 kernel.

Reboot, login and don't turn off flow control. Just leave the defaut whatever it is. And get the current settings
ifconfig -a
ethtool eth0

(you should mask out the MAC addresses from ifconfig output).

======

I'm still looking for the datasheet for this chip 88e1318.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/12/2024 03:14PM by bodhi.
Re: Debian on RN104
June 12, 2024 04:59PM
Hey Bodhi,

Here's uname -a:
Linux ***** 6.5.7-mvebu-370xp-tld-1 #2 PREEMPT Thu Oct 19 18:31:43 PDT 2023 armv7l GNU/Linux

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.15  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::2ac6:8eff:fe34:5030  prefixlen 64  scopeid 0x20<link>
        ether **:**:**:**:**:**  txqueuelen 1024  (Ethernet)
        RX packets 328  bytes 26735 (26.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 305  bytes 37950 (37.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 36

Settings for eth0:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        MDI-X: Unknown
        Supports Wake-on: pg
        Wake-on: d
        Link detected: yes

Thanks,
Jungle
Re: Debian on RN104
June 12, 2024 05:21PM
How about

ethtool -a eth0

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: