Does not charge with Anker 737 GaNPrime charger

Which Linux distro are you using?
Fedora 42

Which kernel are you using?
Linux 6.14.4-300.fc42.x86_64

Which BIOS version are you using?
3.03

Which Framework Laptop 13 model are you using? AMD Ryzen™ AI 300 Series

When using my Anker USB C charger with an anker cable it charges for maybe .2 seconds then stops. Led turns on for around 1 second and then stops. If left in, cycles every 5 minutes.

Most other USB C chargers works. Unsure what is causing it, but wanted to report it. :slight_smile:

2 Likes

i can confirm this behaviour.
same setup with my batch 3 fw13. with my old macbook charger it works.

Fedora 42 (atomic cosmos)
6.14.5-300.fc42.x86_64

BIOS Information
Vendor: INSYDE Corp.
Version: 03.03

BIOS Revision: 3.3

If you can, please try to get my ec-syslog tool working.

It can capture log records from the Embedded controller and put them in syslog, journalctl.
Then try connecting the charger and then post the “ec-syslog” logs. It might show us more why that charger is not working.

1 Like

thank you a lot James3 for helping us here with an custom made rustlang tool :slight_smile: unfortunately i cannot make it run for now - and need to sleep :smiley:

what it did:

  1. install rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh from its website
  2. install gcc for making it compile with cargo sudo dnf4 install gcc
  3. run it with cargo run
  4. output: /Downloads/ec-syslog-main$ cargo run Finished devprofile [unoptimized + debuginfo] target(s) in 0.03s Runningtarget/debug/ec-syslog Could not open input file: Permission denied (os error 13): /sys/kernel/debug/cros_ec/console_log Suggest: modprobe cros_ec_debugfs
  5. than tried that modprobe command:
    modprobe cros_ec_debugfs modprobe: FATAL: Module cros_ec_debugfs not found in directory /lib/modules/6.14.5-300.fc42.x86_64
    tomorrow evening i can try again

Ah. You need to run it as sudo
sudo ./target/debug/ec-syslog

See if the following file exists:
/sys/kernel/debug/cros_ec/console_log

If it does not exist, you need the cros_ec_debugfs module.
I don’t know how to add it to fedora 42.

by googling i found out that cros_debug_fs is a linux driver for ChromeOS? im not sure if this means its exclusive available only for it? see linux/drivers/platform/chrome/cros_ec_debugfs.c at master · torvalds/linux · GitHub

but by searching for debugfs i found this: DebugFS — The Linux Kernel documentation

and was able to activate it by executing mount -t debugfs none /sys/kernel/debug

does this help by any means? it contains this folder structure:

sudo ls /sys/kernel/debug/

in another thread here Viewing information about USB-C power delivery in Linux i found that you can see the current for usb charging

cat /sys/class/power_supply/ucsi-source-psy-USBC000\:001/current_now 1000000

at /sys/class/power_supply/ucsi-source-psy-USBC000\:002/current_now 0

cat /sys/class/power_supply/ucsi-source-psy-USBC000\:003/current_now 680000

cat /sys/class/power_supply/ucsi-source-psy-USBC000\:004/current_now 0

not sure why 2 usb port show a current while i just have one cable plugged in

while plugged in the old macbook charger it looks like this:

cat /sys/class/power_supply/ucsi-source-psy-USBC000\:00*/current_now 3000000 0 680000 0

I looked at Fedora 42.
To get the “cros_ec_debugfs” module, you would need to compile your own kernel.
The FW laptops use the same EC code that is in chrome books. So, although that is where it started, it’s used on lots of different laptops now.

first time building a linux kernel here :smiley: it takes so much time, and im pretty sure that i missed to activate the missing module in the first iteration…

regarding to Building a Custom Kernel :: Fedora Docs

  1. i git cloned the fedora kernel from git clone Overview - rpms/kernel - src.fedoraproject.org
  2. and switched to f42 branch.
  3. copied my current config to the repo with cp /usr/lib/modules/6.14.5-300.fc42.x86_64/config .config
  4. than i ran fedpkg local which seems to me to do the build job…
  5. second try no with the .config adapted to

CONFIG_CROS_EC_DEBUGFS=y

i hope this is correct for drivers with the value set to “y”

I have the same problem. I‘ve been playing around with the power_role configuration, but to no avail :confused:

meanwhile i was able to boot into my self compiled kernel :slight_smile: additional steps after compilation (remainder: i run immutable spin fedora 42):

rpm-ostree override replace \
  kernel-6.14.6-300local_debug.fc42.x86_64.rpm \
  kernel-core-6.14.6-300local_debug.fc42.x86_64.rpm \
  kernel-modules-core-6.14.6-300local_debug.fc42.x86_64.rpm \
  kernel-modules-6.14.6-300local_debug.fc42.x86_64.rpm \
  kernel-modules-extra-6.14.6-300local_debug.fc42.x86_64.rpm

after a reeboot a new ostree deployment was booted with this new kernel installed. i just needed to disable secureboot because of missing signature - but since it is only a debug build i can totally live with that :see_no_evil_monkey:

since these modules are the plain minimum to make the installation work - now i need to look for what .rpm file contains the wanted cros_ec_debugfs