You are not logged in.
Pages: 1
I have a weird issue with one Powerbank that i used for this laptop before switching from Windows to Arch.
The Powerbank in question is a USB-C PD 100W Powerbank from Sandberg which is specifically designed for Laptop charging.
My Laptop is a Lenovo Thinkpad X13 Gen 4 with AMD Processor.
For some reason when i plug it into my Laptop the Laptop charges my Powerbank and not the other way around.
This happens in maybe 7 out of 8 cases but in every once in a while it works as it should, e.g. the Laptop gets charged by the Powerbank.
The direction of the cable has nothing to do with it - i checked already.
When i plug it in and unplug it rapidly after several trys it works for some reason.
The Laptop always detects the powerbank in general because i see them negotiating/a small pop-up on my screen from my desktop environment but for some reason the roles are in the wrong order.
It works fine 100% of the time with a normal wall charger.
I tried searching online and found things about UCSI_ACPI and TYPEC_UCSI:
zgrep UCSI /proc/config.gz
CONFIG_I2C_CCGX_UCSI=y
CONFIG_TYPEC_UCSI=m
CONFIG_UCSI_CCG=m
CONFIG_UCSI_ACPI=m
CONFIG_UCSI_STM32G0=m
CONFIG_CROS_EC_UCSI=m
lsmod
ucsi_acpi 12288 0
typec_ucsi 77824 1 ucsi_acpi
I also ran the script under 3.1 here:
https://wiki.archlinux.org/title/Power_ … r_settings
But did not see anything that i could decipher.
There is no difference between having the powerbank plugged in and unplugged as far as i can see.
Checking port0 and port1 with the following command shows both as sink:
cat /sys/class/typec/port0/power_role
The following commands show version 0.0 and yes respectively:
cat /sys/class/typec/port0-partner/usb_power_delivery_revision
cat /sys/class/typec/port0-partner/supports_usb_power_delivery
If i go into journalctl -f i only see an event when it works. When it doesn't work correctly (e.g. laptop charges powerbank) i see nothing.
For example:
Nov 21 02:24:17 Laptop-Linux root[283536]: ACPI group/action undefined: button/up / UP
Nov 21 02:24:21 Laptop-Linux bluetoothd[603]: profiles/audio/media.c:parse_int64_metadata() expected DBUS_TYPE_INT64 got DBUS_TYPE_UINT64
Nov 21 02:24:21 Laptop-Linux root[283557]: ACPI action undefined: PNP0C0A:00
Nov 21 02:24:21 Laptop-Linux root[283560]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Nov 21 02:24:22 Laptop-Linux root[283563]: ACPI action undefined: ACPI0003:00
Nov 21 02:24:52 Laptop-Linux wpa_supplicant[702]: wlp1s0: RSN: Group rekeying completed with 08:b6:57:09:5d:e0 [GTK=CCMP]
Nov 21 02:25:14 Laptop-Linux root[283660]: ACPI action undefined: PNP0C0A:00
Nov 21 02:25:14 Laptop-Linux root[283662]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Nov 21 02:25:14 Laptop-Linux root[283664]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Nov 21 02:25:15 Laptop-Linux root[283668]: ACPI action undefined: ACPI0003:00
Nov 21 02:25:15 Laptop-Linux root[283670]: ACPI action undefined: PNP0C0A:00
Nov 21 02:25:15 Laptop-Linux root[283672]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Between 02:24:21 and 02:25:14 i unplugged and replugged the powerbank 5 or 6 times without twisting the cable or changing anything and then on the last attempt it worked, which shows up in the log.
I am not sure if the event at 02:24:52 is part of it but i don't think so.
Here another test:
Nov 21 02:28:07 Laptop-Linux root[283986]: ACPI group/action undefined: button/down / DOWN
Nov 21 02:28:07 Laptop-Linux root[283989]: ACPI group/action undefined: button/up / UP
Nov 21 02:28:07 Laptop-Linux root[283991]: ACPI group/action undefined: button/up / UP
Nov 21 02:28:07 Laptop-Linux root[283993]: ACPI group/action undefined: button/down / DOWN
Nov 21 02:28:15 Laptop-Linux root[284017]: ACPI action undefined: PNP0C0A:00
Nov 21 02:28:15 Laptop-Linux root[284019]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Nov 21 02:28:16 Laptop-Linux root[284023]: ACPI action undefined: ACPI0003:00
Nov 21 02:29:04 Laptop-Linux root[284103]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Nov 21 02:29:27 Laptop-Linux root[284137]: ACPI action undefined: PNP0C0A:00
Nov 21 02:29:27 Laptop-Linux root[284140]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Nov 21 02:29:27 Laptop-Linux root[284142]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Nov 21 02:29:27 Laptop-Linux root[284146]: ACPI action undefined: ACPI0003:00
Nov 21 02:29:28 Laptop-Linux root[284148]: ACPI group/action undefined: ibm/hotkey / LEN0268:00
Nov 21 02:29:28 Laptop-Linux root[284150]: ACPI action undefined: PNP0C0A:00
Uplugged the powerbank at 02:28:15-02:28:16, those are events triggered by it.
Around 10 attempts later at 02:29:27 it recognized it again and started to work again.
I have no further idea where to look for more detailed logs or further settings.
Does anyone of you have an idea or a hint for me to try out?
Offline
first of all, you can use
[code]for a code block[/code]cat /sys/class/typec/port0/power_rolehave you tried writing "sink"/"source" to the file to try and provoke a switch? Does this change anything when the charging direction is set correctly?
I found this online, it mentions some tools: https://community.frame.work/t/tracking … sb-c/19259
Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...
Offline
I tried writing source into the file with the following command:
sudo sh -c 'echo source > /sys/class/typec/port0/power_role'this gave me no feedback in regards to the command itself.
If i try the same with sink i get the following:
sudo sh -c 'echo sink > /sys/class/typec/port0/power_role'
sh: line 1: echo: write error: Invalid argumentI checked in both cases before and after the command and i got the following result back each time:
cat /sys/class/typec/port0/power_role
source [sink]This was done while the setup was "broken" so the powerbank was being charged.
Doing the same while the powerbank was working correctly gave the exact opposite result in regards to the invalid argument:
cat /sys/class/typec/port0/power_role
source [sink]
sudo sh -c 'echo sink > /sys/class/typec/port0/power_role'
cat /sys/class/typec/port0/power_role
source [sink]
sudo sh -c 'echo source > /sys/class/typec/port0/power_role'
sh: line 1: echo: write error: Invalid argument
cat /sys/class/typec/port0/power_role
source [sink]Last edited by Peter42 (2025-11-21 17:31:51)
Offline
Pages: 1