Scp and rsync broken in rock 5b+ ethernet

ethernet: scp and rsync broken, iperf test ok

wifi: scp and rsync ok

power: macbook 61w power adapter(PD)

radxa as guest


$ scp -vvv xxx.zip radxa:~/

debug2: channel 0: rcvd adjust 131072

debug3: send packet: type 1

client_loop: send disconnect: Broken pipe

lost connection

$ rsync -av xxx.zip radxa:~/

sending incremental file list

xxx.zip

client_loop: send disconnect: Broken pipe

rsync: [sender] write error: Broken pipe (32)

rsync error: unexplained error (code 255) at io.c(848) [sender=3.2.7]

radxa as host


$ scp -vvv 192.168.5.99:xxx.zip .

debug2: channel 0: window 1966080 sent adjust 131072

ssh_dispatch_run_fatal: Connection to 192.168.5.99 port 22: message authentication code incorrect

scp: Connection closed

$ rsync -av 192.168.5.99:xxx.zip .

receiving incremental file list

xxx.zip

ssh_dispatch_run_fatal: Connection to 192.168.5.99 port 22: message authentication code incorrect

rsync: connection unexpectedly closed (54338395 bytes received so far) [receiver]

rsync error: error in rsync protocol data stream (code 12) at io.c(231) [receiver=3.2.7]

rsync: connection unexpectedly closed (92 bytes received so far) [generator]

rsync error: unexplained error (code 255) at io.c(231) [generator=3.2.7]

rsync: [generator] write error: Broken pipe (32)

system

rock-5b-plus_bookworm_kde_b2.output.img.xz


$ uname -a

Linux rock-5b-plus 6.1.43-15-rk2312 #3176a44da SMP Wed Jul 31 04:27:40 UTC 2024 aarch64 GNU/Linux

$ cat /etc/issue

Debian GNU/Linux 12 \n \l

Please try running sudo systemctl enable --now ssh before trying scp and rsync

Same as before.

I hate to resurrect an old posting, but I too am having this issue. And it is seems only to be surrounded by things that use the SSH protocol. If I try to scp a large file (multiple Gigabytes), I will eventually the MAC incorrect error. If I use a non-SSH based protocol, everything works beautifully. For instance:
rsync -hrlpt --progress filename.tar.zst rsync://x.x.x.x/transfer

This will transfer the whole file because I’m using the native rsync protocol. But if I use scp eventually I will get the MAC error and it will shutdown. I even used nc to transfer the same file without issues. It just seems like SSH doesn’t like something about receiving large files. I did discover that if I rate limit scp to about 48Mbit/s, I can transfer very large files with ease. But that’s not fun with 60+ GB files being transferred.

I even tried updating the kernel driver for the r8125 (there is a minor one on Realtek site) and that did not help. Could this be an issue with how the Rock chip is handling sustained, intense data transfers? Is the 5B+ doing any TCP offloading (I’ve seen this happen before with offloading)? Any boot params that might help with this?

Please try replacing r8125 with r8169

That did the trick! scp transfers are solid and speedy. Thank you for the suggestion! We’re running Debian 12 on our 5b+, so I’ll share how I did the changeout of the kernel mods for the community:

sudo apt purge r8125-dkms
# This will remove radxa-system-config-r8125-dkms and r8125-dkms
sudo apt install r8168-dkms
# This includes the r8169 kernel module
sudo systemctl reboot

In fact, our new kernel comes with the r8169 module, just use rsetup to upgrade the system and run apt autopurge (don’t use remove, it will leave the r8125 configuration file behind).

1 Like