dafta / DeckMTP

A DeckyLoader plugin for enabling MTP transfer over USB
https://deckbrew.xyz
Other
79 stars 5 forks source link

MTP driver crash on windows with usb 3.2 #9

Open KoTeYkA23 opened 1 year ago

KoTeYkA23 commented 1 year ago

Hi, I want to report a problem with usb 3.2 driver crash on windows, I tried onboard usb as well as pci e usb card, doesnt matter usb a or c, I only manage get it randomly work with type C cable 1 time, but it stoped work after update as well. Usb 2.0 cables work 100% fine. MTP Driver return code 10 (Insufficient system resources to complete the API call) or something like that (sorry I not use english version windows so that might be not exact description in device manager). My android phone works fine on any cables I tested. My deck bios version is 110. My computer is: rysen 5900x, b550 chipset, win11.

Anyway thanks in advance guys for doing valves work

dafta commented 1 year ago

This might be an issue with the driver installed on Windows. I haven't personally tested on Windows 11, might also be an issue.

You could try uninstalling the driver, plugging in the Deck again, and enabling DeckMTP, to let Windows reinstall the driver. If that doesn't work, we can see about other troubleshooting steps.

KoTeYkA23 commented 1 year ago

Nope, nothing change if I delete driver or updating it to similar, in the driver info driver date development is 2006 year, so it might be not only on win11

dafta commented 1 year ago

Okay, so I finally got a Windows machine to test it on, and at first it gave the same error. But, after shutting down the PC (shutting down, not restarting) for at least 10 seconds, and the Deck just for good measure, it worked on the first try. I'll have to investigate this a bit further, but for now, could you try doing the same?

KoTeYkA23 commented 1 year ago

Nope, after fully shutting down pc and reboot steamdeck mtp driver still crash (c to c but it souldn't matter), but it worked with front usb a to c, also I would like to report other issue, may be I'm just dum at permission managment in linux but my games folder on main drive that use heroic just not show up in mtp, after creating other folder it shows up normally, but as soon as I add game on that folder in heroic(and wine prefixes too) it disappears from mtp, I tried to add all permission for my user but nothing changed, it also happening with other folders, but I have no explanation of them dissapearing, here is screenshot of ssh and mtp in same folder No games

KoTeYkA23 commented 1 year ago

Front usb was 2.0 btw, so it didn't change anything

TuNdRa-Plains commented 7 months ago

This seems partially related to Windows in some form - Windows 11 exhibits this behaviour on X570 USB 3.x Controllers. However the USB 2.0 headers will connect & Run MTP Mode fine. I've dug through most of the Windows 11 suggested fixes short of a complete OS Reinstall and nothing resolves it on USB3. (This is across: Direct headers on the board, rear-panel USB, 2 different USB3 Hubs, 2 different cables)

Just for dev ref; this is on SteamOS 3.5.5, Bios F7A0119.

Honzackcz commented 7 months ago

This seems partially related to Windows in some form - Windows 11 exhibits this behaviour on X570 USB 3.x Controllers. However the USB 2.0 headers will connect & Run MTP Mode fine. I've dug through most of the Windows 11 suggested fixes short of a complete OS Reinstall and nothing resolves it on USB3. (This is across: Direct headers on the board, rear-panel USB, 2 different USB3 Hubs, 2 different cables)

Just for dev ref; this is on SteamOS 3.5.5, Bios F7A0119.

I can add to this with Windows 11 and X670E, any faster USB connection then 2.0 will crash while transferring a file, it can delete files and create empty files tho. (SteamOS 3.5.5, BIOS F7A0119)

It is the same thing with this issue: https://github.com/dafta/DeckMTP/issues/2#issuecomment-1485569340

dafta commented 2 weeks ago

Potentially fixed by 1.0.3, needs testing.

Honzackcz commented 2 weeks ago

DeckMTP 1.0.3 still doesn't work with higher USB version then 2.0 (SteamOS 3.5.19, BIOS F7A0120)

The USB-C to UBS-C issue ( https://github.com/dafta/DeckMTP/issues/2 ) is most likely the same issue with this one because only USB-C to USB-C cables I have are 3.0+

dafta commented 2 weeks ago

Did you try it again just now? Because the 1.0.3 version on the testing store was just updated an hour ago. Did you update it?

Honzackcz commented 2 weeks ago

Yep, I download the 1.0.3-f0917db from the testing store.

dafta commented 2 weeks ago

Okay, thanks for the info. I will try to replicate this and see if I can't find the issue.

By the way, I noticed you are using the F7A0120 BIOS version, which still had some issues with DRD. Would you be willing to test with version F7A0121 or newer?

Honzackcz commented 2 weeks ago

Well, I don't know how to update the BIOS manually. If it isn't too complicated, I may try.

dafta commented 2 weeks ago

It's not too complicated, it's just one command. You can download either the 121 update from here, or the newer 131 update from here. This is if you are on the LCD deck. For the OLED decks, there is a different BIOS.

And then use the following command to update it:

sudo /usr/share/jupiter_bios_updater/h2offt F7A0121_sign.fd -all -AC

You would change the F7A0121_sign.fd to F7A0131_sign.fd if you downloaded the 131 BIOS.

This is how the deck updates it as well, it's the "official" method of updating the BIOS, but I know updating the BIOS manually can be scary, and you're not obligated to do it.

Honzackcz commented 2 weeks ago

OK, I tried the F7A0131 and it still doesn't work.

dafta commented 2 weeks ago

This is on Windows?

Honzackcz commented 2 weeks ago

OH, I figured something out. Some time ago I did a bit of research on how exactly are connected USBs on my motherboard. There I find out that most of the USB controllers are from AMD but one that is used for 40Gbps USBs is from Intel. So, now I tried to use the Intel controller USB and it works just fine.

USB controller layout - ASUS ROG CROSSHAIR X670E HERO

dafta commented 2 weeks ago

Hmm okay, that's interesting. It could be some kind of hardware issue. Explains why I could never reproduce it, too. I'll see if I can find some machine where this happens, I could maybe detect it and lower the speed in that case.

Is this PC running Windows? Because I've seen reports that it might also be a Windows driver issue.

Honzackcz commented 2 weeks ago

Yep, Windows 11

dafta commented 2 weeks ago

Okay, thanks for all the info! I've got some debugging to do.

dafta commented 2 weeks ago

As far as I can tell, all of the people that have this issue are on Windows 11. If anyone has this issue on Windows 10, can you please notify me here?

Also if anyone who has this issue can test on Windows 10 on the same machine, that would be amazing.

KoTeYkA23 commented 2 weeks ago

Hi there, I tried build from main branch and it didnt work, only thing that working is message to enable drd when it disabled in bios, its not working nor in Linux nor in Win10, in linux dmesg reporting

config error 
Cannot enable. Maybe the USB cable is bad?

I tried other cables and ports but result is not any better my deck bios version is F7A0120

dafta commented 2 weeks ago

Did you install from the decky store? The 1.0.3 version from testing?

It could also be an issue with the 120 BIOS. You could try disabling DRD, restarting the deck, then enabling DRD again, or upgrading the BIOS as explained in the comment here.

KoTeYkA23 commented 2 weeks ago

Did you install from the decky store? The 1.0.3 version from testing?

No, I didnt look up for that, I builded from main, I'll give it a try if I manage to find that version

KoTeYkA23 commented 2 weeks ago

Interesting, last version from testing made my deck detect as a camera in Linux, but no files are available, d̶i̶s̶c̶o̶v̶e̶r̶ dolphin either drop me in my home folder or in that nonsense camera:/USB%2520PTP%2520Class%2520Camera@usb:006,007/

That is on usb3 ports and cable

KoTeYkA23 commented 2 weeks ago

Oh, it actually works, but again, only on usb 2

dafta commented 2 weeks ago

@KoTeYkA23 You had this issue with a Linux PC?

I did some testing and I also found some ports that don't work on my PC. Since this happens on Linux as well, I think that rules out driver issues on the PC.

I did some testing with other USB gadgets as well, besides MTP, and they don't work on those ports either.

At this point I'm thinking it's either a hardware issue, an issue with the USB driver on the deck, or an issue with the deck BIOS. I will definitely have to do more testing tomorrow, though. It might be that these ports didn't work for other reasons, and I haven't tried a USB 2 cable with them, yet. Will do that tomorrow.

KoTeYkA23 commented 2 weeks ago

@KoTeYkA23 You had this issue with a Linux PC?

Yeah, I moved to Linux with win10 dualbooting, so its the same pc that I created issue about

At this point I'm thinking it's either a hardware issue, an issue with the USB driver on the deck

Seems very likely, cause one of my port dont even ''slowcharge" deck, but works completly fine with my android phone and mtp on it

dafta commented 2 weeks ago

Seems very likely, cause one of my port dont even ''slowcharge" deck, but works completly fine with my android phone and mtp on it

If you turn off DRD in BIOS and go back to xHCI, does the deck slowcharge then? If so, I think we can at least isolate this issue to either the BIOS or the USB drivers.

KoTeYkA23 commented 2 weeks ago

If you turn off DRD in BIOS and go back to xHCI, does the deck slowcharge then? If so, I think we can at least isolate this issue to either the BIOS or the USB drivers.

Yep, turned drd off and it still doesnt charge, so it either hardware problem or deck's software