From: Vladimir Yerilov <openmindead@gmail.com>
To: linux-usb@vger.kernel.org,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg KH <gregkh@linuxfoundation.org>
Subject: Power supply detection issue caused by ucsi_psy?
Date: Mon, 9 Nov 2020 20:48:06 +1000 [thread overview]
Message-ID: <CAB31r6UbF_Q-APvfmxanvMZOYJZwr0eEPwMQ8EGWw3-VkJtHhQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]
Good day everyone,
Since linux 5.8 I'm experiencing a problem related to power source
detection on my laptop. My machine is equipped with 2 typec ports, one
of them has power delivery and is used for charging, another one has
only data transfer capability. The issue is, when I unplug the power
cable, the OS is reporting something like "Battery at 100%, plugged in
but still discharging" (KDE Plasma notification) - whether another
port is used or not. I checked with upower, you can see the output for
kernel 5.4 and 5.10 attached. In brief, on 5.8 onwards I have some
"line_power_ucsi_source_psy_USBC000o001" device which is considered a
power supply and that prevents OS to switch to "battery mode" when
unplugging the cable, instead it thinks there's a power source but not
powerful enough to charge the battery, upower says this: "on-battery:
no", but actually no ac power source is connected.
I did some research with git bisect up to the merge commit
`e611c0fe318c6d6827ee2bba660fbc23cf73f7dc` ("Merge tag 'usb-5.8-rc1'
of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb"), and
looked through its content. My wild guess based on upower output is
that a new driver introduced there, /drivers/usb/typec/ucsi/psy.c, is
responsible for this wrong behavior.
Could you please look into that based on info I'm providing?
Thank you!
--
----
Best regards,
Vladimir Yerilov
[-- Attachment #2: upower_5.10.txt --]
[-- Type: text/plain, Size: 2381 bytes --]
Device: /org/freedesktop/UPower/devices/line_power_ADP0
native-path: ADP0
power supply: yes
updated: Sun 08 Nov 2020 15:27:39 +10 (97 seconds ago)
has history: no
has statistics: no
line-power
warning-level: none
online: yes
icon-name: 'ac-adapter-symbolic'
Device: /org/freedesktop/UPower/devices/battery_BAT0
native-path: BAT0
vendor: SUNWODA
model: R15B01W
serial: ACFA
power supply: yes
updated: Sun 08 Nov 2020 15:27:39 +10 (97 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: charging
warning-level: none
energy: 46.198 Wh
energy-empty: 0 Wh
energy-full: 46.664 Wh
energy-full-design: 60.04 Wh
energy-rate: 2.059 W
voltage: 8.672 V
time to full: 13.6 minutes
percentage: 99%
capacity: 77.7215%
technology: lithium-ion
icon-name: 'battery-full-charging-symbolic'
History (charge):
1604813259 0.000 unknown
History (rate):
1604813259 0.000 unknown
Device: /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001
native-path: ucsi-source-psy-USBC000:001
power supply: yes
updated: Sun 08 Nov 2020 15:27:39 +10 (97 seconds ago)
has history: no
has statistics: no
line-power
warning-level: none
online: yes
icon-name: 'ac-adapter-symbolic'
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: yes
updated: Sun 08 Nov 2020 15:27:39 +10 (97 seconds ago)
has history: no
has statistics: no
battery
present: yes
state: charging
warning-level: none
energy: 46.198 Wh
energy-full: 46.664 Wh
energy-rate: 2.059 W
time to full: 13.6 minutes
percentage: 99%
icon-name: 'battery-full-charging-symbolic'
Daemon:
daemon-version: 0.99.11
on-battery: no
lid-is-closed: no
lid-is-present: yes
critical-action: HybridSleep
[-- Attachment #3: upower_5.10_bat.txt --]
[-- Type: text/plain, Size: 2368 bytes --]
Device: /org/freedesktop/UPower/devices/line_power_ADP0
native-path: ADP0
power supply: yes
updated: Sun 08 Nov 2020 15:29:25 +10 (18 seconds ago)
has history: no
has statistics: no
line-power
warning-level: none
online: no
icon-name: 'ac-adapter-symbolic'
Device: /org/freedesktop/UPower/devices/battery_BAT0
native-path: BAT0
vendor: SUNWODA
model: R15B01W
serial: ACFA
power supply: yes
updated: Sun 08 Nov 2020 15:29:25 +10 (18 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: discharging
warning-level: none
energy: 46.198 Wh
energy-empty: 0 Wh
energy-full: 46.664 Wh
energy-full-design: 60.04 Wh
energy-rate: 1.998 W
voltage: 8.44 V
time to empty: 23.1 hours
percentage: 99%
capacity: 77.7215%
technology: lithium-ion
icon-name: 'battery-full-symbolic'
History (charge):
1604813365 99.000 charging
History (rate):
1604813365 1.998 charging
Device: /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001
native-path: ucsi-source-psy-USBC000:001
power supply: yes
updated: Sun 08 Nov 2020 15:27:39 +10 (124 seconds ago)
has history: no
has statistics: no
line-power
warning-level: none
online: yes
icon-name: 'ac-adapter-symbolic'
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: yes
updated: Sun 08 Nov 2020 15:29:25 +10 (18 seconds ago)
has history: no
has statistics: no
battery
present: yes
state: discharging
warning-level: none
energy: 46.198 Wh
energy-full: 46.664 Wh
energy-rate: 1.998 W
time to empty: 23.1 hours
percentage: 99%
icon-name: 'battery-full-symbolic'
Daemon:
daemon-version: 0.99.11
on-battery: no
lid-is-closed: no
lid-is-present: yes
critical-action: HybridSleep
next reply other threads:[~2020-11-09 10:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 10:48 Vladimir Yerilov [this message]
2020-11-09 11:20 ` Power supply detection issue caused by ucsi_psy? Heikki Krogerus
2020-11-09 11:36 ` Benjamin Berg
2020-11-09 12:55 ` Vladimir Yerilov
[not found] ` <CAB31r6XWQqM-kLYm4vb8H=45grhuwsHDYT94y5QJZVtP8w_sXg@mail.gmail.com>
2020-11-09 17:02 ` Fwd: " Vladimir Yerilov
2020-11-10 8:31 ` Heikki Krogerus
2020-11-10 10:15 ` Heikki Krogerus
[not found] ` <CAB31r6Wq5c7n=Ywdq1KAgRZFemH6Wx2b-9tq46k=ipZrqarmdA@mail.gmail.com>
2020-11-10 10:30 ` Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAB31r6UbF_Q-APvfmxanvMZOYJZwr0eEPwMQ8EGWw3-VkJtHhQ@mail.gmail.com \
--to=openmindead@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.