News: 0001508422

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Granular Power Savings Patches Posted For Common "uvcvideo" Linux Webcam Driver

([Hardware] 6 Hours Ago uvcvideo Power Savings)


Google engineer Ricardo Ribalda has proposed a set of patches for the common "uvcvideo" kernel driver that supports UVC-compliant web cameras and the like to provide granular power saving support.

This granular power saving support for the uvcvideo driver is intended to avoid powering up the USB Video Class device for some operations that don't necessarily need it on. Ricardo Ribalda explained with the patch cover letter:

"Right now we power-up the device when a user open() the device and we power it off when the last user close() the first video node.

This behaviour affects the power consumption of the device is multiple use cases, such as:

- Polling the privacy gpio

- udev probing the device

This patchset introduces a more granular power saving behaviour where the camera is only awaken when needed. It is compatible with asynchronous controls."

With these patches there are then a number of ioctls where the uvcvideo-powered device will no longer need to be powered up each time, such as querying the device capabilities, enumerating different features, creating buffers, and (un)subscribing to events.

[1]

This granular power saving support should help with tiny bits of power savings here and there though no power numbers were provided as part of the kernel patch series. With the uvcvideo driver being quite common on many Linux laptops for web camera handling, it's of broad benefit and every little bit of power savings helps.

One of the patches does go on to note there is the potential of needing some device-specific quirks if this granular power savings isn't playing nice everywhere:

"Now that every ioctl takes care of their power management we can remove the "global" power management.

Despite its size, this is a relatively big change. We hope that there are no size effects of it. If there are some specific devices that miss-behave, we can add a small quirk for them.

This patch introduces a behavioral change for the uvc "trigger" button. It will not work unless the camera is streaming. We consider that this the most common (if not the only) usecase and therefore we do not consider it a regression."

See [2]this patch series for all the details if interested in granular power saving support for the uvcvideo Linux driver.



[1] https://www.phoronix.com/image-viewer.php?id=2024&image=uvcvideo_lrg

[2] https://lore.kernel.org/lkml/20241126-uvc-granpower-ng-v1-0-6312bf26549c@chromium.org/



treba

To converse at the distance of the Indes by means of sympathetic contrivances
may be as natural to future times as to us is a literary correspondence.
-- Joseph Glanvill, 1661