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

Pinecil V2 repeatedly reboots on 5v directly connected to MacBook after 2.21 update #1680

Open
blackketter opened this issue May 1, 2023 · 21 comments
Assignees

Comments

@blackketter
Copy link

After updating to 2.21.5d96470 with MacBook Air M2 with a USB-C cable directly connected between the devices, the Pinecil boots briefly, shows a 5.1v level, then crashes and reboots continuously.

This appears to be a PD issue, as the Pinecil won't crash if connected to a5v USB-A power source with a USB-A to USB-C cable.
Plugging into an 18v coax or 60w USB-C port, the device functions normally (after disabling bluetooth per #1661).

I can still put the device into the boot loader and refresh while connected to the Mac, but the expected behavior is that the device stays up with status and menus working (albeit with a DC low warning).

version 2.21.5d96470

@aguilaair
Copy link

I can reproduce the issue

@Ralim
Copy link
Owner

Ralim commented May 4, 2023

Would be great to know what is causing this; by any chance do either of you have access to a usb pd sniffer? Alternatively does Mac OS log why it power reset the port?

@eXponenta
Copy link

Mac m1, reproduced.
Needs use a usb 3.1 cable, with low-speed via hub works good.

IronOS 2.21.

@blackketter
Copy link
Author

Attached is a log of a couple of reboot cycles from Console.app, filtered on "usb":
pincil_reboot_log.txt

I see a line
default 18:16:25.373241-0700 kernel usb-drd0-port-ss@00200000: AppleUSB40XHCITypeCPort::cableChangeOccurred: cable disconnected, powering off
but am unsure what the lines leading up to that mean...

@Sanaki
Copy link

Sanaki commented May 11, 2023

I can report the same on my Linux laptop when connected to my TB3 port. Built 5d96470 myself, not that it seems relevant in this case. I could potentially try to bisect if it would help.

@greem
Copy link

greem commented May 16, 2023

This has just happened to me, using PineFlash on MacOS Ventura 13.3.1a.

Holding down + before inserting the USB-C cable shows some debug info when it's connected. When plugged in to a Pine Desktop supply (so 60W PD), it steps:

State 3
State 11
State 12 no vbus

and stays online. When connected to my iMac Thunderbird/USB-C port, it steps as follows:

State 3
State 12
State 11 no vbus
(restarts)

The Mac console has:

error	18:18:40.165891+0100	kernel	AppleIntelUSBXHCICommandRing: AppleUSBXHCICommandRing::setAddress: completed with result code 4
error	18:18:40.165960+0100	kernel	AppleIntelUSBXHCICommandRing: AppleUSBXHCICommandRing::executeCommand: command[184] 0x0000000000000000 00000000 2c013c01 got result 0x0000000000311b80 0b000000 2c008400 after 0ms (enqueued 0ms)
error	18:18:40.165963+0100	kernel	AppleIntelUSBXHCICommandRing: AppleUSBXHCICommandRing::stopEndpoint: completed with result code 11
default	18:18:40.166102+0100	kernel	HS05@14200000: AppleUSBHostPort::createDevice: failed to create device (0xe00002bc)
error	18:18:42.139170+0100	kernel	AppleIntelUSBXHCICommandRing: AppleUSBXHCICommandRing::executeCommand: command[187] 0x00000000004e3000 00000000 2d002c01 got result 0x0000000000311bb0 04000000 2d008400 after 0ms (enqueued 0ms)
error	18:18:42.139197+0100	kernel	AppleIntelUSBXHCICommandRing: AppleUSBXHCICommandRing::setAddress: completed with result code 4
error	18:18:42.139283+0100	kernel	AppleIntelUSBXHCICommandRing: AppleUSBXHCICommandRing::executeCommand: command[188] 0x0000000000000000 00000000 2d013c01 got result 0x0000000000311bc0 0b000000 2d008400 after 0ms (enqueued 0ms)
error	18:18:42.139290+0100	kernel	AppleIntelUSBXHCICommandRing: AppleUSBXHCICommandRing::stopEndpoint: completed with result code 11
default	18:18:42.139430+0100	kernel	HS05@14200000: AppleUSBHostPort::createDevice: failed to create device (0xe00002bc)

I'm working back through releases to find out what changed and where!

@Ralim
Copy link
Owner

Ralim commented May 16, 2023

Would absolutely love a bisection to see what borked it. Even a quick and dirty check after every N PR merges would be amazing if you can. No pressure of course :)

USB failing to execute / act is expected (as we don't run a USB stack).
I wouldn't expect that to cause the device to crash though.

Would be great if you could turn off the power pules in advanced settings and try again juust in case its that.

@greem
Copy link

greem commented May 16, 2023

Would be great if you could turn off the power pules in advanced settings and try again juust in case its that.

I did, and it didn't help. Neither does enabling or disabling PDVpdo. Haven't had time to fully explore a bisect yet (up to my elbows in writing a plugin for SpamAssassin at work) but it'd help if someone could provide a me .bin file that doesn't have the problem, which might be easier than starting with
git bisect good <first commit>; git bisect bad <last commit>

😄

@Sanaki
Copy link

Sanaki commented May 16, 2023

Welp... I went to bisect and found this issue occurring all the way back on 1fbcdcd, so bisecting to the source of the problem is out. Of note, it doesn't crash immediately after flashing the firmware, only after replugging the device. Right after flashing it boots and works fine.

@greem
Copy link

greem commented May 22, 2023

Oh. I plugged my pinecil in (PD65W) yesterday because I was building an ADS-B antenna and had forgotten it wouldn't boot.

It booted cleanly. I haven't changed anything nor tried to flash it since last Friday. Doncha just love non-deterministic behaviour?

@discip
Copy link
Collaborator

discip commented Jun 29, 2023

@blackketter
Is this related to #1661?
If so, please consider closing this to avoid duplicates. 😊
Or has that already been solved for you?

@aguilaair
Copy link

No, it's not related. This seems to be a separate issue that keeps happening regardless of wether BLE is on or off

@HadiJadallah
Copy link

Not sure if related, but I experience the same on my TS101 original FW 2.0 when connected to Macbook pro. Just keeps rebooting....

@pkirkovsky
Copy link

pkirkovsky commented Aug 27, 2023

Same issue here, with a brand new just-arrived Pinecil V2 running v2.20.14DAF70 (13-12-22). I cannot update the firmware due to the rebooting issue as I only have access to a Macbook Air at the moment.
What would happen if I powered the iron via the DC barrel plug (maybe at ~5V or some even lower voltage) and then connected it to USB? Would that allow it to connect successfully?

@aguilaair
Copy link

Same issue here, with a brand new just-arrived Pinecil V2 running v2.20.14DAF70 (13-12-22). I cannot update the firmware due to the rebooting issue as I only have access to a Macbook Air at the moment. What would happen if I powered the iron via the DC barrel plug (maybe at ~5V or some even lower voltage) and then connected it to USB? Would that allow it to connect successfully?

You shouldn't need to; updates work fine. Hold down the minus button and then plug the device in. It should work fine. The Iron only restarts when booting into the main OS and trying to request PD data.

@Sanaki
Copy link

Sanaki commented Aug 27, 2023

Never connect both barrel jack and USB at the same time. The documentation warns you that doing so can damage your device.

@pkirkovsky
Copy link

pkirkovsky commented Aug 27, 2023

@aguilaair Thanks! That worked, and I got my Pinecil updated to the latest version.
@Sanaki Right, I did read that. I assumed it was a general warning for high-current DC supplies and hoped there might be some way of using the DC jack as auxiliary 5v power (current-limited using a bench power supply), allowing the iron to disregard whatever is going on with PD negotiation entirely.

@discip
Copy link
Collaborator

discip commented Sep 23, 2023

@blackketter
Is this issue still present?
If not please don't forget to close. 😊

@blackketter
Copy link
Author

Updated to Release 2.22 - Release Candidate 2 and the issue still exist. Plugging into a USB hub or charger works fine, plugging directly into a MacBook Air M2 USB-C port directly causes a continuous reboot.

Plugging in to USB-C port on MacBook with a USB-C to A adapter then a USB-A to C cable works ok (though it's undervoltage at 5.1v)

@t3chguy
Copy link

t3chguy commented Jan 28, 2024

I have the same issue just plugging in a PD sniffer into my MBP without the Pinecil attached so it could be an issue on that side

@parkerlreed
Copy link

USB C to C directly to my Steam Deck or Ally both power cycled even in flashing mode on the factory firmware.

Haven't had the need yet to test on 2.22 but assuming it's the same.

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

No branches or pull requests