-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increased power usage using hardware acceleration #74
Comments
It's a driver issue. As soon as you initialise cuda, it forces the GPU into a higher power state (at least P2 IIRC), and the nvdec implementation forces you to use cuda to interact with it, so this always happens. It means that using nvdec will never save you power unless you were going to use cuda anyway. And it's particularly annoying because the actual hardware doesn't have this requirement - VDPAU uses the same hardware but doesn't use cuda, so the power level can stay at a minimum. And I'm sure the windows implementation also doesn't do this. To make it even more insulting, even the application using GL or Vulkan to do post-processing and all sorts of other fancy things also doesn't force the power level higher than is necessary for the work you're doing. So the right place to complain is nvidia's forums. It's been brought up before and we've never seen anything get done. Very frustrating. |
Amusingly, there are people with heavy compute workloads where the force-P2 behaviour actually slows things down because it wants to run at P0. Unfortunately, the techniques documented there only work on windows or on non-consumer hardware. |
I hadn't realised the power usage was quite so bad with the newer GPUs. A 1080p Twitch stream on my old 1060 takes about 30W. But as Philip said, there's nothing we can do about it. |
Thanks for the detailed answers! In search of a workaround I tried limiting the power usage, but the lowest I could set it was 100 W, so not much gain there. By limiting GPU to 600 MHz and Mem to 810 MHz it stays at PL1, I can still decode the 1080p stream and an additional 2160p60 (4K) stream simultaneously, while also staying at 50 W power draw and with dec% topping out at about 75%. If i try to watch more than 3 1080p60 streams I have to bump Mem to next level, 5001MHz, which is PL2 but tops out at around 75-80W. Pasting the commands if other users of these high power budget cards end up here:
MEM clocks:
Lock GPU clock to max 600 MHz while allowing to clock down to 210 MHz when CUDA isn't in use:
Reset GPU clock limit:
Lock Mem clock to max 810 MHz while allowing to clock down to 405 MHz when CUDA isn't in use:
Reset Mem clock limit:
|
Closing this issue as there's nothing we can do to resolve it. Thanks for the work around thulle, however I'm not sure how useful that'll be for most people. Fiddling with the memory clocks is not really a user friendly solution. |
the issue still present today, so for anyone who come here, I made a simple widget for KDE |
I compiled ffmpeg6 with Ran Monitored with On a 3060 Ti desktop board, roughly 23W on Vulkan Video vs ~54W with this VAAPI driver. |
Another "workaround" to reduce power usage is to use hwdec=vdpau-copy. Although this should result in more work, when decoding a full-HD video to 4k with gpu-next, vulkan and ravu+cfl postprocessing, my GPU clock stays at 400MHz and system power usage is around 90W. Doing the same with nvdec forces clocks to 2400MHz and system power usage is around 115W (using an RTX 4060). The advantage of this over limiting clock speeds is that the gpu auto-scales up when e.g. playing 60Hz 4K video, which needs a lot more processing. |
Not really a bug, more a question, and probably something that should be addressed at the driver level.
I just enabled hardware acceleration in firefox using this, and while it works great I'm seeing a significant increase in power usage.
Using a AMD 3700x & Nvidia 3080 with 470.103.01 drivers, watching one 1080p h264 stream on twitch without hardware acceleration I'm seeing about 120W total consumption as measured by the PSU. Whereof ~46W is used by GPU:
Activating hardware acceleration, the power usage jumps to around 176-180W, all of which goes to the GPU:
Even if decoder usage is only 5% it never drops below 9251MHz memclock and 1785MHz GPU clock. Is this something that can be addressed at this level, or is it something that has to be done by the nvidia drivers?
The text was updated successfully, but these errors were encountered: