Reply To: antiX Battery Manager

Forum › Forums › antiX-development › Development › antiX Battery Manager › Reply To: antiX Battery Manager

#206795
anti-apXos
Member

    Here’s the commands you asked for. The system is a Dell Chromebook 3100 (FLEEX board).

    I had to change the third command a bit because that string of && fails if one of the files doesn’t exist. I also added “cros_ec” to the list of lsmod greps.

    antix@fleex:~
    $ uname -r
    6.18.0-061800-generic
    
    antix@fleex:~
    $ ls /sys/class/power_supply/
    AC  BAT0  CROS_USBPD_CHARGER0  CROS_USBPD_CHARGER1
    
    antix@fleex:~
    $ for b in /sys/class/power_supply/*; do if [ -f "$b/type" ] && [ "$(cat "$b/type" 2>/dev/null)" = "Battery" ]; then echo "== $b =="; cat "$b/manufacturer" "$b/model_name" 2>/dev/null; echo "start_threshold:"; cat "$b/charge_control_start_threshold" 2>/dev/null; echo "end_threshold:"; cat "$b/charge_control_end_threshold" 2>/dev/null; echo "charge_type:"; cat "$b/charge_type" 2>/dev/null; echo "charge_types:"; cat "$b/charge_types" 2>/dev/null; echo "charge_behaviour:"; cat "$b/charge_behaviour" 2>/dev/null; fi; done
    == /sys/class/power_supply/BAT0 ==
    SMP-ATL
    DELL 7T
    start_threshold:
    end_threshold:
    100
    charge_type:
    charge_types:
    charge_behaviour:
    [auto] inhibit-charge force-discharge
    
    antix@fleex:~
    $ lsmod | grep -iE "thinkpad_acpi|asus_wmi|huawei_wmi|samsung_wmi|lg_laptop|msi_ec|dell_laptop|ideapad_laptop|system76|cros_ec"
    cros_ec_hwmon          16384  0
    cros_ec_sysfs          16384  0
    cros_ec_debugfs        20480  0
    leds_cros_ec           12288  0
    led_class_multicolor    16384  1 leds_cros_ec
    cros_ec_chardev        16384  0
    gpio_cros_ec           12288  0
    cros_ec_dev            12288  0
    cros_ec_keyb           24576  0
    matrix_keymap          12288  1 cros_ec_keyb
    cros_ec_lpcs           20480  0
    cros_ec                20480  1 cros_ec_lpcs
    cros_ec_proto          65536  14 leds_cros_ec,cros_ec_lpcs,cros_usbpd_notify,cros_ec,gpio_cros_ec,cros_ec_dev,cros_ec_debugfs,cros_ec_keyb,cros_ec_hwmon,cros_usbpd_logger,cros_ec_sysfs,cros_ec_chardev,cros_charge_control,cros_usbpd_charger
    

    I haven’t tested your script yet, but in the past I’ve found that writing to charge_control_end_threshold doesn’t seem to work on this system even though this kernel supposedly supports it. The value is written, but the charging behavior doesn’t change and it’s back to 100% after reboot. The inhibit-charge and force-discharge options in charge_behaviour do work, though.

    "--"