Skip to content
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

Is it actually worth it? #279

Open
danilw opened this issue Mar 3, 2024 · 2 comments
Open

Is it actually worth it? #279

danilw opened this issue Mar 3, 2024 · 2 comments

Comments

@danilw
Copy link

danilw commented Mar 3, 2024

When I watch youtube/twitch/other videos in "default CPU-decoding" by webbrowsers, my GPU is:

GPU 210MHz MEM 405MHz TEMP 36°C

And CPU usage around 20% on 65Watt CPU for 480p-720p videos.

When I use this nvidia-vaapi-driver in Firefox - even watching single 480p video, when it on screen:

 GPU 2460MHz MEM 8250MHz TEMP  42°C FAN   0% POW N/A / 115 W
 GPU[|                          3%] MEM[|||           0.906Gi/7.996Gi] DEC[       1%]

I mean - boost from 210MHz to 2460MHz is not free in power consumption, and same for memory.
I can not see power-consumption it always N/A by Nvidia driver.

It worth it for 4k videos that for sure, but for 480p-720p... is it?

P.S. Just updated to 550.54.14 Nvidia driver - this nvidia-vaapi-driver gpu-acceleration works in Wayland, Wayland works must better now on Nvidia, there still lots of bugs especially with chrome, but Wayland on Nvidia works now 100x better than on 545 drivers.

P.S.S. Thanks for making something that actually works for GPU video acceleration in webbrowser.

@philipl
Copy link
Contributor

philipl commented Mar 3, 2024

See #74. nvdec requires cuda, and cuda forces the GPU into at least the P2 state, while the actually hardware decoding works fine at P5. Both VDPAU and Vulkan video decode demonstrate this - they use the same video decoding hardware but don't force the power state to increase. But VDPAU can't be used to implement a VAAPI driver, and I shudder to think about how complex a vulkan implementation would look compared to the current nvdec based one.

@danilw
Copy link
Author

danilw commented Mar 3, 2024

Thanks, I see.
In 550 Nvidia driver release they say:

Added support for the VK_KHR_video_encode_queue, VK_KHR_video_encode_h264, VK_KHR_video_encode_h265 and VK_KHR_video_maintenance1 extensions.

I also do not know how complex is it, and is it actually works.

Found this https://forums.developer.nvidia.com/t/remove-p2-forced-state-from-drivers/241998
And this https://babeltechreviews.com/nvidia-cuda-force-p2-state/
Seems there no way to turn it of for linux only, when on Windows it is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@philipl @danilw and others