BartoszCichecki / LenovoLegionToolkit

Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
GNU General Public License v3.0
4.64k stars 221 forks source link

[BUG]: Cannot change to "Customer" power mode #715

Closed AvocadoFlour closed 1 year ago

AvocadoFlour commented 1 year ago

Version

2.12.0

OS

Windows 11 Pro Version 10.0.22000 Build 22000

Device

Legion 5 15ARH7H

BIOS version

JUCN59WW

What's wrong?

I set up the custom mode yesterday. I was able to pick it without a problem. Today when I turned on the laptop I can no longer pick the custom mode as the power mode. After I click on custom mode, custom mode is shown as the current power mode for a fraction of a second, and then immediately the mode is changed back to the mode it was in prior to changing to custom mode. So, it's impossible to pick custom mode. I've tried restarting, Lenovo Vantage isn't running.

image

How to reproduce the bug?

  1. Turn on computer.
  2. Turn on Lenovo Legion Toolkit.
  3. Try to switch power mode to custom.

What is the behavior that you expected?

I expect the power mode to be switched to custom when I pick custom as the power mode in the power modes dropdown menu.

Logs

I have cleaned the log file and just attached what is saved into it once I do the action which fails. Seems like the error is caused by the computer being on battery power.. And the exact point of changing this in my case is to extend the computer's life on battery.

[13/05/2023 17:11:47.860] [1] [AbstractLenovoGamezoneWmiFeature.cs#60:GetStateAsync] Getting state... [feature=PowerModeFeature] [13/05/2023 17:11:47.877] [43] [AbstractLenovoGamezoneWmiFeature.cs#70:GetStateAsync] State is Quiet [feature=PowerModeFeature] [13/05/2023 17:11:47.891] [43] [Power.cs#45:IsAcFitForOc] Mode = 0 [13/05/2023 17:11:47.900] [43] [Power.cs#66:IsChargingNormally] Mode = 2 [13/05/2023 17:11:47.901] [1] [AbstractLenovoGamezoneWmiFeature.cs#60:GetStateAsync] Getting state... [feature=PowerModeFeature] [13/05/2023 17:11:47.906] [1] [AbstractComboBoxFeatureCardControl.cs#125:OnStateChange] Failed to change state. [feature=PowerModeControl] === Exception === System.InvalidOperationException: Can't switch to GodMode power mode on battery. at LenovoLegionToolkit.Lib.Features.PowerModeFeature.SetStateAsync(PowerModeState state) at LenovoLegionToolkit.WPF.Controls.AbstractComboBoxFeatureCardControl1.OnStateChange(ComboBox comboBox, IFeature1 feature, Nullable1 newValue, Nullable1 oldValue)

=== Exception demystified === System.InvalidOperationException: Can't switch to GodMode power mode on battery. at async Task LenovoLegionToolkit.Lib.Features.PowerModeFeature.SetStateAsync(PowerModeState state) at async Task LenovoLegionToolkit.WPF.Controls.AbstractComboBoxFeatureCardControl.OnStateChange(ComboBox comboBox, IFeature feature, T? newValue, T? oldValue)

[13/05/2023 17:11:47.911] [43] [AbstractLenovoGamezoneWmiFeature.cs#70:GetStateAsync] State is Quiet [feature=PowerModeFeature]

Do you have Lenovo software installed?

Did you disable any Lenovo software using Lenovo Legion Toolkit?

Additional information

No response

BartoszCichecki commented 1 year ago

https://github.com/BartoszCichecki/LenovoLegionToolkit#why-i-cant-switch-to-performance-or-custom-power-mode-on-battery

AvocadoFlour commented 1 year ago

Wow at the speed of your response. Thank you. I tried looking for something like that but didn't find it and thus opened up this.

My custom mode is set up for maximum battery lifetime; I.e. everything is as limited as possible. Right now, on quiet mode, the wattage consumption of my computer is 16w. On my custom mode, the wattage consumption is 7w. That is is the difference between my computer lasting 10 and 4 hours on battery. Last night I was able to work on my computer for a long time as I had set it into custom mode when it was plugged in and then went out with it without having turned it off. Now I am having only about 2h 50m of battery lifetime remaining, whereas yesterday at this battery charge level the remaining lifetime was I think 7 hours. Will --allow-all-power-modes-on-battery yyield unexpected behaviour with my custom mode as well, or is that an issue when the case is that some has the custom mode set up for maximum power consumption, without the computer being plugged in?

BartoszCichecki commented 1 year ago

It is a general issue with stability of the EC when running on battery when Performance or Custom is set.

Sometimes some optiona don't work or fans stop etc. Do testing on your own and see if you want to experiment.