Fixing Intel Old Lake Webcam Woes on Linux
Table of Contents
- Introduction
- Issue with Intel Old Lake's webcam support on Linux
- Lack of driver support for Intel Old Lake's camera module on Linux
- Firmware changes and user-space processing
- Lenovo's computer vision camera and other laptops without mention of the camera module
- Importance of upstreaming drivers for proper functionality
- Work done to make the drivers play nicer with Linux
- Challenges with using dkms and patching the kernel
- Changes introduced by Hans' patch set
- Initial resistance and criticisms addressed by Laurent Pinchart
- Handling the Privacy LED and power-up of the sensor
- Feedback and eventual merging of the patch set
- Current state of Intel Old Lake's camera support on Linux
- Device-specific solutions and issues
- Conclusion
Issue with Intel Old Lake's Webcam Support on Linux
In recent months, there has been a noticeable problem with Intel Old Lake's webcam support on Linux. Many new Intel Old Lake laptops come with a mipi ipu6 camera module, which offers improved features. However, these webcams face compatibility issues when used on Linux systems. The main reason for this incompatibility is the lack of integration with the existing Linux webcam stack. Additionally, Intel did not Upstream a driver for these cameras, further exacerbating the problem. As a result, out-of-the-box functionality is compromised, and users have to rely on external modules loaded through dkms to use the camera.
The lack of integration with the existing webcam stack is primarily due to changes in the firmware. Previously, functionalities like autofocus, AI enhancement, and auto exposure were handled in the firmware itself. However, these tasks have now been shifted to user space. While this may offer more flexibility in certain cases, it has led to discrepancies in compatibility with Linux systems.
Some laptop manufacturers, such as Lenovo, market these new cameras as "computer vision cameras," while others do not mention them at all. Regardless of the marketing, the absence of proper integration with the Linux webcam stack persists. Linux kernel developer Greg Kroah-Hartman has advised against purchasing devices with these webcams unless the vendor is committed to upstreaming the necessary drivers.
Unfortunately, no significant progress has been made in upstreaming the drivers. As a result, users still have to rely on dkms and kernel patching to make the cameras work. While dkms is manageable, patching the kernel can be a tedious task, especially for those using rolling release distributions. Moreover, the patches may not always work due to compatibility issues with different kernel releases.
To address this frustrating situation, a Red Hat engineer named Hans de Goede has taken the initiative to improve the compatibility of these cameras with Linux. He has provided a set of patches that aim to make the Intel Power Controller driver work more seamlessly with the existing kernel drivers. This not only ensures better compatibility with the current kernel but also enhances the stability and performance of the cameras.
Hans' patch set introduces two significant changes. Firstly, it makes sure that the patch does not break existing ipu3 cameras, a camera format still in use on many devices. This ensures backward compatibility without any compromise on the performance of ipu6 cameras. Secondly, the patch modifies the way device properties are matched, making it more aligned with the standard practices in the kernel. These changes have been well-received overall, with minimal critical feedback during the review process.
However, not everyone is convinced that patching the kernel is the best way to address these issues. Kernel developer Laurent Pinchart, while appreciating Hans' efforts, suggests that patching the out-of-tree drivers to use the common clock framework might be a better approach in the long run. He argues that introducing hacks into the mainline kernel solely for the purpose of supporting proprietary drivers goes against the principles of upstreaming.
A specific concern raised by Laurent is related to the Privacy LED feature. To fix the Privacy LED flickering problem, he suggests patching the center drivers for sensor support with ipu3 to expect a separate GPIO for Privacy LED control. This prevents the Privacy LED from turning on during boot, ensuring the LED's behavior aligns with user expectations. However, Hans proposes avoiding powering up the sensor at probe time to address this issue, taking into consideration hardware designs that wire the Privacy LED directly to the power rails.
Despite these differing opinions, the patch set provided by Hans has been merged into the kernel. While this does not completely solve the problem of Intel Old Lake's camera support on Linux, it is a step in the right direction. The patch set improves the compatibility of these cameras and makes them more accessible to users. However, it is still advisable to exercise caution when purchasing devices with these cameras, as compatibility may vary depending on the specific device and its manufacturer.
To stay up to date with the latest developments regarding Intel Old Lake's camera support on Linux, it is recommended to follow discussions on platforms such as the Lenovo forums and the Arch Linux forums. Here, users can share their experiences, find workarounds, and Gather information specific to their devices. With continuous efforts being made to address the issues, it is hopeful that in the near future, these cameras will work seamlessly on Linux systems without the need for manual configurations or patches.