karypid / YogaPro-16IMH9

Running Linux on the Yoga Pro 9i - 16IMH9 - 2024, Intel, Gen 9
GNU General Public License v2.0
9 stars 0 forks source link

Cannot control battery charge threshold #4

Open karypid opened 2 months ago

karypid commented 2 months ago

The kernel seems to not be able to set charge threshold limits (to improve battery degradation).

This is what I see in the battery system device folder:

❯ ls /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:16/PNP0C09:00/PNP0C0A:00/power_supply/BAT0
alarm           device              hwmon2        power_now      subsystem   voltage_min_design
capacity        energy_full         manufacturer  present        technology  voltage_now
capacity_level  energy_full_design  model_name    serial_number  type
cycle_count     energy_now          power         status         uevent

There seems to be no files to control the charging percentage.

Specifically, the files charge_control_start_threshold, charge_control_end_threshold, charge_start_threshold and charge_stop_threshold that exist on Thinkpad models (see https://gitlab.com/marcosdalvarez/thinkpad-battery-threshold-extension) are missing.

TenSeventy7 commented 4 weeks ago

I don't have the exact device, but IdeaPad and Yoga devices are served by the ideapad_acpi driver, which should have the conservation_mode toggle you're finding for, if the driver supports your device.

You're only stuck to 60%, which is the same case on Windows.

karypid commented 3 weeks ago

I don't have the exact device, but IdeaPad and Yoga devices are served by the ideapad_acpi driver, which should have the conservation_mode toggle you're finding for, if the driver supports your device.

You're only stuck to 60%, which is the same case on Windows.

Interesting. What distro/kernel are you using?

I am using Bluefin-DX (a Fedora Silverblue customization) which seems to not have this module:

❯ lsmod | grep idea
ideapad_laptop         61440  0
platform_profile       12288  1 ideapad_laptop
sparse_keymap          12288  2 intel_hid,ideapad_laptop
rfkill                 40960  10 iwlmvm,bluetooth,ideapad_laptop,cfg80211
video                  77824  5 nvidia_wmi_ec_backlight,ideapad_laptop,xe,i915,nvidia_modeset
wmi                    36864  4 video,nvidia_wmi_ec_backlight,wmi_bmof,ideapad_laptop

~ ❯ modprobe ideapad_acpi
modprobe: FATAL: Module ideapad_acpi not found in directory /lib/modules/6.8.11-300.fc40.x86_64

❯ rpm -qa | grep kernel
kernel-modules-core-6.8.11-300.fc40.x86_64
kernel-core-6.8.11-300.fc40.x86_64
kernel-modules-6.8.11-300.fc40.x86_64
kernel-6.8.11-300.fc40.x86_64
kernel-modules-extra-6.8.11-300.fc40.x86_64
kernel-tools-libs-6.8.11-300.fc40.x86_64
kernel-tools-6.8.11-300.fc40.x86_64
kernel-headers-6.8.3-300.fc40.x86_64
TenSeventy7 commented 3 weeks ago

I don't have the exact device, but IdeaPad and Yoga devices are served by the ideapad_acpi driver, which should have the conservation_mode toggle you're finding for, if the driver supports your device. You're only stuck to 60%, which is the same case on Windows.

Interesting. What distro/kernel are you using?

I am using Bluefin-DX (a Fedora Silverblue customization) which seems to not have this module:

❯ lsmod | grep idea
ideapad_laptop         61440  0
platform_profile       12288  1 ideapad_laptop
sparse_keymap          12288  2 intel_hid,ideapad_laptop
rfkill                 40960  10 iwlmvm,bluetooth,ideapad_laptop,cfg80211
video                  77824  5 nvidia_wmi_ec_backlight,ideapad_laptop,xe,i915,nvidia_modeset
wmi                    36864  4 video,nvidia_wmi_ec_backlight,wmi_bmof,ideapad_laptop

~ ❯ modprobe ideapad_acpi
modprobe: FATAL: Module ideapad_acpi not found in directory /lib/modules/6.8.11-300.fc40.x86_64

❯ rpm -qa | grep kernel
kernel-modules-core-6.8.11-300.fc40.x86_64
kernel-core-6.8.11-300.fc40.x86_64
kernel-modules-6.8.11-300.fc40.x86_64
kernel-6.8.11-300.fc40.x86_64
kernel-modules-extra-6.8.11-300.fc40.x86_64
kernel-tools-libs-6.8.11-300.fc40.x86_64
kernel-tools-6.8.11-300.fc40.x86_64
kernel-headers-6.8.3-300.fc40.x86_64

My mistake, it is the ideapad_laptop driver. There should be a conservation_mode sysfs toggle in there.