Askannz / optimus-manager

A Linux program to handle GPU switching on Optimus laptops.
MIT License
2.25k stars 165 forks source link

Question about dynamic power managment method #532

Closed Klusio19 closed 1 year ago

Klusio19 commented 1 year ago

Device: Lenovo Legion Y540, with intel i7-9750H and GTX1660Ti. Latest Arch Linux with Gnome, with gdm-prime used from this guide. Using latest optimus-manager from the AUR.

I am following the guide about configuring power managment options. I started from Configuration 1 (since I have GTX1660Ti and i7-9750H). After setting the dynamic_power_managment to "fine" or "coarse" and after rebooting to hybrid mode, Runtime D3 status says: "Disabled by default". And here's my question: does that mean tht method doesn't work, and I should go and try next methods listed below, or does that mean it could work, but I have to do something?

Klusio19 commented 1 year ago

Somehow I managed to get it working. So the answer is: Yes. If it says "disabled by default" it can work, but you have to do some setup. The problem is, I don't really know what did the trick. I followed this article from nvidia (which is linked somewhere in the optimus-manager guide too), and I think, executing modprobe nvidia "NVreg_DynamicPowerManagement=0x02" did the trick. But again, I'm not sure, what did the trick. So now the output of cat /proc/driver/nvidia/gpus/0000:01:00.0/power is now:

Runtime D3 status:          Enabled (fine-grained)
Video Memory:               Off

GPU Hardware Support:
 Video Memory Self Refresh: Supported
 Video Memory Off:          Supported
Klusio19 commented 1 year ago

One more thing to add. I was trying something, and I removed optimus-manager completely in that process, later installed it again. Then did everything I described earlier again and that didn't work this time. Another "solution" (I think) was creating file /etc/modprobe.d/nvidia.conf (or adding line to that file if exists): options nvidia "NVreg_DynamicPowerManagement=0x02" for fine-grained options nvidia "NVreg_DynamicPowerManagement=0x01" for coarse-grained