rickysarraf / laptop-mode-tools

Power Savings tool for Linux
https://www.researchut.com/tags/laptop-mode-tools/
GNU General Public License v2.0
550 stars 47 forks source link

laptop-mode-tools changes nvidia's prime D3 power management. #174

Open gulafaran opened 2 years ago

gulafaran commented 2 years ago

i havent exactly figured out what bits of laptop-mode-tools thats changing it but upon reboot or plugging in or out the power cord changes it.

/sys/bus/pci/devices/0000:01:00.0/power/control gets changed to "on" instead of "auto" meaning its constantly powered on. so currently i have to "echo auto | sudo tee /sys/bus/pci/devices/0000:01:00.0/power/control" on boot/AC/Battery changes. doesnt occur without laptop-mode-tools.

rickysarraf commented 2 years ago

That would be the runtime-pm module. Here's the specific line

auto is used when wanting to conserve power. OTOH, on is used when you want to run the device full power, which is the case when on AC.

So, as you mentioned, on power plug in, it'll be on.

gulafaran commented 2 years ago

thanks, il modify that and add simply a line that sets nvidia to auto on AC aswell then. its mostly just generating heat and powers on by itself anyways when ran with prime-run so.

rickysarraf commented 2 years ago

You could also try blacklisting that particular device id in runtime-pm.conf.

s3nt fr0m a $martph0ne, excuse typ0s

On Thu, 9 Dec, 2021, 22:51 Tom Englund, @.***> wrote:

thanks, il modify that and add simply a line that sets nvidia to auto on AC aswell then. its mostly just generating heat and powers on by itself anyways when ran with prime-run so.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rickysarraf/laptop-mode-tools/issues/174#issuecomment-990057406, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAP7SFWBHCW7II3OEGZ6STUQDQQTANCNFSM5JTLV3NQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

gulafaran commented 2 years ago

does that mean adding "0000:01:00.0" to the blacklist or do i use "01:00.0" from lspci?

ok so lspci -nn lists it 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2520] (rev a1) added 10de:2520 to the blacklist, and now it works as intended. thanks man <3
rickysarraf commented 2 years ago

On Fri, 2021-12-10 at 04:01 -0800, Tom Englund wrote:

does that mean adding "0000:01:00.0" to the blacklist or do i use "01:00.0" from lspci?

I think the lspci device ids should work. Please try it out.

-- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention आव्श्यक्ता आविष्कार की जननी है