Closed fish4terrisa-MSDSM closed 2 months ago
Found Out: That seems to be a bug of termux or android. The headless rvvm also didn't worked in termux. (Also Stange. I'm using the same binary in termux and archriscv-term, but got different result in the same device...... The difference is that RVVM in termux lost the log in dmesg of
[ 51.975145] Generic FE-GE Realtek PHY r8169-0-8:00: attached PHY driver (mii_bus:phy_addr=r8169-0-8:00, irq=MAC)
[ 52.100125] r8169 0000:00:01.0 enp0s1: Link is Up - 10Gbps/Full - flow control off
[ 52.100576] r8169 0000:00:01.0 enp0s1: No phy led trigger registered for speed(10000)
But that's not the problem of RVVM, sorry for bothering)
is that due to the slight difference of termux and android environment? If so, then it seems to be a bug of incompatibility of RVVM on termux. However, although I cleared the LD_PRELOAD, the problem still existed.
Got the result: I used -smp 2
in termux and -smp 4
in archriscv-term, and that's the flag affected the detect of r8169 and dhclient. However, there seems nearly no performance difference between -smp 2
guest and -smp 4
guest (not enough to even make enabling network fail) I can't get the reason of it.
I'm not sure about whether it's possible to reproduce it in your environment, as it seems to be a problem only happen in quite-limit-resource devices.
[ 51.975145] Generic FE-GE Realtek PHY r8169-0-8:00: attached PHY driver (mii_bus:phy_addr=r8169-0-8:00, irq=MAC) [ 52.100125] r8169 0000:00:01.0 enp0s1: Link is Up - 10Gbps/Full - flow control off [ 52.100576] r8169 0000:00:01.0 enp0s1: No phy led trigger registered for speed(10000)
According to this log, r8169
driver is loaded very late in the boot process (Later than dhclient starts).
See this:
[ 39.068388] systemd[1]: Created slice Slice /system/dhclient.
Systemd starts the dhclient service earlier than the NIC driver loads. This may be due to r8169
driver not being included in initramfs. The fact that it reproduces under different circumstances and not under others affects this, but seems not to be the cause as I see it.
Try running mkinitcpio -P
under root and see if it resolves the issue. Additionally, I use systemd-networkd
and never saw such issues there so maybe it's caused by dhclient.
Find out that adding r8169
in the MODULES
line in /etc/mkinitcpio.conf
fix ed this problem, i can even get network in the initramfs now. The strange behavior may be caused by the smp racing problem, which made r8169
loaded after dhclient started. (However, after running mkinitcpio,my initramfs cannot find the nvme disk now,as what i posted in the Arch Linux on RISC-V
channel. And removing the r8169
in /etc/mkinitcpio.conf
didn't worked, so it isnt cause by r8169
module. Hoping for your help. Much thanks)
Environment
Android 10, in Termux, the newest commit of RVVM(both the headless one and the x11 one), with Archlinux riscv as the guest
Strange behavior
The headless RVVM (in my archriscv-term) worked with network enabled by dhclient while boot. However, when I'm using RVVM with x11 in termux(not with proot or vnc, but with the app
X Server
in google play), I got the following failure log of dhclient while booting:However, when I restarted dhclient manually (
sudo systemctl restart dhclient@enp0s1
), It simply worked fine. It seems that it took the system much longer time to detect and register the network card when running on RVVM with x11 support. And, the dmesg log in the guest in RVVM x11:Also, I'm using the same image in headless RVVM and x11 RVVM, so it seems not to be the problem of image or dhclient(?)
Expected behavior
The guest can detect and enable network while booting in RVVM with x11.