Skip to content

Getting Cameras Working on Surface Pro 5 (Debian 13 / Trixie) #2045

@Catchitall

Description

@Catchitall

Getting Cameras Working on Surface Pro 5 (Debian 13 / Trixie)
Hardware: Microsoft Surface Pro 5 (2017)
OS: Debian 13 (Trixie)
Kernel: 6.18.7-surface-1

Result

✅ Front camera (OV5693) — fully working
❌ Rear camera (OV8865) — detected but green image (ISP tuning file missing)

Steps Taken

  1. Install linux-surface kernel
    The stock Debian kernel has poor Surface hardware support. Install the patched kernel from the linux-surface project:
    bashwget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc
    | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg

echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main"
| sudo tee /etc/apt/sources.list.d/linux-surface.list

sudo apt update
sudo apt install linux-image-surface linux-headers-surface libwacom-surface
sudo reboot

  1. Install IPU3 firmware
    bashsudo apt install firmware-misc-nonfree
    sudo cp /lib/firmware/intel/irci_irci_ecr-master_20161208_0213_20170112_1500.bin
    /lib/firmware/intel/ipu3-fw.bin

  2. Install libcamera and tools
    bashsudo apt install libcamera-tools libcamera-ipa gstreamer1.0-libcamera
    gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good
    v4l-utils

  3. Verify both cameras are detected
    bashcam --list

Expected output:

1: Internal back camera (_SB_.PCI0.I2C3.CAMR)
2: Internal front camera (_SB_.PCI0.I2C2.CAMF)

  1. Install and build v4l2loopback from source
    The Debian package v4l2loopback-dkms 0.15.0 is incompatible with kernel 6.18.7-surface-1 due to changed V4L2 API signatures (v4l2_fh_add, v4l2_fh_del, removed setup_timer). Build from source instead:
    bashsudo apt remove v4l2loopback-dkms
    sudo apt install git dkms build-essential
    git clone https://github.com/umlaeute/v4l2loopback.git
    cd v4l2loopback
    sudo make && sudo make install
    sudo depmod -a

  2. Sign the module for Secure Boot
    Secure Boot is enabled on Surface Pro 5 by default. The module must be signed:
    bashsudo apt install kmod openssl

Create signing key

openssl req -new -x509 -newkey rsa:2048 -keyout ~/mok.key
-out ~/mok.crt -days 3650 -subj "/CN=v4l2loopback/" -nodes

Convert to DER format

openssl x509 -in ~/mok.crt -outform DER -out ~/mok.der

Sign the module

sudo /usr/src/linux-headers-6.18.7-surface-1/scripts/sign-file
sha256 ~/mok.key ~/mok.crt
/lib/modules/6.18.7-surface-1/updates/v4l2loopback.ko

Enroll the key

sudo mokutil --import ~/mok.der
sudo reboot
On reboot, follow the blue MOK Manager screen: Enroll MOK → Continue → Yes → enter password → Reboot.

  1. Load v4l2loopback with virtual devices
    bashecho "options v4l2loopback devices=2 video_nr=20,21 card_label="Back Camera","Front Camera" exclusive_caps=1" |
    sudo tee /etc/modprobe.d/v4l2loopback.conf

echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf

sudo modprobe v4l2loopback

  1. PipeWire sees both cameras natively
    No GStreamer loopback pipeline needed — PipeWire detects both cameras automatically via libcamera:
    bashwpctl status
    You should see ov5693 (front) and ov8865 (rear) listed under Video Devices.
    For Firefox, enable PipeWire camera support:

Go to about:config
Set media.webrtc.camera.allow-pipewire to true
Restart Firefox

Known Issue — Rear Camera Green Image
The rear camera (OV8865) produces a green image in all applications. This is a known upstream issue — the ov8865.yaml ISP tuning/calibration file does not exist for the Surface Pro 5's specific hardware implementation. Without it, libcamera runs in uncalibrated mode and cannot correctly process the Bayer sensor output.
This is not a configuration problem — it requires ISP tuning work by the linux-surface or libcamera community.
Tracking: https://github.com/linux-surface/linux-surface/wiki/Camera-Support

Tested March 2026. Kernel 6.18.7-surface-1. Debian 13 Trixie.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions