https://github.com/oznakn/arch-ov08x40
Make Intel MIPI Camera working for ThinkPads
https://github.com/oznakn/arch-ov08x40
Last synced: 3 months ago
JSON representation
Make Intel MIPI Camera working for ThinkPads
- Host: GitHub
- URL: https://github.com/oznakn/arch-ov08x40
- Owner: oznakn
- Created: 2025-06-29T23:03:33.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-07-01T16:42:56.000Z (5 months ago)
- Last Synced: 2025-09-02T05:49:41.275Z (3 months ago)
- Language: C
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# arch-ov08x40
This is a combination of repositories [henkv1/ov08x40_arch_icamerasrc](https://github.com/henkv1/ov08x40_arch_icamerasrc) and [stefanpartheym/archlinux-ipu6-webcam](https://github.com/stefanpartheym/archlinux-ipu6-webcam) to make an Intel MIPI camera work on Archlinux, specifically if you have a camera ov08x40.
I have a Lenovo ThinkPad X1 Carbon Gen 12 laptop with OLED. This laptop comes with a Intel MIPI Camera that does not work well with Linux. Over last couple months there have been huge progress in this matter to make this camera work.
Normally the `archlinux-ipu6-webcam` repository says the drivers are merged to mainline kernel and the repository is not necessary, this is not fully true. Some parts of the `intel/ipu6-drivers` and `intel/ipu6-camera-bins` are merged into mainline kernel, however most kernel versions lack some critical parts of the stack. Moreover, the camera model I have (`ov08x40`) does not have a proper driver on the kernel.
I have kernel version `6.15`, and this repository should work kernels between `6.12` to `6.15` inclusive (maybe many more).
Note: Ubuntu works out of the box with this camera. Please check [https://wiki.ubuntu.com/Lenovo](https://wiki.ubuntu.com/Lenovo) for more details.
## How it works
This repository installs the latest version (as of June 30, 2025) of the `ipu6-drivers` stack on top of a working version of `intel/usbio-drivers` and `ov08x40` packages. Then, it sets up `v4l2-relayd` and `v4l2loopback` to make the camera available to browsers and other applications.
## Installation
```
sudo pacman -Sy git base-devel dkms linux-headers gst-plugin-libcamera pipewire-libcamera libcamera-tools libcamera-ipa v4l2loopback-dkms v4l2loopback-utils
git clone https://github.com/oznakn/arch-ov08x40
cd arch-ov08x40
sudo dkms add usbio-drivers/
sudo dkms add ov08x40/
sudo dkms autoinstall
cd intel-ipu6-dkms-git && makepkg -si
cd intel-ipuep-camera-bin && makepkg -si
cd intel-ipuep-camera-hal-git && makepkg -si
cd icamerasrc-git-fix && makepkg -si
cd v4l2-relayd && makepkg -si
sudo cp /etc/camera/ipu6epmtl/sensors/ov08x40-uf.xml /etc/camera/ipu6epmtl/sensors/ov08x40-uf-orig.xml
sudo cp ov08x40-uf.xml /etc/camera/ipu6epmtl/sensors/ov08x40-uf.xml
sudo systemctl enable v4l2-relayd
echo -e "gpio-usbio\ni2c-usbio\nv4l2loopback" | sudo tee -a /etc/modules-load.d/ov08x40.conf
sudo reboot
```
Note: Please pick the right version of `linux-headers` package during the installation.
## How to test the installation
Intel MIPI cameras can be easily test with `gstreamer`. After installing the `ip6-drivers` stack (i.e. following the all steps in the initial installation section) the following command should help you test the camera.
```
gst-launch-1.0 icamerasrc ! autovideosink
```
After running this command a window should be opened regarding the camera.
### Partial testing
If you don't want to install `ipu6-drivers` stack, you can only run the following commands to install `usbio-drivers` and `ov08x40` and run the test command to see whether the camera is working or not.
Partial installation:
```
sudo pacman -Sy git base-devel dkms linux-headers gst-plugin-libcamera pipewire-libcamera libcamera-tools libcamera-ipa v4l2loopback-dkms v4l2loopback-utils
git clone https://github.com/oznakn/arch-ov08x40
cd arch-ov08x40
sudo dkms add usbio-drivers/
sudo dkms add ov08x40/
sudo dkms autoinstall
cd v4l2-relayd && makepkg -si
sudo systemctl enable v4l2-relayd
echo -e "gpio-usbio\ni2c-usbio\nv4l2loopback" | sudo tee -a /etc/modules-load.d/ov08x40.conf
sudo reboot
```
Testing:
```
gst-launch-1.0 libcamerasrc ! autovideosink
```
Compared to the `icamerasrc` version this version should give much worse quality video.
## FAQ
If you receive an error while installing `intel-ivsc-firmware`, first install it with `yay`, then continue installation.
## Thanks
Huge thanks to [@henkv1](https://github.com/henkv1) and [@stefanpartheym](https://github.com/stefanpartheym) for providing their setup and awesome repositories.