Hi,
I recently faced a network speed issue on the AETINA RK3588 while running Python code.
It was not a general network problem, because everything worked fine with curl.
However, when executing Python code, it was very slow — even for downloading very small packages.
This made it impossible to use download scripts such as:
./download_prebuilt.py --all
It seems that the problem comes from IPv6 handling in Python.
Two possible solutions
1) Disable IPv6 system-wide
# Disable at runtime
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
# Make persistent
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
2) Patch the scripts (e.g., inference.py, download_prebuilt.py) to force IPv4
Add the following at the top of the script:
import socket
orig_getaddrinfo = socket.getaddrinfo
def getaddrinfo_ipv4(host, port, family=0, type=0, proto=0, flags=0):
return orig_getaddrinfo(host, port, socket.AF_INET, type, proto, flags)
socket.getaddrinfo = getaddrinfo_ipv4
After applying one of these fixes, Python network operations on the RK3588 should perform as fast as expected.
If you try these solutions and the problem still persists, please leave a comment or reach out — I’d be interested in comparing results and helping investigate further.