USB3 ports are not stable

Post Reply
Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

USB3 ports are not stable

Unread post by Viald » Mon Sep 02, 2019 5:08 am

Hello.
Here is my config:
3 Data disks: Seagate Backup Plus Portable 5TB External Hard Drive HDD USB3
1 Boot disk: Sandisk SSD 1T (Enclosure USB3 Orico USB3)

All disks are directly connected to N2
UAS driver has been blacklisted for all disks.

Everything works fine until I start to stress disks.
As soon as I stress them I have errors from xhci-hcd, and all disks become inaccessible, even the boot one.

Below 2 exemples of log when the driver crashes.

Code: Select all

[  136.985396@1] hub 2-1.3:1.0: hub_ext_port_status failed (err = -108)
[  136.985410@0] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  136.993503@0] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  136.999562@0] blk_update_request: I/O error, dev sda, sector 2536668288
[  137.004110@1] blk_update_request: I/O error, dev sda, sector 9277837008
[  137.010827@0] blk_update_request: I/O error, dev sda, sector 9227504776
[  137.017239@4] blk_update_request: I/O error, dev sda, sector 2775711840
[  137.023802@1] blk_update_request: I/O error, dev sda, sector 0
[  137.029594@1] blk_update_request: I/O error, dev sda, sector 2536668528
[  137.036178@0] blk_update_request: I/O error, dev sda, sector 2417536000
[  137.042918@0] blk_update_request: I/O error, dev sda, sector 358473088
[  137.094841@0] blk_update_request: I/O error, dev sdb, sector 3408304
[  137.095635@0] blk_update_request: I/O error, dev sdc, sector 52262960
[  137.993311@0] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  138.065503@5] Aborting journal on device sdb2-8.
[  138.065546@5] Buffer I/O error on dev sdb2, logical block 391509, lost sync page write
[  138.072436@5] EXT4-fs (sdb2): Delayed block allocation failed for inode 10941 at logical offset 14 with max blocks 1 with error 30
[  138.072490@1] Buffer I/O error on dev sdb2, logical block 0, lost sync page write
[  138.072524@1] EXT4-fs (sdb2): previous I/O error to superblock detected
[  138.072548@1] Buffer I/O error on dev sdb2, logical block 0, lost sync page write
[  138.072565@1] EXT4-fs error (device sdb2): ext4_journal_check_start:56: Detected aborted journal
[  138.072567@1] EXT4-fs (sdb2): Remounting filesystem read-only
[  138.072575@1] EXT4-fs (sdb2): previous I/O error to superblock detected
[  138.072590@1] Buffer I/O error on dev sdb2, logical block 0, lost sync page write
[  138.072597@1] EXT4-fs error (device sdb2): ext4_journal_check_start:56: Detected aborted journal
[  138.084392@5] JBD2: Error -5 detected when updating journal superblock for sdb2-8.

Code: Select all

[  292.124391@0] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  292.124399@1] hub 2-1:1.0: hub_ext_port_status failed (err = -108)
[  292.124405@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124409@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124413@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124416@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124419@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124421@1] usb 2-1-port3: Cannot enable. Maybe the USB cable is bad?
[  292.124426@1] usb 2-1-port3: cannot disable (err = -108)
[  292.124432@1] hub 2-1:1.0: hub_ext_port_status failed (err = -108)
[  292.124435@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124438@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124441@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124444@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124447@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124448@1] usb 2-1-port3: Cannot enable. Maybe the USB cable is bad?
[  292.124452@1] usb 2-1-port3: cannot disable (err = -108)
[  292.124456@1] hub 2-1:1.0: hub_ext_port_status failed (err = -108)
[  292.124460@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124463@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124466@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124469@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124472@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124473@1] usb 2-1-port3: Cannot enable. Maybe the USB cable is bad?
[  292.124476@1] usb 2-1-port3: cannot disable (err = -108)
[  292.124481@1] hub 2-1:1.0: hub_ext_port_status failed (err = -108)
[  292.124484@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124487@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124490@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124493@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124496@1] usb 2-1-port3: cannot reset (err = -108)
[  292.124497@1] usb 2-1-port3: Cannot enable. Maybe the USB cable is bad?
[  292.124500@1] usb 2-1-port3: cannot disable (err = -108)
[  292.124503@1] usb 2-1-port3: cannot disable (err = -108)
[  292.124548@1] hub 2-1:1.0: hub_ext_port_status failed (err = -108)
[  292.310273@0] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  292.318310@0] blk_update_request: I/O error, dev sda, sector 0
[  292.348359@1] blk_update_request: I/O error, dev sdb, sector 78978496
[  292.349318@1] blk_update_request: I/O error, dev sdb, sector 2501274112
[  292.355847@1] blk_update_request: I/O error, dev sdb, sector 2784932616
[  292.362463@1] blk_update_request: I/O error, dev sdb, sector 783561504
[  292.368924@5] blk_update_request: I/O error, dev sdb, sector 78978560
[  292.375291@5] blk_update_request: I/O error, dev sdb, sector 2784932744
[  292.381966@1] blk_update_request: I/O error, dev sdb, sector 783561520
[  292.388453@1] blk_update_request: I/O error, dev sdb, sector 78978624
[  292.394892@1] blk_update_request: I/O error, dev sdb, sector 783561536
[  292.402431@1] Buffer I/O error on device sdb1, logical block 97944832
[  292.407693@1] Buffer I/O error on device sdb1, logical block 97944833
[  292.414095@1] Buffer I/O error on device sdb1, logical block 97944834
[  292.420510@1] Buffer I/O error on device sdb1, logical block 97944835
[  292.426917@1] Buffer I/O error on device sdb1, logical block 97944836
[  292.433332@1] Buffer I/O error on device sdb1, logical block 97944837
[  292.440011@1] Buffer I/O error on device sdb1, logical block 97944838
[  292.446161@1] Buffer I/O error on device sdb1, logical block 97944839
[  292.452566@1] Buffer I/O error on device sdb1, logical block 97944840
[  292.458977@1] Buffer I/O error on device sdb1, logical block 97944841
[  292.504120@1] Aborting journal on device sdb1-8.
[  292.504185@1] Buffer I/O error on dev sdb1, logical block 610304000, lost sync page write
[  292.505103@2] EXT4-fs (sdb1): Delayed block allocation failed for inode 59965443 at logical offset 16384 with max blocks 2048 with error 30
[  292.505105@2] EXT4-fs (sdb1): This should not happen!! Data will be lost
[  292.505105@2] 
[  292.505109@2] EXT4-fs error (device sdb1) in ext4_writepages:2853: IO failure
[  292.539158@3] JBD2: Error -5 detected when updating journal superblock for sdb1-8.
[  292.539212@1] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
[  292.542617@2] EXT4-fs (sdb1): previous I/O error to superblock detected
[  292.542640@2] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
[  292.542647@2] EXT4-fs error (device sdb1): ext4_journal_check_start:56: Detected aborted journal
[  292.542648@2] EXT4-fs (sdb1): Remounting filesystem read-only
[  292.542652@2] EXT4-fs (sdb1): previous I/O error to superblock detected
[  292.542684@0] Buffer I/O error on dev sdb1, logical block 229, lost async page write
[  292.542733@1] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
[  292.542748@1] EXT4-fs (sdb1): ext4_writepages: jbd2_start: 1024 pages, ino 59965443; err -30
[  292.542761@0] Buffer I/O error on dev sdb1, logical block 479723536, lost async page write
[  292.542775@0] Buffer I/O error on dev sdb1, logical block 479727648, lost async page write
[  292.543585@0] EXT4-fs error (device sdb1) in ext4_writepages:2853: IO failure
[  292.543595@0] EXT4-fs (sdb1): previous I/O error to superblock detected
[  292.543650@0] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
[  292.568526@0] Aborting journal on device sdd1-8.
[  292.648312@0] Buffer I/O error on dev sdd1, logical block 610304000, lost sync page write
[  292.648329@2] JBD2: Error -5 detected when updating journal superblock for sdd1-8.
[  293.132326@0] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  293.648452@0] Aborting journal on device sdc2-8.
[  293.648540@0] Buffer I/O error on dev sdc2, logical block 391509, lost sync page write
[  293.656089@0] JBD2: Error -5 detected when updating journal superblock for sdc2-8.
[  293.658009@1] EXT4-fs error (device sdc2) in ext4_do_update_inode:5083: Journal has aborted
[  293.658070@1] EXT4-fs (sdc2): Remounting filesystem read-only
[  293.658082@1] EXT4-fs error (device sdc2) in ext4_writepages:2853: IO failure
[  293.658085@1] EXT4-fs (sdc2): previous I/O error to superblock detected
[  293.659249@5] systemd-journald[2438]: Failed to rotate /var/log/journal/e00bd6223a7245d0aa6e19e0ab12a024/system.journal: Read-only file system
[  293.659268@5] systemd-journald[2438]: Failed to rotate /var/log/journal/e00bd6223a7245d0aa6e19e0ab12a024/user-1000.journal: Read-only file system
[  293.663703@5] systemd-journald[2438]: Failed to write entry (12 items, 386 bytes) despite vacuuming, ignoring: Input/output error
[  293.664143@5] systemd-journald[2438]: Failed to rotate /var/log/journal/e00bd6223a7245d0aa6e19e0ab12a024/system.journal: Read-only file system
[  293.664162@5] systemd-journald[2438]: Failed to rotate /var/log/journal/e00bd6223a7245d0aa6e19e0ab12a024/user-1000.journal: Read-only file system
[  293.668366@5] systemd-journald[2438]: Failed to write entry (12 items, 373 bytes), ignoring: Input/output error
[  293.668739@5] systemd-journald[2438]: Failed to rotate /var/log/journal/e00bd6223a7245d0aa6e19e0ab12a024/system.journal: Read-only file system
[  293.668757@5] systemd-journald[2438]: Failed to rotate /var/log/journal/e00bd6223a7245d0aa6e19e0ab12a024/user-1000.journal: Read-only file system
[  293.673181@5] systemd-journald[2438]: Failed to write entry (12 items, 377 bytes), ignoring: Input/output error
[  294.135651@5] EXT4-fs error (device sdc2): __ext4_get_inode_loc:4466: inode #12: block 1057: comm systemd-journal: unable to read itable block
[  294.142952@5] EXT4-fs (sdc2): previous I/O error to superblock detected
[  294.149637@5] EXT4-fs error (device sdc2): __ext4_get_inode_loc:4466: inode #15: block 1057: comm systemd-journal: unable to read itable block
[  294.162206@5] EXT4-fs (sdc2): previous I/O error to superblock detected
[  294.167067@1] EXT4-fs error (device sdc2): ext4_find_entry:1454: inode #7098: comm kworker/u12:4: reading directory lblock 0
[  294.170782@3] EXT4-fs error (device sdc2): ext4_find_entry:1454: inode #60455: comm systemd: reading directory lblock 0
[  294.190663@2] EXT4-fs (sdc2): previous I/O error to superblock detected
[  294.190837@5] EXT4-fs error (device sdc2): __ext4_get_inode_loc:4466: inode #7989: block 1556: comm systemd-journal: unable to read itable block
[  294.210147@3] EXT4-fs (sdc2): previous I/O error to superblock detected
[  294.216741@4] EXT4-fs (sdc2): previous I/O error to superblock detected
[  294.223441@4] EXT4-fs error (device sdc2): __ext4_get_inode_loc:4466: inode #289: block 1075: comm systemd-journal: unable to read itable block
[  294.228042@5] EXT4-fs error (device sdc2): ext4_find_entry:1454: inode #7211: comm (usbmount): reading directory lblock 0
[  294.235592@1] EXT4-fs error (device sdc2): ext4_find_entry:1454: inode #66481: comm (umount): reading directory lblock 0
I had a doubt about the power of the PSU. To eliminate this doubt I use a computer PSU with 12V and 18A
IMG_20190901_214729.jpg
IMG_20190901_214729.jpg (466.38 KiB) Viewed 3599 times

Unfortunately this is still unstable.

User avatar
tobetter
Posts: 4426
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 66 times
Been thanked: 294 times
Contact:

Re: USB3 ports are not stable

Unread post by tobetter » Mon Sep 02, 2019 12:29 pm

Can you run the command and share the output?

Code: Select all

$ cat /proc/cmdline
By any chance, can you wire the power of USB port from PSU, not from USB port?

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Mon Sep 02, 2019 3:59 pm

tobetter wrote:
Mon Sep 02, 2019 12:29 pm
Can you run the command and share the output?

Code: Select all

$ cat /proc/cmdline

Code: Select all

root=PARTUUID=03823826-02 rootwait rw console=ttyS0,115200n8  no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=1080p60hz cvbsmode=576cvbs max_freq_a53=1896 max_freq_a73=1800 maxcpus=6 voutmode=  disablehpd=false cvbscable= overscan=100  monitor_onoff=false usb-xhci.tablesize=2 logo=osd0,loaded usb-storage.quirks=0bc2:ab28:u,0bc2:ab30:u,152d:0578:u
tobetter wrote:
Mon Sep 02, 2019 12:29 pm
By any chance, can you wire the power of USB port from PSU, not from USB port?
Do you mean powerred each USB device with PSU using cables like this one ? https://www.amazon.fr/Galaxyworld%C2%AE ... B00ENXI37C or using a powered USB hub connected to the PSU ?

User avatar
tobetter
Posts: 4426
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 66 times
Been thanked: 294 times
Contact:

Re: USB3 ports are not stable

Unread post by tobetter » Mon Sep 02, 2019 4:07 pm


Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Mon Sep 02, 2019 4:33 pm

It takes a long before I receive them. Is there any big difference if I use a powered USB hub instead ?

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Tue Sep 03, 2019 6:14 am

Such bad news :(

I did other tests booting on the SDcard to avoid loosing the system when the USB driver crashed.
I use the same wiring as previous, first with kernel 4.9.187 and then with kernel 5.3.0 RC6.

In both case the result is the same. After few minutes of disk stress tests, the xhci-hcd driver died and I loose the 4 USB disks.
I disconnected and connected again the USB disks without success. lsusb -t gave nothing connected.

Code: Select all

root@odroid:/# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
I tried to connect other usb devices like bluetooth and keyboard as well but again nothing was detected.

Does it mean that the USB hardware controller was completely crashed ? If so, it's not matter of power issue. If it was the case, only disks should crash and not all the controller.
It seems to be a hardware issue :?

nogareth
Posts: 180
Joined: Sun Jan 25, 2015 3:40 am
languages_spoken: english , german
ODROIDs: N2 4GB, Xu3(sold), Xu4(dead)
Has thanked: 0
Been thanked: 0
Contact:

Re: USB3 ports are not stable

Unread post by nogareth » Tue Sep 03, 2019 4:06 pm

It could be some sort of port protection, that kills the ports until reboot if they draw too much power to prevent damage.

You should try again with one or two drives only and see if the problem still persists. If you have some soldering skills you could try and power your hard drives directly to take all load from the ports. (I did so with my xu4 Nas...)

User avatar
odroid
Site Admin
Posts: 33026
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 293 times
Been thanked: 413 times
Contact:

Re: USB3 ports are not stable

Unread post by odroid » Tue Sep 03, 2019 4:43 pm

I think the external hub controller seems to be damaged.

Do you have a DMM to measure the voltage of 5.0V rail on the 40pin header?
https://wiki.odroid.com/odroid-n2/hardw ... _2x20_pins

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Tue Sep 03, 2019 4:51 pm

Yes, 5.02 V on PIN 2 and 4

User avatar
odroid
Site Admin
Posts: 33026
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 293 times
Been thanked: 413 times
Contact:

Re: USB3 ports are not stable

Unread post by odroid » Tue Sep 03, 2019 4:58 pm

You PSU looks okay.

Did you buy your N2 board from us directly? or from a distributor/reseller?
If you bought it from us, please let me know your order number via PM.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Tue Sep 03, 2019 4:59 pm


User avatar
odroid
Site Admin
Posts: 33026
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 293 times
Been thanked: 413 times
Contact:

Re: USB3 ports are not stable

Unread post by odroid » Tue Sep 03, 2019 5:02 pm

Ok. well noted.
We will have an internal discussion and get back to you tomorrow since it is near evening in Korea here.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Tue Sep 03, 2019 5:05 pm

Thank you. Have a nice evening

User avatar
odroid
Site Admin
Posts: 33026
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 293 times
Been thanked: 413 times
Contact:

Re: USB3 ports are not stable

Unread post by odroid » Tue Sep 03, 2019 5:06 pm

A couple of more questions.
Do you use a 4GB N2 board? or 2GB?
Did you connect 12V output from the PC PSU?

BTW, we might need to check if on-board 5V USB power source can handle four external USB HDD storage devices at the same time or not.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Tue Sep 03, 2019 5:13 pm

I have a 4GB N2
Yes, the 12V PC PSU is connected to N2 (like in the picture above)

I tried to change the max_sectors_kb to 32 without success (viewtopic.php?t=35031)
I also see to change the default internal peripheral clock to 222. Currently it is 166

User avatar
odroid
Site Admin
Posts: 33026
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 293 times
Been thanked: 413 times
Contact:

Re: USB3 ports are not stable

Unread post by odroid » Tue Sep 03, 2019 5:22 pm

12Volt input must be fine.
But I have a big concern about the thickness of the wire. It is too thin to handle over 35Watt.
Consider using a much thicker wire to have a better voltage regulation.

If you have an old boot loader, the int clock could be 166Mhz.
It is hard to know why you could not update the boot loader.

Anyway, we will contact you tomorrow.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Tue Sep 03, 2019 5:26 pm

Ok, I'll change the wires.

User avatar
odroid
Site Admin
Posts: 33026
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 293 times
Been thanked: 413 times
Contact:

Re: USB3 ports are not stable

Unread post by odroid » Tue Sep 03, 2019 6:01 pm

Meanwhile, please try this latest image to make sure if you have a hardware problem or not.
https://wiki.odroid.com/odroid-n2/os_im ... u/20190806

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Wed Sep 04, 2019 5:18 pm

Hello.
1/ I have modified the wires, run tests => Failed less than 1 min later

IMG_20190903_192105.jpg
IMG_20190903_192105.jpg (503.09 KiB) Viewed 3260 times


2/ I have installed Linux Kernel LTS 4.9.187 on SDcard, run tests during more that one hour => Success !!!

3/ I did an online update, the kernel upgrade to 4.9.190-61, run tests = >Failed less than 1 min later

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Wed Sep 04, 2019 5:20 pm

And the clockrate is now 222MHz

User avatar
odroid
Site Admin
Posts: 33026
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 293 times
Been thanked: 413 times
Contact:

Re: USB3 ports are not stable

Unread post by odroid » Wed Sep 04, 2019 5:26 pm

Thank you for sharing the test result and your hardware seems to be fine.

Give us a few more days to prepare a new Kernel update which has new USB 3.0 related patches from Amlogic.
It looks very solid and relatively better throughput according to our initial test. But we need a few more days to complete our test process.
I think we can release a Kernel update early next week. Please be patient.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Wed Sep 04, 2019 5:32 pm

Ok. Thank you.
Will be possible to upgrade to this new version ?

User avatar
odroid
Site Admin
Posts: 33026
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 293 times
Been thanked: 413 times
Contact:

Re: USB3 ports are not stable

Unread post by odroid » Wed Sep 04, 2019 5:40 pm

I think so.

User avatar
tobetter
Posts: 4426
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 66 times
Been thanked: 294 times
Contact:

Re: USB3 ports are not stable

Unread post by tobetter » Wed Sep 04, 2019 6:11 pm

Viald wrote:
Wed Sep 04, 2019 5:32 pm
Ok. Thank you.
Will be possible to upgrade to this new version ?
I have my local build of 4.9.190 kernel with two USB patches, you can download to your ODROID-N2.
https://drive.google.com/open?id=1cDhZv ... RNfndedJXv

After downloading, extract it with this command, this command will replace and drop ths files in /lib/modules/4.9.190+/*, /media/boot/Image.gz and /media/boot/meson64_odroidn2.dtb. It would be good idea to back up the files in /media/boot before replacing the files.

Code: Select all

$ sudo tar xzvf odroidn2-4.9.190-usb-patch.tar.gz -C / --strip=1

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Wed Sep 04, 2019 6:31 pm

It seems that you also overwrite /lib/firmware

User avatar
tobetter
Posts: 4426
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 66 times
Been thanked: 294 times
Contact:

Re: USB3 ports are not stable

Unread post by tobetter » Wed Sep 04, 2019 6:35 pm

Viald wrote:
Wed Sep 04, 2019 6:31 pm
It seems that you also overwrite /lib/firmware
Yes. :)

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Wed Sep 04, 2019 6:44 pm

I give a try. With your patch my clockrate is still at 166Mhz and not 222Mhz.

User avatar
tobetter
Posts: 4426
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 66 times
Been thanked: 294 times
Contact:

Re: USB3 ports are not stable

Unread post by tobetter » Wed Sep 04, 2019 6:45 pm

Viald wrote:
Wed Sep 04, 2019 6:44 pm
I give a try. With your patch my clockrate is still at 166Mhz and not 222Mhz.
That's ok for the test and you could try without sg_tablesize=2.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Thu Sep 05, 2019 3:06 am

That sounds very good ! No more crash of USB driver for the moment.
But some of my software like wireguard are broken, the modules are not available anymore in /lib/module/4.9.190+
Trying to reinstall it and dependencies do not solve this new issue, have you set Secure Boot feature ?
Last edited by Viald on Thu Sep 05, 2019 5:20 am, edited 1 time in total.

User avatar
tobetter
Posts: 4426
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 66 times
Been thanked: 294 times
Contact:

Re: USB3 ports are not stable

Unread post by tobetter » Thu Sep 05, 2019 4:09 am

Viald wrote:
Thu Sep 05, 2019 3:06 am
That's sound very good ! No more crash of USB driver for the moment.
But some of my software like wireguard are broken, the modules are not available anymore in /lib/module/4.9.190+
Trying to reinstall it and dependencies do not solve this new issue, have you set Secure Boot feature ?
Secure Boot is not set and my kernel build is only for trial before new kernel package. Your feedback helps a lot to decide whether the patches can be applied or not. Please let us have a couple of days for the next release to have more test and feedback from more users for sure.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Thu Sep 05, 2019 3:40 pm

After more than one day, this is fully stable :) Thank you Guys !
I have even put back my previous power supply which is 12V 3A without any issue.
IMG_20190905_081215.jpg
IMG_20190905_081215.jpg (540.17 KiB) Viewed 3059 times

I have removed sg_tablesize=2, the throughput is 178MB/s read and 57MB/s write using SSD.
Could I have better speed if my clockrate is set to 222MHz ?

I can't wait for the new release :)
These users thanked the author Viald for the post:
gsgs (Thu Sep 05, 2019 9:09 pm)

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Fri Sep 06, 2019 2:42 am

Another very good news, now UAS driver works like a charm with all disks including my Seagate USB disks.
I have now 264 MB/s for reading and 65 MB/s for writing still using the SSD.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Tue Sep 10, 2019 9:14 pm

I have upgraded to 4.9.190-62

Code: Select all

# cat /sys/class/block/?d?/queue/max_sectors_kb
512
512
512
512
It was 1024 before

Code: Select all

# cat /sys/kernel/debug/clk/clk81/clk_rate 
166666664
Still not 222MHz :(

elatllat
Posts: 1627
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 26 times
Been thanked: 84 times
Contact:

Re: USB3 ports are not stable

Unread post by elatllat » Wed Sep 11, 2019 3:32 am

5.3 is stable with 1024 (but slow clk)

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Wed Sep 11, 2019 3:46 am

It was also stable at 1024 with the previous kernel build.
The last update has changed this setting. I suppose that it's not a mistake, and recommended to keep stable situation.

How can I increase the clock rate at 222 ?

User avatar
tobetter
Posts: 4426
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 66 times
Been thanked: 294 times
Contact:

Re: USB3 ports are not stable

Unread post by tobetter » Wed Sep 11, 2019 4:34 am

Viald wrote:
Wed Sep 11, 2019 3:46 am
It was also stable at 1024 with the previous kernel build.
The last update has changed this setting. I suppose that it's not a mistake, and recommended to keep stable situation.

How can I increase the clock rate at 222 ?
Actually you are not necessary to increase the clock rate which is recommended by Amlogic when the patch comes. If you do not use Petitboot, you will need to update U-boot in order to increase the close at 222.
https://github.com/hardkernel/u-boot/re ... droidn2-61
These users thanked the author tobetter for the post:
Viald (Thu Sep 12, 2019 3:24 am)

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Thu Sep 12, 2019 3:06 am

Thanks @Tobetter. I currently use Petitboot. But I'll follow Amlogic recommendation and not change the clock rate.

What about the max sector size which was previously at 1024 ?

Code: Select all

# cat /sys/class/block/?d?/queue/max_sectors_kb
512
512
512
512

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: USB3 ports are not stable

Unread post by Viald » Sat Sep 28, 2019 3:48 pm

Hello, last message to confirm that it is truly stable even with UAS driver.

Thank you all for this wonderful job.
These users thanked the author Viald for the post (total 2):
tobetter (Sat Sep 28, 2019 3:52 pm) • alpe (Mon Oct 07, 2019 10:38 pm)

alpe
Posts: 79
Joined: Sat Apr 12, 2014 1:21 pm
languages_spoken: portuguese, english
ODROIDs: C1, N2 4GB
Location: Rio de Janeiro, Brazil
Has thanked: 20 times
Been thanked: 6 times
Contact:

Re: USB3 ports are not stable

Unread post by alpe » Mon Oct 07, 2019 10:44 pm

Does the 4.9.y kernel works with UAS now or just 5.3 as someone mentioned above? Thanks.

User avatar
tobetter
Posts: 4426
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 66 times
Been thanked: 294 times
Contact:

Re: USB3 ports are not stable

Unread post by tobetter » Mon Oct 07, 2019 10:54 pm

alpe wrote:
Mon Oct 07, 2019 10:44 pm
Does the 4.9.y kernel works with UAS now or just 5.3 as someone mentioned above? Thanks.
Both...AFAIK.
These users thanked the author tobetter for the post:
alpe (Tue Oct 08, 2019 1:40 am)

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests