-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Realtek RTL9210 chipset (NVMe to USB) initialized but seems doesn't work correctly on PRI 4 #4130
Comments
What happens if you connect the drive after power-on (and Linux has booted) - is the behaviour any different? |
@P33M I've tried to connect the enclosure after the RPI4 boot, the behavior is absolutely the same, I've tried other cables and even different power adapters. I still confused and can't get why it's a USB2 device, but the main point - why I cannot interact with the disk... is that a wrong controller detection or RPI <-> Controller <-> NVMe |
One more unsuccessful attempt. Installed Raspbian GNU/Linux 10 (latest), booted, attached enclosure dmesg
lsusb
Tried Quirks also, no effect. Any thoughts? |
From what I see, there are at least two things going wrong when plugging into the Pi. The first is that USB3.0 negotiation fails and the device falls back to USB2.0. The second is that the disk isn't reporting back any capacity figures - the command is failing. The fact that switching to USB mass storage rather than UAS has the same result points to a basic initialisation-style problem rather than UAS protocol breakage. Does the adapter work at all if you plug it into one of the physical USB2.0 ports (or use a USB2.0 cable)? |
Please could you also post links to the enclosure and NVMe device. I'm using a Realtek NVMe adapter with what appears to be the same chipset on a Pi4. |
@timg236 happy that I'm not alone here. My hardware
|
@P33M USB2 physical port gives the same result
the same dmesg
|
Ok, I'm still fighting and decided to check one more case: lack of power. I use ZMI 20000 Power Bank with a built-in USB hub
Note it's a USB2 and the speed is physically limited with 480M.
But, the RTL9210 and NVMe drive detected, and it works!
smartctl
I've ordered USB3 Hub based on VL812 with an external power supply. I'll report the final results but as for now looks like it's a power shortage. |
USB3 Gen1 hub with complementary power delivery arrived. So, I can fully confirm that **the root cause of the problem is a lack of pi's power ** that leads to incorrect enclose detection and a problem with NVMe drive recognition. My new setup with external power via USB3 Gen 1 hub works as expected:
|
@hayorov could you please share a link to the USB3 Gen 1 hub you're using? Cheers! |
@maxromanovsky I have this https://www.orico.cc/usmobile/product/detail/id/3238 It is based on the VL817 VIA chip. |
I have same Enclosure - ORICO M2PV-C3 device
For basic use it worked "flawlessly" but if I want to re-write the SSD drive using
Did anyone manage to get a firmware update? See https://forums.anandtech.com/threads/stable-nvme-usb-adapter.2572973/page-29 |
@mmokrejs maybe I'm wrong but the controller (Realtek) has a setting something like idle-timeout and if no IO activity for a while it switches off the power and it looks like a USB disconnect, I believe that this device was designed to work as a USB storage stick rather them permanent drive. Probably you can disable idle timeout but make sure that the chip (both memory and the controller) is cold enough. |
@mmokrejs You can head over orico's china website for firmware that doesn't sleep after 10 minutes. You can also go to here for newer firmware This is my configure
|
@partment Thank you for your help. Finally I got to try the new firmware. The 1.27.xx series update went to 100% and I used the Sadly I then decided that while at it I shall try the 1.29.xx series image using the same 64bit EXE distributed with the 1.27.xx firmware and the same I did check before that the 1.29.xx image is selected and the other part was in some subdirectory. So either using he older EXE was the culprit, or the old config was not compatible with the newer firmware files ... |
@mmokrejs |
@mmokrejs There should be a chip called P25Q40SH or FM25Q04A or PUYA P25D40H. Looks for P25Q40SH's datasheet and find pin layout for CS# and Vcc. CS# and Vcc is pin 1 and 8. Then, you need to short these two pins for about 5~10 second when you connect USB. Once your firmware updater looks like this, you can flush firmware again and again until you success. |
Right, that saved me. Short-circuiting the ping before USB power is attached was ineed the way to reset it. I had to flash and reset several times, I used several USB cables but mostly the flashing process interrupted. I am just guessing but maybe limiting the USB to USB2-speeds would eliminate the issue with cable or I/O error handling, whatever. I had 2 successfull attempt out of say 20! The flashing stopped anywhere between 35% to 98%, it felt like a random occassion than a rule. Yeah, I also enabled the serial programing option in a few atempts but with not difference. |
I have RTL9210B-CG with exactly same issue. However, advise to use externally powered usb hub didn't help. I updated firmware from 1.23 to 1.27 with _0.cfg - didn't help either. |
Tested also v1.29.12 and nothing. |
For me, it does not work with the latest kernel. After downgrading to 20220830 it started using UAS driver again. |
That probably has to do with the device+firmware being reported in the past not behaving properly under UAS driver. Look for these in dmesg:
You can disable the blacklisting in some config file. |
You are right But I don't think there is a way to remove/disable it without rebuilding the kernel. |
This should override quirk:
|
I added this to /boot/cmdline.txt and uas is back:
|
@partment
|
@PANKAJ3312 |
Hi thanks for your help
My chipset is RTL9201R not RTL9210B,and it's a 2.5" case that takes
mechanical hard drive or ssd drive not nvme case,Will this work on my
chipset??
…On Thu, Jan 18, 2024, 4:34 PM Martin Mokrejš ***@***.***> wrote:
For RTL9210B chipset there is 1.32.87 available. But you nly need to
update the configuration. Use the MP Tool to upload a new configuration
file. Here is how you can disable the time-based sleep:
diff -u -w RTL9210AB_v1.27.24/RTL9210_Lite_10.cfg /mnt/ntfs/Users/dell_e5580/RTL9210B/RTL9210AB_v1.27.24/RTL9210_Lite_0.cfg
--- RTL9210AB_v1.27.24/RTL9210_Lite_10.cfg 2022-06-28 14:47:39.438314800 +0200
+++ RTL9210AB_v1.27.24/RTL9210_Lite_0.cfg 2022-06-28 15:17:33.399543900 +0200
@@ -21,7 +21,7 @@
ASPMDIS = 0x0
;10 minutes of idle time will disable pcie power
-;PCIE_PWRCUT_THRES = 0xa
+PCIE_PWRCUT_THRES = 0x0
;EN_UPS = 0x0
;PD = 0x0
It was already described above in #4130 (comment)
<#4130 (comment)>
I fetched from
https://www.mediafire.com/file/t4vnjscwbw3g6ad/Realtek_RTL9210_1.32.87.zip/file
https://station-drivers.com/index.php/en/component/remository/Drivers/Realtek/NVMe-USB-3.1/Realtek-RTL92xx(B)-NVMe-USB-3.1-Controller-firmware-Version-1.32.87.082923/lang,en-gb/
See https://forum.gamer.com.tw/C.php?bsn=60030&snA=626346 anf
https://station-drivers.com/index.php/en/component/remository/Drivers/Realtek/NVMe-USB-3.1/Realtek-RTL92xx(B)-NVMe-USB-3.1-Controller-firmware-Version-1.32.87.082923/lang,en-gb/
—
Reply to this email directly, view it on GitHub
<#4130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJCXONL372AZ723QAKFCNKDYPEXG7AVCNFSM4XIO5O4KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBZHA2TSNRQGI4Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Can someone please LOG usb traffic (using wireshark for example) while updating the firmware and send me the capture? |
Hi folks, thanks for all the insights. I am having the same problem: 9210 (non-B version) throws an error upon connecting, doesn't recognize pratitions. Is recognized and accessible under Windows AND on my Home Assistant Yellow (board for RPI4- compute module). I went and updated the firmware, and now it is not even recognized in dmesg. When I connected it through a non-powered USB-Hub it got recognized again, with the same errors. This enclosure used to work with a different NVME 2 years ago, I used it as a boot drive for the RPi4. I assume something in the RPi4 bootloader/kernel changed or my new drive which now has DRAM, might draw more power than the older one. I used this firmware here: https://station-drivers.com/index.php/en/component/remository/Drivers/Realtek/NVMe-USB-3.1/Realtek-RTL92xx(A-B)-NVMe-USB-3.1-Controller-firmware-Version-1.29.12.011122/lang,en-gb/ |
But will it work on mine? since I have RTL9201R ??? How can I upload the |
EDIT: Please see https://rys.pw/books/wiki/page/raspberry-pi-5-nvme-and-usb-woes if you're having issues, I attempted to mention all possibilities that can arise, at least with my hardware. EDIT2: Got it working,
Not very well, there's a suggested patch to disable it for the device by default - https://patchwork.kernel.org/project/linux-usb/patch/[email protected]/ I have the RPi5 8GB with the official 27W power supply, I have a RTL9210B Sabre enclosure from AliExpress connected by a PremiumCord kabel USB-C - USB 3.0 A (USB 3.1 generation 2, 3A, 10Gbit/s) 2m with a It CAN power it well if it manages to negotiate USB 3.2 which gives it 896mA, but in 99% of the cases it does 2.10 and fails to boot because it's limited to 500mA, as can be seen in Bad Pi connect
Good Pi connect
The firmware was updated on the enclosure from: To: There is some stupid issue that happens with the USB negotiation most of the time. I suspect cable length(combined with Pi5 USB issues) at this point, friend has a very short cable in a similar setup while I am testing with my only available 2m one. My friend got it working well with EEM2-SG2 SUPERSPEED+ USB-C - M.2 NVME & SATA SSD RAW BOX and its included cable and a |
Please guys, it takes a few minutes to do that. Can you help? |
An enclosure with the chip is 12 EUR or less, takes a few minutes to order. |
Hi currenty my configuration cfg file contents is that: VID = 0xbda what i change to disable totally the disk sleep timer?? thanks |
@actraiser30 pretty sure you need to remove |
thanks i did that it sleeps again after 10-15 minutes,anything else? |
SUSPEND_DISK_OFF? |
thanks i did that i works,the only thing i need to do is when i restart the Raspberry pi the disk power off and power on again something to change in the configuration file about the on-off on restart??? |
This problem is not only happening on the Pi, also on various other Linux systems. It seems there is a general issue with RTL9210* and recent kernels. |
Anyone knows what is the setting in the config file that disables the power off at reboot ?? So the disk stays on/working??? For example everytime I reboot the os the disk closes and opens Config file contents: VID = 0xbda |
@actraiser30 You already asked that elsewhere last week and even got a response. |
Nice to spy on posts,That answer is irrelevant to my issue so it does not help me |
Hey all Just chipping in here, having stumbled across this post when I encountered a similar error with my UGREEN NVMe caddy.
I tried replacing the cable, to no affect - but then took the caddy apart, removed the NVMe drive, blew into the connector and reseated the drive. It then started working, surprisingly. So if you've not tried this yet, give it a shot. |
I too have this |
You read and tried everything I link to in the beginning of this message? |
The latest version (V1.33.7.101923) seems to work quite well on my Raspberry pi 5 (with 27W charger and Raspberry PI OS) and on desktop (Thinkcentre M720Q and Manjaro 24). I tested with Samsung SSD 970 PRO 512 GB, 970 Evo plus (refresh model since 2021/2022) 2TB, 980 PRO 1TB. |
Could you please show which configuration you where using? It flashed my Sabrent one with 1.33.7.191023, and now it does not recognize the nvme drive inside the enclosure anymore. |
Just to drop this somewhere, my final solution was to get the official M.2 HAT+ which does not support 2280 nor the original case top or the original case fan, the $5 active cooler, three hair ties and a glue-on hook for wall-mounting and having a 2280 originally in a RTL9210 to work properly. This setup is noticeably more fan-noisy, but it works great. |
@Lalarian Is the chip model RTL9210B ? What is the model of your Sabrent SSD enclosure ? I also bricked one of my SSD enclosures due to a disconnection with my Windows VM, it's quite easy to unbrick:
This procedure worked for me with the Sabrent EC-SNVE. I used the files from V1.33.7.101923 to flash the SSD enclosure, i change some settings from to match the original .cfg ect... My config (Warning, tested/flashed with empty SSD Samsung 970 PRO to avoid data loss):
More info: https://github.com/bensuperpc/RTL9210 I tested with Samsung SSD 970 PRO 512 GB, 970 Evo plus (refresh model since 2021/2022) 2TB, 980 PRO 1TB, they are detected and work well. If it doesn't work, you can try with other firmware versions |
I can chip in on this that my adapter was incredibly flaky, dropped out with terrible All my problems were solved by upgrading from 1.23 to 1.33 firmware
|
Hey @Zibri I got 2 unknown adapters with the RTL9210 chip |
Thanks @bensuperpc for the repo with the list of firmwares! |
I recommend being cautious if you're using a virtual machine for flashing. I bricked two times of my devices and had to go through the unbricking procedure by resetting the ROM. During the flashing process, the device disconnects multiple times (It's normal), and the virtual machine's USB passthrough couldn't recognize and reconnect the device to the VM for some unknown reason, i used libvirt/KVM for my VMs. Since that incident, i always use my dedicated Windows PC to update firmware if the device isn't supported by fwupd. I'm glad this is useful to you ^^ |
Describe the bug
NVMe to USB encloser with RTL9210 chipset detected as USB2 (high-speed) device initialized but seems doesn't work. The device is present but cannot be used for partitioning
To reproduce
List the steps required to reproduce the issue.
Expected behavior
Discovered as 5000M (USB3 Bus) device and allows to manage NVMe disk.
Actual behaviour
System
Logs
dmesg
Additional context
Latest smartctl with chipset support
Looking for some help and ideas.
The text was updated successfully, but these errors were encountered: