Snapshot creates nvidia GPU context unnecessarily, forcing it to stay awake
Modern nvidia gpus on hybrid laptops are capable of shutting down when not in use. This allows substantial power savings.
However, by default, Snapshot tries to use the nvvp8dec
gstreamer plugin as soon as it loads, which creates a gpu context and forces the nvidia gpu to turn on. This takes several seconds (it's a blocking operation, so snapshot can't finish loading) and results in high power draw.
The context is kept alive until Snapshot closes, so the nvidia dgpu remains on and consuming power needlessly.
The only available workaround is to block gstreamer from using the nvvp8dec
plugin: GST_PLUGIN_FEATURE_RANK=nvvp8dec:NONE
Loading Snapshot puts the GPU into D0
.
nvtop
reveals that a large part of vram is allocated. It also shows that there is some GPU and Decode usage initially...
...however this is only temporary. vram allocation and context still remain up for as long as Snapshot is running, though.
Blocking nvvp8dec
prevents the nvidia dgpu from being used or queried. As a result, Snapshot loads significantly faster and power consumption is greatly reduced.
Tested on Flatpak Snapshot 46.2.