bobby3605 Posted September 10 Posted September 10 As other people have noted, there are issues trying to connect the CB1 to wifi after the first boot. I believe I've narrowed down the cause, but I'm not sure about the right way to fix it permanently. The issue I was experiencing is as follows: 1. Flash latest armbian minimal to sd card 2. Plug into CB1 and turn it on 3. Go through first boot setup and connect to wifi normally 4. Reboot CB1 5. CB1 no longer connects to wifi, wpa_cli says 'CTRL_EVENT_SCAN_FAILED' A temporary solution I found is to mask systemd-networkd, then manually unmask systemd-networkd and start it after booting. This suggests that the problem is that systemd-networkd tries to talk to the RTL8189 before it's ready, and that puts the chip into a bad state. The wireless connection works on the first boot, because the CB1 doesn't try to configure the chip until after it has booted up. If I only mask netplan-wpa-wlan0 (instead of masking networkd) and try to manually bring it up, then I get an empty scan result, rather than CTRL_EVENT_SCAN_FAILED. Is there a way to make systemd-networkd wait until after the driver has loaded before trying to configure the chip? The easiest temporary solution is probably to just add a delay before systemd-networkd starts. 0 Quote
bobby3605 Posted September 10 Author Posted September 10 For anyone interested in solving this temporarily, doing the following steps worked for me: sudo systemctl edit systemd-networkd ### Editing /etc/systemd/system/systemd-networkd.service.d/override.conf ### Anything between here and the comment below will become the new contents of the file [Service] ExecStartPre=/bin/sleep 5 ### Lines below this comment will be discarded sudo systemctl daemon-reexec sudo reboot 0 Quote
bundle Posted Thursday at 08:59 PM Posted Thursday at 08:59 PM Having the same issue however your solution doesn't seem to work for me for whatever reason. 0 Quote
anttix Posted Friday at 07:42 PM Posted Friday at 07:42 PM Experiencing the same issue, wifi fails to activate for about 4 out of 5 boots or so. 0 Quote
JohnTheCoolingFan Posted 12 hours ago Posted 12 hours ago No idea what causes this, will need to check on my device 0 Quote
anttix Posted 5 hours ago Posted 5 hours ago (edited) Couple of data points that may be helpful. Platform: BTT PI v1.2 D/C 2023.11.8 with the U2C CAN board Distro: Armbian 25.8.1 Bookworm Kernel: 6.12.43-current-sunxi64 Overlays: spidev0_0 1. Adding a sleep 5 hack did not work for me, however what does *seem* to work is inserting the following line to /etc/netplan/30-wifis-dhcp.yaml activation-mode: manual WiFi was still activated (which may be another bug) for at least 3 cold boots in a row (didn't have time to test more thoroughly). Here's a pastebin link from right after one such boot - https://paste.armbian.com/umijapukiy 2. The error from wpa_supplicant is CTRL-EVENT-SCAN-FAILED ret=-1 retry=1 .Same error code (-1) is also reported when attempting a manual scan pi@jubilee:~$ sudo iw wlan1 scan command failed: Operation not permitted (-1) 3. Broken state of the WiFi driver seems to be correlated with mmc errors in dmesg [ 11.490708] sunxi-mmc 4021000.mmc: data error, sending stop command [ 11.490745] sunxi-mmc 4021000.mmc: send stop command failed [ 11.490856] sunxi-mmc 4021000.mmc: data error, sending stop command [ 11.490880] sunxi-mmc 4021000.mmc: send stop command failed [ 11.491071] sunxi-mmc 4021000.mmc: data error, sending stop command [ 11.491098] sunxi-mmc 4021000.mmc: send stop command failed [ 11.491224] sunxi-mmc 4021000.mmc: data error, sending stop command [ 11.491248] sunxi-mmc 4021000.mmc: send stop command failed These are not present if wifi was activated successfully. Here's a pastebin link from right after such boot - https://paste.armbian.com/xovixuniti I did run F3 on that SD card before installation so I doubt it's at fault, but I am currently running another test with armbianmonitor -c overnight just to be sure. 3. Reloading the kernel driver (8189fs) when it is already in a broken state is very slow and provokes a slew of mmc errors $ sudo /sbin/rmmod 8189fs pi@jubilee:~$ time sudo /sbin/modprobe 8189fs real 2m15.835s user 0m0.008s sys 0m0.048s $ dmesg .... [ 673.262192] sunxi-mmc 4021000.mmc: data error, sending stop command [ 673.262286] sunxi-mmc 4021000.mmc: data error, sending stop command [ 673.262379] sunxi-mmc 4021000.mmc: data error, sending stop command [ 673.262471] sunxi-mmc 4021000.mmc: data error, sending stop command [ 673.262563] sunxi-mmc 4021000.mmc: data error, sending stop command [ 673.262656] sunxi-mmc 4021000.mmc: data error, sending stop command [ 673.262716] ====>_BlockWrite 101 i:0 [ 673.262742] ====>_WriteFW 230 [ 673.263001] sunxi-mmc 4021000.mmc: data error, sending stop command [ 673.263088] sunxi-mmc 4021000.mmc: data error, sending stop command [ 673.263141] ====>_BlockWrite 101 i:0 [ 673.263162] ====>_WriteFW 230 Again the same problem is not present if WiFi was activated successfully after boot: Shutting down the interface and reloading the driver works just fine. Please let me know if there's anything else I can collect that can help to track this down. Given this is a fresh install and has no personal data in it yet, I can share my SD card image if that would be helpful. Edited 5 hours ago by anttix 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.