Dell XPS 9320 camera listed, but not working

After extensive debugging, I, along with my senior software engineer, finally resolved the issue with my Intel MIPI Camera (IPU6) on my Dell XPS 9320. Here’s what we found and how we fixed it.

Root Cause

The issue was likely caused by a mismatch in package versions due to upgrading the kernel without ensuring all required packages were updated accordingly. Some dependencies were either missing or installed in an incorrect location.

Steps to Fix

:one: Check Service Status

We first checked if v4l2-relayd was running properly:

sudo systemctl status v4l2-relayd

It was failing, which indicated something was wrong.

:two: Investigate Service Execution Command

We found the command that the service was executing:

/usr/bin/v4l2-relayd -i "icamerasrc buffer-count=7" -o "appsrc name=appsrc caps=video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! videoconvert ! v4l2sink name=v4l2sink device=/dev/video0"

To get more details about the failure, we stopped the service and ran it manually in the terminal:

sudo systemctl stop v4l2-relayd
/usr/bin/v4l2-relayd -i "icamerasrc buffer-count=7" -o "appsrc name=appsrc caps=video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! videoconvert ! v4l2sink name=v4l2sink device=/dev/video0"

Errors appeared, indicating broken dependencies or missing files.

:three: Verify Virtual Camera Functionality

We attempted to start a virtual camera to test if the pipeline worked:

gst-launch-1.0 v4l2src ! glimagesink

It did not work, further confirming broken dependencies.

:four: Reinstall Key Packages

We removed and reinstalled the critical packages:

sudo apt remove gstreamer1.0-icamera libgsticamerainterface-1.0-1 libcamhal0 libcamhal-common
sudo apt install gstreamer1.0-icamera libgsticamerainterface-1.0-1 libcamhal0 libcamhal-common

This ensured all dependencies were correctly installed.

:five: Fix Misplaced Firmware Files

Some firmware files were misplaced. We moved them manually:

cd /lib/firmware/intel/ipu
cp -r ./* ../

:six: Restart the Service and Test Again

We restarted the service and verified the virtual camera worked:

gst-launch-1.0 v4l2src ! glimagesink

This time, the camera worked! :tada:

:seven: Final Check and Reboot

We rebooted the system and verified that v4l2-relayd was running correctly:

sudo systemctl status v4l2-relayd

It was active, confirming that the issue was finally resolved.

Hope this helps someone else! :rocket:

2 Likes