BartoszCichecki / LenovoLegionToolkit

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

Deactivate GPU doesn't work after external monitor has been used with HDMI port #185

Closed c1p0 closed 2 years ago

c1p0 commented 2 years ago

On my 2021 L5P 16ACH6H, the "Deactivate GPU" feature doesn't work after I have used an external monitor plugged into the HDMI port.

I am on Lenovo Legion Toolkit version 2.4.1 / Windows 11 21H2 Build 22000.856

mind12 commented 2 years ago

On my 2021 L5P 16ACH6H, the "Deactivate GPU" feature doesn't work after I have used an external monitor plugged into the HDMI port.

I am on Lenovo Legion Toolkit version 2.4.1 / Windows 11 21H2 Build 22000.856

It's the expected behaviour because all external ports are wired to the dgpu. You need to remove the external monitor.

BartoszCichecki commented 2 years ago

Well if this is the case that you have external screen connected then this is not a bug. As mind12 said: external screens connect directly to dGPU so it can't be disabled.

c1p0 commented 2 years ago

Yeah, sorry for the confusion. I meant that after I had plugged in an external monitor into the HDMI port and then plugged it out, the "Deactivate GPU" option didn't disable my dGPU.

It happens if I use my laptop with an external monitor connected through the HDMI port for either a couple of minutes or an entire workday. After I plug it out "Deactivate GPU" simply does nothing.

Please let me know if you need more details.

BartoszCichecki commented 2 years ago

Well if you can reproduce it, then maybe you can say if LLT reports the dGPU as "Active" or as "Inactive" is the button clickable or not and finally what is shown when you hover the mouse over "Deactive".

c1p0 commented 2 years ago

Hey, I made a screen recording because there is actually some weird behaviour with how everything is working.

https://www.loom.com/share/bc3d390a9dc34a4386280450ef11dd56

Please let me know if there's any more info or details I can send your way.

c1p0 commented 2 years ago

Also, another thing to mention is that my scenario for reproducing this every day is:

  1. Unlug monitor (and all other USB & power cables)
  2. Close the lid - Laptop goes into sleep
  3. Drive home - Open the lid
  4. Try to use LLT to deactivate dGPU

Maybe the laptop going into sleep in the meantime has something to do with it.

When I recorded the video I posted above, I didn't close the lid, but it still happened.

BartoszCichecki commented 2 years ago

From what I can see everything works as intended. You need to be aware that some monitoring apps will keep dGPU artificially awake. When that happens, even though nVidia APIs will report to LLT that there are no processes running and GPU should be sleeping and in fact it's not. The general rule is that any monitoring app like HWInfo may keep GPU awake, so get rid of them if you want battery life. That is just how Optimus is.

BartoszCichecki commented 2 years ago

You can also verify that the driver is reporting that GPU is idle/sleeping by enabling the indicator in nVidia control panel.

c1p0 commented 2 years ago

Thanks for the reply. I know Optimus is still a mess. I'm just trying to get the most out of my battery life. I will try it without HWInfo running from now on, but the thing is I don't know what else to use to check if the dGPU is truly disabled. Up until now, I've been using HWInfo to see if the dGPU is actually disabled. When it is disabled (after a fresh boot or a log off / login) it reported 0.0 degrees. I guess I'll just monitor battery life and figure it out.

Edit: just saw your most recent comment. Thanks for the tip!

BartoszCichecki commented 2 years ago

From what I have seen the only bullet proof way is to first check GPU state in LLT and then check battery power draw. If GPU is working, then power draw will not go below 20Wh. You can also hover mouse on the "inactive" label and the tooltip will show the performance mode at which GPU is running (or it will say smth like "Powered off"). There isn't much more that can be done here, rarely regardless of what you do, GPU will just not go to sleep and you need to reboot. But close HWInfo and other monitors. Afterburner is also messing with power states a lot.

I will close the issue for now, but if you find something more just comment.

BartoszCichecki commented 2 years ago

I have also observed that sometimes GPU will be inactive but still in P8 state and only transition to Powered off after some time.

But once all processes are gone from dGPU, it's up to the driver to shut it down.

c1p0 commented 2 years ago

Thanks again for the info. Will keep an eye on it from now on. I only use HWInfo for monitoring, but I'll disable it for a while and see how that goes. I did check HWInfo settings and noticed I had "Wake disabled GPUs" enabled, but as far as I understand it, it should only wake it up when HWInfo is starting up. I didn't have the second checkbox enabled. I will use the Nvidia GPU Activity monitor from now on. I had used it in the past but somehow I had forgotten about it. Thank you again for your time. Much appreciated.

image