From e076f273415fe0e630bcae70d290e4a3266d6f1e Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Sat, 8 Aug 2020 04:38:50 +0000 Subject: [PATCH 1/2] Update wording --- POWERSAVING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/POWERSAVING.md b/POWERSAVING.md index 3f67c87..f63c0c5 100644 --- a/POWERSAVING.md +++ b/POWERSAVING.md @@ -6,7 +6,7 @@ Simply unloading the driver or enabling powersaving feaures isn't enough. In the future, the nvidia driver may allow for entering D3 (full power off) on it's own, but for now, there's another solution: acpi calls. This requires the `acpi_call` kernel module, on Arch this can be installed with the `acpi_call` or `acpi_call-dkms` package. -Thanks to /u/FailSpai on reddit for finding the correct ACPI call. The GPU can be powered off and on with the call "\\_SB.PCI0.GPP0.PG00". For example, to turn off the GPU completely, run `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'`. Similarly, to turn it back on, `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._ON" > /proc/acpi/call'`. You can verify the state of the GPU by running `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PEGP.SGST" > /proc/acpi/call'`, then running `sudo cat /proc/acpi/call`. 0x0 means off, and anything above 0 means on. Alternatively, just look at the power draw, `cat /sys/class/power_supply/BAT0/power_now` and if it's under 10-11w then it's off. +Thanks to /u/FailSpai on reddit for finding the correct ACPI call. The GPU can be powered off and on with the call "\\_SB.PCI0.GPP0.PG00". For example, to turn off the GPU completely, run `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'`. Similarly, to turn it back on, `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._ON" > /proc/acpi/call'`. You can verify the state of the GPU by running `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PEGP.SGST" > /proc/acpi/call'`, then running `sudo cat /proc/acpi/call`. 0x0 means off, and anything above 0 means on. Alternatively, just look at the total system power draw (must be unplugged from AC to get a number), `cat /sys/class/power_supply/BAT0/power_now` and if it's under 10-11w then it's off. This allows for the same, or better, idle power draw than Windows, as long as you have done other tweaks (disable boost, change CPU governor, etc). From d74530dd9f6243909b4b3180b7c6647bed732f8b Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Sat, 8 Aug 2020 05:07:53 +0000 Subject: [PATCH 2/2] Update POWERSAVING.md with warnings --- POWERSAVING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/POWERSAVING.md b/POWERSAVING.md index f63c0c5..6f626f7 100644 --- a/POWERSAVING.md +++ b/POWERSAVING.md @@ -8,6 +8,9 @@ In the future, the nvidia driver may allow for entering D3 (full power off) on i Thanks to /u/FailSpai on reddit for finding the correct ACPI call. The GPU can be powered off and on with the call "\\_SB.PCI0.GPP0.PG00". For example, to turn off the GPU completely, run `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'`. Similarly, to turn it back on, `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._ON" > /proc/acpi/call'`. You can verify the state of the GPU by running `sudo sh -c 'echo "\\_SB.PCI0.GPP0.PEGP.SGST" > /proc/acpi/call'`, then running `sudo cat /proc/acpi/call`. 0x0 means off, and anything above 0 means on. Alternatively, just look at the total system power draw (must be unplugged from AC to get a number), `cat /sys/class/power_supply/BAT0/power_now` and if it's under 10-11w then it's off. +Note that you can really only power the GPU off when its not in use. For example, powering it off with a render offload setup will leave the GPU unusable until X is restarted, and may cause issues during shutdown/reboot. +You must be in an X session that does not touch the GPU at all. See below for an optimus-manager configuration for an automated way to switch between powersaving and GPU active mode. + This allows for the same, or better, idle power draw than Windows, as long as you have done other tweaks (disable boost, change CPU governor, etc). If the GPU is powered off during suspend, the system will hang. This can be solved by using a systemd hook to turn the GPU back on before suspend, then turning it back off after. For example, place this script in an executable file in `/usr/lib/systemd/system-sleep/`: