Closed andrewmackrodt closed 1 year ago
Wow. First thing it do when i install ubuntu is install extension and freon. Never realised it was keeping dgpu awake. I installed supergfxctl because of this to manually switch OFF dgpu. Today yesterday I disable freon for some reason and I noticed supergfxctl was showing dgpu is suspended in hybrid mode. It is then i remembered reading your issue. I thought my laptop didnt have optimus... :) But is does have it , and it was freon keeping it awake
Well tought, I just disabled NVIDIA sensor check.
Any news about this fix?
This will probably need some heuristics, I'm thinking of submitting a PR which initially does this check using /proc/driver/nvidia/gpus/<ID>/power
(which isn't enough on its own unless you slow down your polling), and a follow up commit which checks nvidia-smi
running processes and slows down polling to every 30 seconds (for me, the GPU sleeps 20 seconds after running nvidia-smi
on Wayland) if gnome-shell
, Xorg
or neither are running.
I've created a PR which fixes this without any need to reduce the poll rate :^) feel free to test it out.
Side note: nouveau doesn't exhibit this issue because it doesn't wake the GPU when the temperature is polled, it simply returns N/A. Of course, nouveau is not a viable option for people at the moment, just worth mentioning.
With Optimus laptops the nvidia dGPU can be suspended to enhance battery life.
nvidia-smi
causes the GPU to wake-up, thus consuming more power. This feature request is for Freon to support an option where nvidia-smi is only polled if the dGPU is already awake.The
power_state
can be queried via/sys/devices/../../power_state
, e.g.:When
power_state = D3cold
, temperature should not be queried.Alternatively, disabling nvidia temperature reporting if using battery could work well as well.
Edit: allowing to disable polling on battery is probably the better solution. I tried a quick implementation of checking for GPU
power_state
by editingnvidiaUtil.js
so the constructor is like this:While this works, if Freon's poll rate is too low (e.g. less than 10 seconds), it will keep the GPU awake.