Hi, I'm trying to get an external USB webcam working on Ubuntu for an AI camera project using Python, OpenCV, face detection, and face recognition. My teacher wants me to use Ubuntu rather than Windows.
1. System information
- Laptop: MSI Katana GF66
- CPU: Intel Core i5 11th Gen, around 2.70 GHz
- GPU: NVIDIA RTX 3050 Laptop GPU
- OS: Ubuntu 26.04 (based on my installed package repositories)
- Current kernel:
7.0.0-38-generic
- Python: 3.14.4
- pip: 25.1.1
- OpenCV: Installed in a Python virtual environment; I have previously encountered different OpenCV versions and compatibility issues.
- External webcam USB ID:
2bdf:0280
- Webcam name:
SN0002 1080P Web Camera
- Built-in webcam:
HD Webcam
2. Main problem
The external webcam works perfectly on Windows, but on Ubuntu:
- The webcam sometimes appears in
lsusb but does not consistently appear in v4l2-ctl --list-devices.
- Sometimes listing the camera devices takes a long time.
- Ubuntu becomes slow or unresponsive when the external webcam is plugged in.
- My headphones repeatedly mute and unmute while the webcam is connected.
- After physically unplugging the external webcam, Ubuntu and the headphones return to normal.
- The webcam's video stream fails to start, even when the device is detected.
This makes me suspect a Linux USB/UVC driver or compatibility issue, but I cannot confirm the exact cause.
3. USB and kernel errors
The following errors appeared in kernel logs at different times:
usb_set_interface failed (-110)
Failed to set UVC probe control : -110 (exp. 26)
Failed to set UVC commit control : -110
Failed to query (GET_CUR) UVC probe control : -32 (exp. 26)
uvcvideo: probe with driver uvcvideo failed with error -5
- USB descriptor errors, timeouts, disconnections, and
unable to enumerate USB device
The webcam sometimes appears under /dev/video0, /dev/video1, /dev/video2, or /dev/video3, depending on device enumeration. These numbers are not fixed.
USB controllers reported by lspci:
- Intel Tiger Lake-H Thunderbolt 4 USB Controller
[8086:9a17]
- Intel Tiger Lake-H USB 3.2 Gen 2x1 xHCI Host Controller
[8086:43ed]
lsusb -t showed the webcam on Bus 003 at 480M using uvcvideo.
4. Tests already performed
A. Confirmed that Ubuntu detects the USB device
lsusb shows:
2bdf:0280 SN0002 1080P Web Camera
However, USB detection does not guarantee that video capture works.
B. Checked the camera's supported formats
v4l2-ctl --list-formats-ext worked and listed these formats:
- YUYV: 640x360 at 25 FPS, 640x480 at 25 FPS, 1280x720 at 10 FPS, 1280x960 at 7 FPS.
- MJPEG: 640x360, 640x480, 1280x720, and 1920x1080, with up to 30 FPS listed for several modes.
C. Tried streaming directly through V4L2
Command:
v4l2-ctl -d /dev/video2 --stream-mmap --stream-count=10
Result:
VIDIOC_STREAMON returned -1 (Input/output error)
I also tried setting MJPEG at 640x480 and 30 FPS:
v4l2-ctl -d /dev/video2 --set-fmt-video=width=640,height=480,pixelformat=MJPG --set-parm=30 --stream-mmap=4 --stream-count=30
This produced VIDIOC_S_FMT, VIDIOC_S_PARM, and VIDIOC_STREAMON Input/output errors.
D. Changed USB runtime power management
The webcam's USB power control was set from auto to on using:
echo on | sudo tee /sys/bus/usb/devices/3-1/power/control
After this, device listing became faster and both cameras appeared, but video streaming still failed. The device path may change after reconnecting.
E. Checked system resources
At one point, system memory was not exhausted: approximately 14 GiB RAM total, 9 GiB available, and load averages around 1.81, 1.65, and 1.24. Therefore, ordinary memory exhaustion did not appear to explain the problem.
F. Checked kernel packages
I considered testing an older kernel side-by-side with the current one to determine whether the issue was kernel-specific.
The current kernel is 7.0.0-38-generic. An older 7.0.0-34-generic package was available, but installing it failed due to dependency conflicts:
linux-modules-7.0.0-34-generic depends on linux-main-modules-zfs-7.0.0-34-generic, which apt would not install.
linux-modules-nvidia-595-open-7.0.0-34-generic has a version conflict with the available nvidia-kernel-common-595 package.
I did not force the installation or remove any NVIDIA packages.
5. Current status
- I am currently back in Windows, where the external webcam works perfectly.
- I have unplugged the webcam from Ubuntu because it caused system slowdowns and repeated headphone muting.
- My Ubuntu installation and NVIDIA drivers have not intentionally been downgraded or removed.
- I have not yet retested the webcam on a different USB port or cable.
- I want to fix the underlying Ubuntu camera issue rather than switch my project to Windows.
6. Questions
- What could cause this particular USB webcam to be detected by
lsusb but fail during UVC probe/commit or video streaming?
- Could this be a kernel regression or compatibility issue involving
uvcvideo and this Intel USB controller?
- How can I safely investigate the USB timeouts without risking my current Ubuntu installation or NVIDIA driver?
- Are there specific kernel logs, USB traces, or other diagnostics I should collect before changing kernels?
- Could the webcam itself be triggering USB-controller resets or other device problems that explain the system slowdowns and headphone muting?
I would appreciate suggestions for diagnosing the root cause before attempting a kernel change.