Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cifs_mount.sh kills wifi if MOUNT_AT_BOOT is set #88

Open
retrorepair opened this issue Jun 1, 2022 · 16 comments
Open

Cifs_mount.sh kills wifi if MOUNT_AT_BOOT is set #88

retrorepair opened this issue Jun 1, 2022 · 16 comments

Comments

@retrorepair
Copy link

As above. Not sure why this happens but when it does, the ONLY way to get wifi to work again is to overwrite the linux.img file in /linux

To recap, wifi is super reliable and always comes up at boot, but as soon as I launch cifs_mount.sh with "MOUNT_AT_BOOT=true", wifi stops working until I overwrite linux.img with a fresh copy.

Setting "MOUNT_AT_BOOT=false" and manually starting the share works reliably.

@THitsu10
Copy link

Was there ever a fix to this ? I’m having this problem after recent update

@retrorepair
Copy link
Author

Not that I'm aware of. What adapter do you have? It may be that chipset at fault.

Plug into a PC and follow this guide: https://kb.synology.com/en-ph/DSM/tutorial/How_do_I_check_the_PID_VID_of_my_USB_device

Post the result here, I'll do the same and it may shed some light on the issue.

@the8thsign
Copy link

So I'm running into this issue after the 230423 update. I'm using this card https://misteraddons.com/collections/parts/products/wifi-bt-usb-adapter?variant=39654352060549 and https://www.amazon.com/gp/product/B07YDFZWT8/.

lsusb shows Bus 001 Device 005: ID 0bda:c820 Realtek Semiconductor Corp. 802.11ac NIC

I've also figured out it's actually WAIT_FOR_SERVER="true" in the cifs_mount.sh that causes it for me. If I set MOUNT_AT_BOOT="true" but WAIT_FOR_SERVER="false", Wifi works as expected. The share is not mounted but that is expected.

It seems to only affect this card and when I use a TP-Link T2U Nano, wifi and cifs_mount.sh works as expected.

Here is my dmesg when it fails:

[ 4.370183] usb 1-1.4: USB disconnect, device number 3
[ 4.612785] usb 1-1.4: new high-speed USB device number 5 using dwc2
[ 4.701675] usb 1-1.4: New USB device found, idVendor=0bda, idProduct=c820, bcdDevice= 2.00
[ 4.701703] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4.701716] usb 1-1.4: Product: 802.11ac NIC
[ 4.701725] usb 1-1.4: Manufacturer: Realtek
[ 4.701785] usb 1-1.4: SerialNumber: 123456
[ 5.277071] usbcore: registered new interface driver btusb
[ 5.297303] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821
[ 5.298218] Bluetooth: hci0: RTL: rom_version status=0 version=1
[ 5.298261] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin
[ 5.306413] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin
[ 5.310402] Bluetooth: hci0: RTL: cfg_sz 14, total sz 18074
[ 5.705224] Bluetooth: hci0: RTL: fw version 0x826b274f
[ 6.456367] input: MiSTer virtual input as /devices/virtual/input/input4
[ 6.890208] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 6.931415] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 8.192841] socfpga-dwmac ff702000.ethernet eth0: PHY [stmmac-0:01] driver [Micrel KSZ9031 Gigabit PHY] (irq=POLL)
[ 8.193345] socfpga-dwmac ff702000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 8.210003] loop0: detected capacity change from 0 to 4096
[ 8.211056] socfpga-dwmac ff702000.ethernet eth0: No Safety Features support found
[ 8.211092] socfpga-dwmac ff702000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 8.211476] socfpga-dwmac ff702000.ethernet eth0: registered PTP clock
[ 8.217558] socfpga-dwmac ff702000.ethernet eth0: configuring for phy/rgmii link mode
[ 8.273806] usbcore: registered new interface driver rtl8821cu
[ 8.303954] EXT4-fs (loop0): recovery complete
[ 8.303989] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
[ 11.132171] MiSTer_fb 22000000.MiSTer_fb: width = 1920, height = 1080, format=8888
[ 15.599134] EXT4-fs (loop8): re-mounted. Opts: (null). Quota mode: disabled.
[ 68.379919] udevd[553]: worker [567] /devices/platform/soc/ffb40000.usb/usb1/1-1/1-1.4/1-1.4:1.2/net/wlan0 is taking a long time
[ 188.499822] udevd[553]: worker [567] /devices/platform/soc/ffb40000.usb/usb1/1-1/1-1.4/1-1.4:1.2/net/wlan0 timeout; kill it
[ 188.511066] udevd[553]: seq 1560 '/devices/platform/soc/ffb40000.usb/usb1/1-1/1-1.4/1-1.4:1.2/net/wlan0' killed
[ 188.521691] udevd[553]: worker [567] terminated by signal 9 (Killed)
[ 188.521722] udevd[553]: worker [567] failed while handling '/devices/platform/soc/ffb40000.usb/usb1/1-1/1-1.4/1-1.4:1.2/net/wlan0'

@sorgelig
Copy link
Member

sorgelig commented May 7, 2023

May be mount script should be called at other time of boot.

@retrorepair
Copy link
Author

My adapter takes a good 30 seconds to come up, maybe it should wait for this before mounting if possible?

@sorgelig
Copy link
Member

sorgelig commented May 7, 2023

wait for 30seconds after each reboot doesn't look good. I don't know.. all these network mounts originally is wrong.. MiSTer is created to be local and offline actually..

@retrorepair
Copy link
Author

It's not ideal. Maybe it's more an issue with the driver than an issue with the script?

I get that MiSTer was designed to have local files hosted but given the large amount of data mister now potentially has available to it, it's easy to see the appeal of central storage, especially given that can also host a lot of data for other platforms in most user's cases.

It works fine and is extremely convenient if mounted manually. Automation would be nice but if it's not within the script's scope then maybe certain devices should just be avoided.

@THitsu10
Copy link

THitsu10 commented May 7, 2023

wait for 30seconds after each reboot doesn't look good. I don't know.. all these network mounts originally is wrong.. MiSTer is created to be local and offline actually..

Anyway to implement the original Wi-Fi start up before the recent update?

@retrorepair
Copy link
Author

retrorepair commented May 7, 2023

Must have been this one:

a1bc11e

I'd assume if you download this and test it should be ok, assuming it definitely worked ok before the latest update:

https://github.com/MiSTer-devel/Scripts_MiSTer/blob/c3189f49f85d110404ec3230d4b1ecb712e2aeb1/cifs_mount.sh

@SpazShark
Copy link

I'm having the exact same issue as OP and it's solved by disabling cifs_mount and removing the relevant entries from the if-up.d and if-down.d directories.

Of course everything works fine over ethernet.

Has anyone got this working with this wifi dongle? https://www.amazon.com/gp/product/B07YDFZWT8/

I'm about to buy the Archer T2U Nano but would rather avoid the purchase if I can.

@THitsu10
Copy link

I'm having the exact same issue as OP and it's solved by disabling cifs_mount and removing the relevant entries from the if-up.d and if-down.d directories.

Of course everything works fine over ethernet.

Has anyone got this working with this wifi dongle? https://www.amazon.com/gp/product/B07YDFZWT8/

I'm about to buy the Archer T2U Nano but would rather avoid the purchase if I can.

I had three of those , all stopped working with mount_at_boot. With 5/1 update

replaced them with this
TP-Link Nano AC600 USB Wifi Adapter(Archer T2U Nano)
https://a.co/d/44Cy45i

@SpazShark
Copy link

SpazShark commented Aug 27, 2023

I'm having the exact same issue as OP and it's solved by disabling cifs_mount and removing the relevant entries from the if-up.d and if-down.d directories.
Of course everything works fine over ethernet.
Has anyone got this working with this wifi dongle? https://www.amazon.com/gp/product/B07YDFZWT8/
I'm about to buy the Archer T2U Nano but would rather avoid the purchase if I can.

I had three of those , all stopped working with mount_at_boot. With 5/1 update

replaced them with this TP-Link Nano AC600 USB Wifi Adapter(Archer T2U Nano) https://a.co/d/44Cy45i

Thanks! Just ordered one.

EDIT: The Archer T2U Nano (https://www.amazon.ca/gp/product/B07PB1X4CN/) arrived yesterday and all works fine now with Wifi and the cifs_mount script!

@Slychocobo
Copy link

I fear this problem might become more wide-spread as the Taki Udon package for their FPGA includes a USB Wifi/Bluetooth dongle that seems to exhibit this exact issue.

It seems to a 'no-name' brand device but I've spoken with a few other users who are seeing this issue.

Is there any other options vs replacing the Wifi card?

@SK360
Copy link

SK360 commented Sep 23, 2024

I fear this problem might become more wide-spread as the Taki Udon package for their FPGA includes a USB Wifi/Bluetooth dongle that seems to exhibit this exact issue.

It seems to a 'no-name' brand device but I've spoken with a few other users who are seeing this issue.

Is there any other options vs replacing the Wifi card?

I don't use wifi but my bluetooth won't come up on the Taki adapter if the ethernet cable is unplugged. The only way I can get it to work "offline" is to whack the cifs mounting scripts in /etc/network/if-up.d.

@displaced
Copy link

I fear this problem might become more wide-spread as the Taki Udon package for their FPGA includes a USB Wifi/Bluetooth dongle that seems to exhibit this exact issue.

Glad I came across this report, since I am one of those with the Taki Udon MiSTer and supplied WiFi/BT dongle who's seeing exactly this problem.

Can confirm the dongle works perfectly when cifs_mount is run manually after boot. Gonna try calling the script from an rc.d script (or similar) at the end of the boot process. I'm not hugely fussed about mounting/unmounting along with the interface state, even though that's the more correct behaviour. Will see how it goes.

@ekbaker7
Copy link

ekbaker7 commented Jan 9, 2025

Bumping this to say I already had the TP-Link Nano AC600 and when running the cifs_mount script it still killed my Wifi capabilities. I am worried it doesn't matter what adapter you have, whatever is plugged in at the time when the script is run ceases to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

9 participants