Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp421961rdf; Tue, 21 Nov 2023 06:27:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6nSD4j0CnpWidmuxFxqcTCDAYmbBVu7i+0kJrSEmeCATTKRy0nv3Lopd02iJ7TW/AyD3k X-Received: by 2002:a05:6a20:1611:b0:189:bf74:19ce with SMTP id l17-20020a056a20161100b00189bf7419cemr9881748pzj.4.1700576856167; Tue, 21 Nov 2023 06:27:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700576856; cv=none; d=google.com; s=arc-20160816; b=Pxt2XY5RMfjNKGGV0YCCChQdmp9Fk3d5gg1+a1PD6FtWzg9G6evgcq0wshMJ4u8rZU 09DMDLdlrz+q3c2hUB5aPU36/KNwq0AOzk4CtMQ5loinDNO+rQF+vY0BK6LA7o0jeYYb 3Y2W4voavKJXK2q5jiD8IkfTnpqZ28UK+u/4C6WngMkjSjxDkC+8+LlSjq/q9GD9iv6Z sxFwUCpJA/peBDcIEf4R23Tw81oKEozFXpI1saHtzml2HK+djMgiRVGdMRE2Nywdxybo 0f6mRKq2e75ZPUJFryfiG2wRRaIljVNygYxWWggikjCCvnBoSSxXlW5krCfkqXzBQrX6 ulUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=6r1dnzTfNCFy5UPdBkUu0ymUeABWZb/lcIMQ0bTewIo=; fh=aKy37ApF98nSfxkr502IKCBIoSaKpoby7vzEL3r1Zrg=; b=vDuQAoQSn6CXandzwugNp2CI8cHyTlackClmYu0aTAQVD1sudimzksBJvKmRX55uyC S8v8yGhBC+oqTem7F91lWVrMHqZEnTo7B9q5HmOexS/zHk2u/W3c5rXmm8GLdwgiZDYm MREbUjVvK3B1l0tfDnbpLw2iiuWCmegVog0e+CH1Xm9xVBJMYHPBytW1or0Pyf8ELVTt mhS2HORmPOMI9/EhOQ/kT6CT1QYI/r/ESQXOyZdhLXEdN8PUFFVVR/b2z+9ELu7pzoFk 0DteC1lCVl0JGU2qMWuAENqe1ARTggASIWKimY/uAt8kGgV7JOV5NCD1vFciPnbGekvL XvtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id cm11-20020a056a020a0b00b005bdfdf1c44dsi11258370pgb.126.2023.11.21.06.27.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 06:27:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EFFC580465F4; Tue, 21 Nov 2023 06:26:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230126AbjKUO0b (ORCPT + 99 others); Tue, 21 Nov 2023 09:26:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234416AbjKUO00 (ORCPT ); Tue, 21 Nov 2023 09:26:26 -0500 Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0662010D1; Tue, 21 Nov 2023 06:26:20 -0800 (PST) Received: from [10.0.3.168] (unknown [93.240.169.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id A828561E5FE01; Tue, 21 Nov 2023 15:26:00 +0100 (CET) Message-ID: <2bfe2311-27a6-46b5-8662-ba3cbb409f81@molgen.mpg.de> Date: Tue, 21 Nov 2023 15:25:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Unplugging USB-C charger cable causes `ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)` Content-Language: en-US To: Heikki Krogerus Cc: linux-usb@vger.kernel.org, LKML , Hans de Goede References: From: Paul Menzel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 21 Nov 2023 06:26:47 -0800 (PST) Dear Heikki, Thank you for your prompt reply. Am 21.11.23 um 15:08 schrieb Heikki Krogerus: > On Tue, Nov 21, 2023 at 12:50:43PM +0100, Paul Menzel wrote: >> On the Dell XPS 13, BIOS 2.21.0 06/02/2022, with Debian sid/unstable and >> Linux 6.5.10, when unplugging the (Dell) USB Type-C charger cable, Linux >> logs the error below: >> >> ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110) >> >> As this is logged with level error, can this be somehow fixed? >> >> drivers/usb/typec/ucsi/ucsi.c: dev_err(ucsi->dev, "%s: ACK failed (%d)", __func__, ret); >> >> Please find the output of `dmesg` attached. > > Thanks. The firmware not reacting to the ACK command is weird, but I'm > not sure if it's critical. Does the interface continue working after > that? Do you see the partner devices appearing under /sys/class/typec/ > when you plug them, and disappearing when you unplug them? ``` $ LANG= grep . /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000\:001/* /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/current_max:0 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/current_now:0 grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/device: Is a directory grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/hwmon7: Is a directory /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/online:0 grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/power: Is a directory /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/scope:System grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/subsystem: Is a directory /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/type:USB /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_NAME=ucsi-source-psy-USBC000:001 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_TYPE=USB /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_USB_TYPE=[C] PD PD_PPS /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_ONLINE=0 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_MIN=5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_MAX=5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_NOW=5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_CURRENT_MAX=0 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_CURRENT_NOW=0 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_SCOPE=System /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/usb_type:[C] PD PD_PPS /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_max:5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_min:5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_now:5000000 grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/wakeup49: Is a directory ``` Now I unplugged the device, and the error is *not* logged. (I had a USB Type-C port replicator plugged in during the day before.) The directory is still there: ``` $ LANG= grep . /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000\:001/* /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/current_max:0 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/current_now:0 grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/device: Is a directory grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/hwmon7: Is a directory /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/online:0 grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/power: Is a directory /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/scope:System grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/subsystem: Is a directory /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/type:USB /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_NAME=ucsi-source-psy-USBC000:001 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_TYPE=USB /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_USB_TYPE=[C] PD PD_PPS /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_ONLINE=0 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_MIN=5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_MAX=5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_NOW=5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_CURRENT_MAX=0 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_CURRENT_NOW=0 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_SCOPE=System /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/usb_type:[C] PD PD_PPS /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_max:5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_min:5000000 /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_now:5000000 grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/wakeup49: Is a directory ``` I guess, that is the wrong directory I look at though? (I am going to monitor the logs over the next days.) Kind regards, Paul ```