Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battery Conservation Percentage Slider #47

Closed
Frankiscophil opened this issue Apr 18, 2023 · 10 comments
Closed

Battery Conservation Percentage Slider #47

Frankiscophil opened this issue Apr 18, 2023 · 10 comments

Comments

@Frankiscophil
Copy link

Is your feature request related to a problem? Please describe.
I don't have a particularly striking issue, however I wish that the Battery Conservation's set percentage was higher than 50%.

Describe the solution you'd like
I think having a slider feature to select at what percentage of battery this tool will stay at would be good.

Describe alternatives you've considered
I haven't found any alternatives as of writing this.

Model and Debug Info

Model name: Lenovo Legion Y9000P IAH7H
CPU model: Intel Core i7-12700H
GPU model: NVIDIA RTX 3060
Keyboard backlight: Single color with off/medium/bright

Extra Note: Also, my main reason for making a feature request was cuz I wanted to ask if there was a way for be to configure conservation mode to hold the power at around 80%. If someone can tell me how I can do that, it would be super great.

Output of sudo dmidecode -t system. Please remove Serial Number and UUID for privacy:

Getting SMBIOS data from sysfs.
SMBIOS 3.3 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: LENOVO
	Product Name: 82RF
	Version: Legion Y9000P IAH7H
	Serial Number: --------------
	UUID: -------------
	Wake-up Type: Power Switch
	SKU Number: LENOVO_MT_82RF_BU_idea_FM_Legion Y9000P IAH7H
	Family: Legion Y9000P IAH7H

Handle 0x0024, DMI type 12, 5 bytes
System Configuration Options
	Option 1: ConfigOptions1
	Option 2: ConfigOptions2
	Option 3: ConfigOptions3

Handle 0x0027, DMI type 15, 29 bytes
System Event Log
	Area Length: 0 bytes
	Header Start Offset: 0x0000
	Header Length: 8192 bytes
	Data Start Offset: 0x2000
	Access Method: General-purpose non-volatile data functions
	Access Address: 0x0000
	Status: Valid, Not Full
	Change Token: 0x12345678
	Header Format: OEM-specific
	Supported Log Type Descriptors: 3
	Descriptor 1: POST memory resize
	Data Format 1: None
	Descriptor 2: POST error
	Data Format 2: POST results bitmap
	Descriptor 3: Log area reset/cleared
	Data Format 3: None

Handle 0x0034, DMI type 32, 11 bytes
System Boot Information
	Status: No errors detected

Output of sudo dmidecode -t bios:

Getting SMBIOS data from sysfs.
SMBIOS 3.3 present.

Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
	Vendor: LENOVO
	Version: J2CN49WW
	Release Date: 11/25/2022
	Address: 0xE0000
	Runtime Size: 128 kB
	ROM Size: 16 MB
	Characteristics:
		PCI is supported
		BIOS is upgradeable
		BIOS shadowing is allowed
		Boot from CD is supported
		Selectable boot is supported
		EDD is supported
		Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
		Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
		5.25"/360 kB floppy services are supported (int 13h)
		5.25"/1.2 MB floppy services are supported (int 13h)
		3.5"/720 kB floppy services are supported (int 13h)
		3.5"/2.88 MB floppy services are supported (int 13h)
		8042 keyboard services are supported (int 9h)
		CGA/mono video services are supported (int 10h)
		ACPI is supported
		USB legacy is supported
		BIOS boot specification is supported
		Targeted content distribution is supported
		UEFI is supported
	BIOS Revision: 1.49
	Firmware Revision: 1.49

Handle 0x0025, DMI type 13, 22 bytes
BIOS Language Information
	Language Description Format: Long
	Installable Languages: 8
		en|US|iso8859-1,0
		fr|FR|iso8859-1,0
		zh|TW|unicode,0
		ja|JP|unicode,0
		it|IT|iso8859-1,0
		es|ES|iso8859-1,0
		de|DE|iso8859-1,0
		pt|PT|iso8859-1,0
	Currently Installed Language: en|US|iso8859-1,0

Output of sudo cat /sys/kernel/debug/legion/fancurve:

EC Chip Version: 2a4
legion_laptop features: fancurve powermode platformprofile platformprofilenotify minifancurve
legion_laptop ec_readonly: 0
ACPI CFG error: 0
ACPI CFG: 2081289494
temperature access method: 1
CPU temperature error: 0
CPU temperature: 46
CPU temperature EC error: 0
CPU temperature EC: 46
CPU temperature ACPI error: 0
CPU temperature ACPI: 45
CPU temperature WMI error: 0
CPU temperature WMI: 0
CPU temperature WMI2 error: 0
CPU temperature WMI2: 45
GPU temperature error: 0
GPU temperature: 0
GPU temperature EC error: 0
GPU temperature EC: 0
GPU temperature ACPI error: 0
GPU temperature ACPI: 0
GPU temperature WMI error: 0
GPU temperature WMI: 0
GPU temperature WMI2 error: 0
GPU temperature WMI2: 0
fan speed access method: 1
1 fanspeed error: 0
1 fanspeed: 2024
1 fanspeed EC error: 0
1 fanspeed EC: 2024
1 fanspeed ACPI error: 0
1 fanspeed ACPI: 2000
1 fanspeed WMI error: 0
1 fanspeed WMI: 0
1 fanspeed WMI2 error: 0
1 fanspeed WMI2: 2000
2 fanspeed error: 0
2 fanspeed: 2145
2 fanspeed EC error: 0
2 fanspeed EC: 2145
2 fanspeed ACPI error: 0
2 fanspeed ACPI: 2100
2 fanspeed WMI error: 0
2 fanspeed WMI: 0
2 fanspeed WMI2 error: 0
2 fanspeed WMI2: 2100
powermode access method: 3
powermode error: 0
powermode: 1
powermode EC error: 0
powermode EC: 2
powermode ACPI error: -5
powermode ACPI: 0
powermode WMI error: 0
powermode WMI: 1
has custom powermode: 1
ACPI rapidcharge error: 0
ACPI rapidcharge: 0
WMI backlight 2 state: 0
WMI backlight 3 state: 1
EC minifancurve feature enabled: 1
EC minifancurve on cool: true
EC lockfancontroller error: 0
EC lockfancontroller: false
EC fanfullspeed error: false
EC fanfullspeed status: 0
EC fan curve current point id: 3
EC fan curve points size: 9
Current fan curve in hardware (embedded controller):
rpm1|rpm2|acceleration|deceleration|cpu_min_temp|cpu_max_temp|gpu_min_temp|gpu_max_temp|ic_min_temp|ic_max_temp
0	 0	 5	 5	 0	 127	 0	 47	 0	 37
1700	 1600	 5	 5	 127	 127	 43	 52	 33	 41
1800	 1800	 5	 5	 127	 127	 48	 57	 38	 48
2000	 2100	 5	 5	 127	 127	 53	 64	 43	 127
2200	 2300	 2	 2	 127	 127	 60	 75	 127	 127
2500	 2600	 2	 2	 127	 127	 71	 78	 127	 127
2800	 2900	 2	 2	 127	 127	 75	 81	 127	 127
3000	 3100	 2	 2	 127	 127	 78	 84	 127	 127
3400	 3500	 2	 2	 127	 127	 81	 127	 127	 127
=====================
@johnfanv2
Copy link
Owner

johnfanv2 commented Apr 18, 2023

@Frankiscophil As far as I know, it is not possible to change the charging limits in the hardware. Alternatively, one could start the conservation mode at 80%. This stops charging. If it falls below 70% one could stop conservation mode again, which charges the laptop again. This could be implemented in the python program that then has to run in the background or is called periodically.

Is this what you are locking for?

I see that you might have a 2022 model. Maybe you could help in #46 testing the new features that will be added later to the GUI. Could you provide the request info in #46 and later test a few things?

@Frankiscophil
Copy link
Author

After selecting conservation mode, it seems to just stop at 80% on its own. I guess that's just the default for my device? I guess my issue is fixed then lol. But thank you for the response and the help!

As for the #46 testing thing, I can do that no problem. Getting WMI will be funky. I wonder if I can get the WMI info via a Windows boot drive instead of installing Windows again.

@johnfanv2
Copy link
Owner

johnfanv2 commented Apr 19, 2023

@Frankiscophil Great if it stops at 80% on your model. On my model I have the following behavior: It stops as soon as conservation mode is enabled and the state of charge is greater than 60%. If you disconnect and discharge the battery from 90% to 70% and connect the charger again, it will not charge the battery and keep it at 70%. Maybe this is the same behavior on your model?

Regarding #46: I guess it works with a boot drive, but for testing the information from Windows is not so important if hopefully everything works as expected.

@somso2e
Copy link
Contributor

somso2e commented Apr 25, 2023

In some models, conservation mode is a range not a single percentage. In my case its 55% to 60%

I have a 15ACH6H model. I remember back when i used the official Lenovo Vantage app on Windows, the charge would fluctuate between 55% and 60% and apparently this was the expected behavior since it was stated in the app itself. (didn't feel like booting up windows just to take a screenshot so here is this guy on youtube show casing the app https://youtu.be/C8j5LaOH8xQ?t=137 different model than me but it looked the same)

And in case the level was more than 60%, it would slowly drain back to 55%-60% in the span of 1-2 days.

Although, I haven't noticed these behaviors (fluctuations and drainage) on Linux yet . I'll try to pay a bit more attention to it for a week, if I saw these happen i'll update you.

So I don't know If this was just Windows being Windows or it was something the Lenovo engineers actually had in mind to extend battery life. 🤔

@404useryv35notfound
Copy link

@Frankiscophil Great if it stops at 80% on your model. On my model I have the following behavior: It stops as soon as conservation mode is enabled and the state of charge is greater than 60%. If you disconnect and discharge the battery from 90% to 70% and connect the charger again, it will not charge the battery and keep it at 70%. Maybe this is the same behavior on your model?

Regarding #46: I guess it works with a boot drive, but for testing the information from Windows is not so important if hopefully everything works as expected.

same behaviour on my legion 7 pro 16achg6. when i activate battery conservation while the laptop is fully charged it will just stay there. that's why i thought some kernel update or whatever has broken this functionality and came here to search for an answer.
so i read your answer and figured out mine does the same.

anyways, fully charged - activate battery conservation - battery stays at 100% - notebook stating "battery fully charged"

then unplug the cable and let it drain some battery, plug it back in when its i.e. at 90% - battery stays at 90% and notebook stating "battery fully charged".

this it what mine does ;-)

funny, but fine for me :-D

@johnfanv2
Copy link
Owner

@Frankiscophil @404useryv35notfound @somso2e So is there anything to change/add in this app or kernel module? I could easily start and stop battery conservation at certain percentages in the Python app if this is needed to emulate the behavior. But I am not sure if you want that. As far as I know currently everything is controlled by the firmware inside the hardware and the kernel just turns the conservation mode on or off.

@somso2e
Copy link
Contributor

somso2e commented Apr 28, 2023

@johnfanv2 Would this mean you would have to have the python app open at all times for it to work? If that's the case i don't think that's an elegant solution that people would actually want tbh.

@johnfanv2
Copy link
Owner

Yes, that would be the case. Alternatively, one could periodically call the python_cli.py file.

@Frankiscophil
Copy link
Author

@Frankiscophil @404useryv35notfound @somso2e So is there anything to change/add in this app or kernel module? I could easily start and stop battery conservation at certain percentages in the Python app if this is needed to emulate the behavior. But I am not sure if you want that. As far as I know currently everything is controlled by the firmware inside the hardware and the kernel just turns the conservation mode on or off.

Ever since I activated the feature for battery conservation, my laptop's remained at 80% when charging and never goes up. So I like to think it's worked pretty well.

@MrDuartePT
Copy link
Collaborator

Since this was implemented already and work well i will close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants