I would like to manually turn off/on the dedicated GPU on the laptop.
I found a way to turn it off, now I would like to turn it on again without a reboot. Is it possible?
The board is a Nvidia GTX 1650 Max-Q GDDR5 4GB.
Driver: nvidia 455.45.01-7.
Details:
My laptop has a light showing the GPU usage (white when the dedicated NVIDIA GPU is turned off, orange when is turned on).
With Windows the power management between Intel and NVIDIA is working fine.
In Linux there are two scenarios:
- Everything is working ok-ish. The dGPU is in P8 consuming 2W, if used it goes to P0 (35W-40W).
- Some update broke something (like today). The dGPU is stuck to 9-10W minimum (P0) even if not used and jumps to 35W-40W if used.
Since I am working with a laptop (and the battery is a big limiting factor) I would like the third option: manually and completely turn off/on the NVIDIA GPU (OFF=0W, ON=2W-40W).
I discovered that the following commands turn off the dGPU:
➜ ~ sudo nvidia-smi drain -m 1 -p 0000:02.00.0
Successfully set GPU 00000000:02:00.0 drain state to: draining.
➜ ~ sudo nvidia-smi drain -r -p 0000:02.00.0
GPU 00000000:02:00.0 successfully removed.
But then nvidia-smi is returning:
Failed to initialize NVML: Unknown Error
.
Is there a way to turn it on again without a reboot?