linrunner / TLP

TLP - Optimize Linux Laptop Battery Life
https://linrunner.de/tlp
GNU General Public License v2.0
2.51k stars 129 forks source link

apple silicon (m1, m2) support #665

Closed dkwo closed 1 year ago

dkwo commented 1 year ago

Could this great tool run on Apple Silicon (aarch64)? It seems they already support things like echo inhibit-charge > /sys/class/power_supply/macsmc-battery/charge_behaviour

cc @marcan

linrunner commented 1 year ago

Hi.

From your sparse information I can't tell if hardware and drivers have the necessary capabilities, especially for charge thresholds.

If you have the hardware, you're welcome to contribute a pull request for a suitable battery care plugin.

SirLouen commented 1 year ago

Hello @linrunner I have a Macbook Air 2012 (MacbookAir 5,2 1.0) The old Intel x64 Chipset Intel i5-3427U 3rd gen

And Kernel 5.19.0-26 (KUbuntu 22.10)

-- TLP 1.5.0 --------------------------------------------

+++ Battery Care
Plugin: generic
Supported features: none available

+++ Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer                   = XINGLT
/sys/class/power_supply/BAT0/model_name                     = A1405
/sys/class/power_supply/BAT0/cycle_count                    =      5
/sys/class/power_supply/BAT0/charge_full_design             =   8000 [mAh]
/sys/class/power_supply/BAT0/charge_full                    =   8179 [mAh]
/sys/class/power_supply/BAT0/charge_now                     =   8165 [mAh]
/sys/class/power_supply/BAT0/current_now                    =      0 [mA]
/sys/class/power_supply/BAT0/status                         = Full

/sys/class/power_supply/BAT0/charge_control_start_threshold = (not available) 
/sys/class/power_supply/BAT0/charge_control_end_threshold   = (not available) 

Charge                                                      =   99.8 [%]
Capacity                                                    =  102.2 [%]

I would like to help you out, configuring the plugin for such, I'm a little noob on hardware topics.

What kind of information shall I retrieve to make this possible?

I've downloaded such Plugin template, what shall I do with it? Any docs to help me tweak?

linrunner commented 1 year ago

@SirLouen

  1. Thank you for your kind offer. I understand from your questions that you do not have the required skills. Since I do not see myself in a position to impart the necessary extensive knowledge via remote tutorial, I can unfortunately not respond to your request.
  2. This not about old Macbooks, please stay on topic. Thanks.
SirLouen commented 1 year ago
  1. This not about old Macbooks, please stay on topic. Thanks.

Ok, I'm going to open a separate issue and work for there. I think we can reach some point and I can get there at some point if you can give me some insights on my findings.

dkwo commented 1 year ago

happy to see a pr that implements this, closing.