Bug 2223185

Summary: USBC Port stops charging on some un/plug action
Product: [Fedora] Fedora Reporter: 9Lukas5 <lukas.wiest-fedoraproject>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 38CC: acaringi, adscvr, airlied, alciregi, bskeggs, hdegoede, hpa, jarodwilson, josef, kernel-maint, lgoncalv, linville, masami256, mchehab, ptalbert, steved
Target Milestone: ---Keywords: Desktop
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmesg log with USBC0 ucsi_acpi lines in it
none
dmesg log with GET_CONNECTOR_STATUS failed none

Description 9Lukas5 2023-07-16 10:27:21 UTC
I'm really sorry, not being able to provide a definite way to guranteed reproduce it, as I sometimes get it, and sometimes don't.

I have one USB-C Port, capable of Data transfer charging through and USB-PD (Power Delivery). Often when I use a Hub with USB-PD passthrough capabalities I get the situation that my Port locks charging completely on some point when dis-/reconncting the Hub from the laptop, or the power brick from the Hub, leaving the USB-connection between Hub and laptop plugged in.

If the port locks down, nothing brings it back until I reboot into the BIOS and disable the built-in battery. This mode is thought to be enabled before opening the device, so this seems to reset the USB-controller on the board I guess?

I tried to narrow down a specific kernel version, but as I can't find a guaranteed way to reproduce it, I can't really say if the problem exists or doesn't for sure.

What I found in some, but not all, dmesg-outputs during the un-/plug trials is this:

`ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-5)`
and sometimes also this:
`ucsi_acpi USBC000:00: con1: failed to register partner alt modes (-5)`

The second one is interesting, as my Port doesn't support display alternate mode^^

Reproducible: Sometimes

Steps to Reproduce:
1. start laptop without Hub attached
2. connect power-brick and Hub
3. connect hub and laptop, it charges
4. disconnect and reconnect Hub<->laptop
5. disconnect and reconnect Hub<->power brick
6. disconnect Hub<->laptop, disconnect Hub<->power brick, connect Hub<->laptop, connect Hub<->power brick
Actual Results:  
Sometimes along the way it didn't start charging anymore.

Expected Results:  
It should always start charging again

Device:
Lenovo Ideapad Flex5 14ARE05
AMD Ryzen 7 4700U
Firmware/BIOS: EECN41WW
Kernel 6.3.12-200.fc38.x86_64

Comment 1 9Lukas5 2023-07-16 10:33:14 UTC
Created attachment 1976057 [details]
dmesg log with USBC0 ucsi_acpi lines in it

Comment 2 9Lukas5 2023-07-16 10:34:03 UTC
Created attachment 1976058 [details]
dmesg log with GET_CONNECTOR_STATUS failed