this post was submitted on 23 Sep 2024
30 points (94.1% liked)

Linux

47890 readers
1369 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Is that a thing at all? I doubt it but thought I'd check just in case.

all 27 comments
sorted by: hot top controversial new old
[–] BorgDrone@lemmy.one 26 points 1 month ago (1 children)
[–] avidamoeba@lemmy.ca -5 points 1 month ago* (last edited 1 month ago) (1 children)

Oh yes, X would be AMD fixing their defective USB controllers but that won't happen on a system produced years ago. 😂

[–] gravitas_deficiency@sh.itjust.works 19 points 1 month ago* (last edited 1 month ago) (1 children)

You are evidently missing the entire point of what the X-Y problem is.

What are you ACTUALLY trying to accomplish here? Why do (think) you need to throttle your USB speed to 50%?

[–] avidamoeba@lemmy.ca 12 points 1 month ago* (last edited 1 month ago) (1 children)

I am trying to transfer data via USB at high speed without data corruption, silent resets and occasional device disconnects. Those are things that happen because the USB controllers on my motherboard made by AMD with some help from ASMedia do not function correctly at the speed they advertise. So given the problem the right solution is to get a firmware or hardware fix for these USB controllers, however that's unlikely to happen. So I'm trying to find a workaround. I already have one (PCIe add-in card) but now I'm also testing running the bad controllers at half-speed which seems successful so far but I was wondering if there's a way to do it in software. I'm currently bottlenecking the links by using 5Gb hubs between the controllers and the devices.

[–] gravitas_deficiency@sh.itjust.works 12 points 1 month ago* (last edited 1 month ago) (1 children)

A bit of searching brought me here - would this suit your purposes?

Edit: amusingly, one of the replies to the original question also points out that this is yet another classical example of the X-Y problem

[–] avidamoeba@lemmy.ca 7 points 1 month ago* (last edited 1 month ago) (1 children)

Unfortunately it won't because the transfers are happening between ZFS and the hardware storing the data so I can't control the data rate at the application level (there are many different applications) or even at the ZFS level. This is why in this particular case I'm stuck with a potential hardware-related workaround. I mean I could do something stupid like configuring a suboptimal recordsize in ZFS but there could still be spikes and I'd prefer to get the hardware to stop losing bits and hoping ZFS would catch that. Decreasing data rates is a generally acceptable strategy to deal with signalling issues, if the decreased rate is usable for the application at hand. In my case it is.

[–] gravitas_deficiency@sh.itjust.works 9 points 1 month ago* (last edited 1 month ago) (1 children)

Heh, we’re still on the X-Y problem to a degree.

I’d recommend another top-level reply to your post, or a new post, describing precisely how your hardware and ZFS pools are set up, alongside a description of the firmware/stability issues you’re seeing, and solutions you’ve tried already. We’re a bit far down a comment chain at the moment, so you’ll probably get more engagement that way. Not trying to be an ass - this actually sounds like an interesting (and, I’m sure, obnoxious) problem. Putting all the cards on the table will help people give you a more complete answer more quickly.

[–] avidamoeba@lemmy.ca 7 points 1 month ago (1 children)

The thing is that I'm already at the last couple of leaves in the investigation tree and I'm not willing to change anything upwards of the USB driver level. That's why there isn't much point in getting people to spin their wheels for solutions I can't or won't apply. If I was completely unable to get the data corruption and disconnects under control, I'd trash the system and replace it with Intel. Fortunately, a PCIe add-in USB controller seems to work well so I avoided the most costly solution. At this point I don't actually need to get the motherboard ports to work well but I'm curious to follow down the signalling rabbit hole because I'm not the only one who's having this problem and the problem doesn't affect just this one use case. If I find a solution like an in-line 5Gb USB hub (reduces data rate), or just using USB-C ports instead of USB-A (reduces noise), or using this kind of cable instead of that kind, I could throw that as a cheaper workaround in this ZFS thread and elsewhere. The PCIe cards work but aren't cheap.

That all makes sense - I guess at this point, I’m simply trying to offer some constructive criticism about how to present nuanced problems that involve both hardware and software gremlins in a way that you’ll get the most productive conversation and interaction from the user base here.

[–] over_clox@lemmy.world 17 points 1 month ago (1 children)

I do not have an answer for you, but if I may ask...

Why?

[–] avidamoeba@lemmy.ca 10 points 1 month ago* (last edited 1 month ago) (1 children)

Great question. In short, garbagy AMD USB controllers. I recently switched to a newer AMD board and have been hit with the same issues faced by these poor sods. I've been conducting testing over the last week, different combinations of ports, cables, loads, add-in PCIe USB controllers. The add-in cards seem to behave well, which is one way the folks from that thread solved their problems. The other being changing to Intel-based systems. Yesterday however I was watching an intro about USB redrivers by TI and they were discussing various signalling issues that could occur and how redrivers help. That led me to form the hypothesis that what I'm experiencing might be signalling related. E.g. that the combination of controllers/ports/cables simply can't handle 10Gbps. That might be noise from some of those devices or surrounding ones that causes signal loss when operating at 10Gbps, speeds this setup can actually achieve. In order to test that I tried placing the DAS boxes behind a 5Gb hub plugged in a port that has previously shown a failure. So far it's stable. This is why I was wondering whether there's some magic in the kernel that could allow configuring 10Gb ports to operate at 5Gb.

[–] possiblylinux127@lemmy.zip 5 points 1 month ago (1 children)

Fix the issue with 10G instead of trying to limit it. It might be as simple as a bad cable

[–] avidamoeba@lemmy.ca 3 points 1 month ago

I've been trying. Nothing has worked so far. I've got a few more cables/permutations to try.

[–] data1701d@startrek.website 6 points 1 month ago (1 children)

Assuming you have a free PCIe slot, maybe just buy a PCIe USB card to use instead of what seems to be a faulty AMD USB controller.

[–] avidamoeba@lemmy.ca 3 points 1 month ago* (last edited 1 month ago)

Already done. I'm just trying to exhaust all the hypotheses I have in case I stumble upon a durable workaround that is applicable for others and cheaper. Good USB add-in cards are not cheap.

[–] ethd@beehaw.org 6 points 1 month ago (2 children)

It'll be compatible with 5 Gbps devices, but if you're intentionally looking to restrict even 10 Gbps devices down to 5 Gbps for some reason, you might be able to find something in your BIOS that lets you do that, or you can get a USB 3.0 extension cable that'll limit your speeds to 5 Gbps.

[–] avidamoeba@lemmy.ca 2 points 1 month ago* (last edited 1 month ago) (1 children)

The extension cable is a great idea. I'm currently trying 5Gb hubs on the path. Seems to work.

E: I think the USB-A connector for 5Gb and 10Gb is the same. The 10Gb cable must simply carry double the rate without losing data due to noise. Similar to Cat 5 vs Cat 6 ethernet cables. If so an extension should keep the controller-advertised speed downstream. Seems like hubs are the only option.

[–] entropicdrift@lemmy.sdf.org 3 points 1 month ago

There are powered extensions, so one of those might work, but a hub is certainly a comparable price and a more compact solution

[–] krolden@lemmy.ml 2 points 1 month ago

It will use whatever connection speed the device connected supports up to the speed of the host interface

[–] Deckweiss@lemmy.world 1 points 1 month ago* (last edited 1 month ago) (1 children)

What kind of controller and what kind of Gb are you talking about?

Storage controller for USB sticks?

Or gaming controller with an advertised Gb/s USB bandwidth?

[–] aBundleOfFerrets@sh.itjust.works 3 points 1 month ago* (last edited 1 month ago) (1 children)

Probably a USB controller, considering that is what they said explicitly in the title. And probably the bandwidth the controller advertises to downstream devices.

[–] avidamoeba@lemmy.ca 2 points 1 month ago (1 children)

Yup. A USB host controller. Specifically AMD Bixby.

[–] Deckweiss@lemmy.world 3 points 1 month ago (1 children)

Just fyi

a storage controller on an USB stick also has programmed "Gb" for addressing the flash storage. For example if you want to remove one of the flash chips, you could be asking how to reprogram the controller to use only half of it's initial capacity. Thats what I was confused about.

But you actually meant Gb/s.

[–] avidamoeba@lemmy.ca 2 points 1 month ago* (last edited 1 month ago)

You're right, the correct term is Gb/s or Gbps. Edited.