[Solved] My camera doesn't seem to be detected on anything but Cheese and qcam.

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Ehllay

[Solved] My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by Ehllay »

A while ago I installed LM along W11 on my Surface Pro 6 as well as the surface kernel, since I wasn't sure if my keyboard, touchscreen or pen as well as the camera would work by default, however, the camera doesn't work for some reason on things like Skype, VLC, or any webpage that uses the camera. It does work, however on Cheese as well as qcam for some reason. I tried several solutions, such as following the surface kernel's wiki page on how to setup the camera, changing the Skype chmod bin file and making a v4l loopback (Although I need to admit that I feel like I broke it further doing this) but none of these solutions worked.

It sucks, because I really wanna get rid of Windows but I need the camera from time to time.

Anyways, here are some command outputs that could be of use:

Inxi:

Code: Select all

System:
  Kernel: 6.1.6-surface x86_64 bits: 64 compiler: gcc v: 11.3.0
    Desktop: Cinnamon 5.6.7 tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0
    Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: Microsoft product: Surface Pro 6
    v: 124000000000000000000000D:0B:13F:5C:10P:38S:01E:0
    serial: <superuser required> Chassis: type: 9
    serial: <superuser required>
  Mobo: Microsoft model: Surface Pro 6 serial: <superuser required>
    UEFI: Microsoft v: 238.167.768 date: 05.07.2014
Battery:
  ID-1: BAT1 charge: 12.9 Wh (46.7%) condition: 27.6/45.0 Wh (61.3%)
    volts: 7.3 min: 7.6 model: SMP M1009169 type: Li-ion serial: <filter>
    status: Discharging cycles: 369
Memory:
  RAM: total: 7.69 GiB used: 3.35 GiB (43.6%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: quad core model: Intel Core i5-8350U bits: 64 type: MT MCP
    smt: enabled arch: Coffee Lake rev: A cache: L1: 256 KiB L2: 1024 KiB
    L3: 6 MiB
  Speed (MHz): avg: 900 min/max: 400/3600 cores: 1: 900 2: 900 3: 900
    4: 900 5: 900 6: 900 7: 900 8: 900 bogomips: 30399
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Microsoft driver: i915 v: kernel
    ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:5917 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting
    unloaded: fbdev,vesa gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2736x1824 s-dpi: 96 s-size: 723x482mm (28.5x19.0")
    s-diag: 869mm (34.2")
  Monitor-1: eDP-1 model: LG serial: <filter> res: 2736x1824 hz: 60
    dpi: 267 size: 260x173mm (10.2x6.8") diag: 312mm (12.3") modes: 2736x1824
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2)
    v: 4.6 Mesa 22.0.5 direct render: Yes
Audio:
  Device-1: Intel Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging
  Unit
    driver: ipu3-imgu bus-ID: 00:05.0 chip-ID: 8086:1919 class-ID: 0480
  Device-2: Intel CSI-2 Host driver: ipu3-cio2 bus-ID: 00:14.3
    chip-ID: 8086:9d32 class-ID: 0480
  Device-3: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel v: kernel
    bus-ID: 00:1f.3 chip-ID: 8086:9d71 class-ID: 0403
  Sound Server-1: ALSA v: k6.1.6-surface running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Marvell 88W8897 [AVASTAR] 802.11ac Wireless driver: mwifiex_pcie
    v: 1.0 pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 01:00.0 chip-ID: 11ab:2b38
    class-ID: 0200
  IF: wlp1s0 state: up mac: <filter>
Bluetooth:
  Device-1: Marvell Bluetooth and Wireless LAN Composite type: USB
    driver: btusb v: 0.8 bus-ID: 1-5:3 chip-ID: 1286:204c class-ID: e001
    serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter>
    bt-v: 2.1 lmp-v: 4.2 sub-v: 7015 hci-v: 4.2 rev: 8300
Drives:
  Local Storage: total: 238.47 GiB used: 52.99 GiB (22.2%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: KUS030202M-B000
    size: 238.47 GiB speed: 15.8 Gb/s lanes: 2 type: SSD serial: <filter>
    rev: DXY8AM1Q temp: 28.9 C scheme: GPT
Partition:
  ID-1: / size: 88.19 GiB used: 52.96 GiB (60.0%) fs: ext4
    dev: /dev/nvme0n1p5
  ID-2: /boot/efi size: 256 MiB used: 35.3 MiB (13.8%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 1.72 GiB used: 1.5 MiB (0.1%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 32.0 C pch: 28.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2969 apt: 2955 flatpak: 14
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/danielrichter2007-grub-customizer-jammy.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/danielrichter2007-grub-customizer-jammy.gpg] https://ppa.launchpadcontent.net/danielrichter2007/grub-customizer/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/linux-surface.list
    1: deb [arch=amd64] https://pkg.surfacelinux.com/debian release main
  Active apt repos in: /etc/apt/sources.list.d/makedeb.list
    1: deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.hunterwittenborn.com/ makedeb main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb https://mirror.airenetworks.es/linuxmint/packages vera main upstream import backport
    2: deb http://softlibre.unizar.es/ubuntu/archive jammy main restricted universe multiverse
    3: deb http://softlibre.unizar.es/ubuntu/archive jammy-updates main restricted universe multiverse
    4: deb http://softlibre.unizar.es/ubuntu/archive jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/prebuilt-mpr.list
    1: deb [signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr vera
  Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
    1: deb [arch=amd64] https://repo.skype.com/deb stable main
  Active apt repos in: /etc/apt/sources.list.d/slimbook-slimbook-jammy.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/slimbook-slimbook-jammy.gpg] https://ppa.launchpadcontent.net/slimbook/slimbook/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/touchegg-stable-jammy.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/touchegg-stable-jammy.gpg] https://ppa.launchpadcontent.net/touchegg/stable/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
Info:
  Processes: 280 Uptime: 1h 48m wakeups: 2 Init: systemd v: 249 runlevel: 5
  Compilers: gcc: 11.3.0 alt: 11 Shell: Bash v: 5.1.16
  running-in: gnome-terminal inxi: 3.3.13
SecureBoot disabled
Platform is in Setup Mode
BOOT_IMAGE=/boot/vmlinuz-6.1.6-surface root=UUID=07d16e73-27d9-4d73-b2fe-c0ce3426bbb4 ro quiet splash
v4l2loopback/0.12.5, 6.1.6-surface, x86_64: installed
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Mouse      	id=8	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Consumer Control	id=9	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Touchpad   	id=10	[slave  pointer  (2)]
⎜   ↳ IPTS Touch                              	id=13	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Video Bus                               	id=6	[slave  keyboard (3)]
    ↳ Microsoft Surface Type Cover Keyboard   	id=7	[slave  keyboard (3)]
    ↳ gpio-keys                               	id=11	[slave  keyboard (3)]
    ↳ gpio-keys                               	id=12	[slave  keyboard (3)]
    ↳ IPTS Stylus                             	id=14	[slave  keyboard (3)]
    ↳ Microsoft Surface Type Cover Consumer Control	id=15	[slave  keyboard (3)]
  *-display
       description: VGA compatible controller
       product: UHD Graphics 620
       fabricante: Intel Corporation
       physical id: 2
       bus information: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 07
       architecture: 64 bits
       clock: 33MHz
       capacities: vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=2736,1824
       resources: irq:133 memoria:a0000000-a0ffffff memoria:90000000-9fffffff ioport:3000(size=64) memoria:c0000-dffff
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 045e:09c0 Microsoft Corp. Surface Type Cover
Bus 001 Device 003: ID 1286:204c Marvell Semiconductor, Inc. Bluetooth and Wireless LAN Composite
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1       
nvme0n1p1 vfat FAT32 SYSTEM 0C68-0939 220,7M 14% /boot/efi
nvme0n1p2       
nvme0n1p3 ntfs  Local\x20Disk 2E9E84039E83C1B7   
nvme0n1p4 ntfs  Windows\x20RE\x20tools 001685F91685EFC8   
nvme0n1p5 ext4 1.0  07d16e73-27d9-4d73-b2fe-c0ce3426bbb4 30,7G 60% /
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5914] (rev 08)
	Subsystem: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:2015]
	Kernel driver in use: skl_uncore
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07)
	Subsystem: Microsoft Corporation UHD Graphics 620 [1414:0026]
	Kernel driver in use: i915
	Kernel modules: i915
00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 08)
	Subsystem: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:2015]
	Kernel driver in use: proc_thermal
	Kernel modules: processor_thermal_device_pci_legacy
00:05.0 Multimedia controller [0480]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit [8086:1919] (rev 01)
	Subsystem: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit [8086:2015]
	Kernel driver in use: ipu3-imgu
	Kernel modules: ipu3_imgu
00:13.0 Non-VGA unclassified device [0000]: Intel Corporation Sunrise Point-LP Integrated Sensor Hub [8086:9d35] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP Integrated Sensor Hub [8086:7270]
	Kernel driver in use: intel_ish_ipc
	Kernel modules: intel_ish_ipc
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:7270]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:7270]
	Kernel driver in use: intel_pch_thermal
	Kernel modules: intel_pch_thermal
00:14.3 Multimedia controller [0480]: Intel Corporation CSI-2 Host Controller [8086:9d32] (rev 01)
	Subsystem: Intel Corporation CSI-2 Host Controller [8086:7270]
	Kernel driver in use: ipu3-cio2
	Kernel modules: ipu3_cio2
00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP Serial IO I2C Controller [8086:7270]
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci
00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP Serial IO I2C Controller [8086:7270]
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci
00:15.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 [8086:9d62] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP Serial IO I2C Controller [8086:7270]
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci
00:15.3 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 [8086:9d63] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP Serial IO I2C Controller [8086:7270]
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci
00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP CSME HECI [8086:7270]
	Kernel driver in use: mei_me
	Kernel modules: mei_me
00:16.4 Communication controller [0780]: Intel Corporation Device [8086:9d3e] (rev 21)
	Kernel driver in use: mei_me
	Kernel modules: mei_me
00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #4 [8086:9d13] (rev f1)
	Kernel driver in use: pcieport
00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 [8086:9d18] (rev f1)
	Kernel driver in use: pcieport
00:1e.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO UART Controller #0 [8086:9d27] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP Serial IO UART Controller [8086:7270]
	Kernel driver in use: intel-lpss
	Kernel modules: intel_lpss_pci
00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point LPC Controller/eSPI Controller [8086:9d4e] (rev 21)
	Subsystem: Intel Corporation Sunrise Point LPC Controller/eSPI Controller [8086:7270]
00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP PMC [8086:7270]
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
	Subsystem: Intel Corporation Sunrise Point-LP HD Audio [8086:7270]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel, snd_soc_skl, snd_soc_avs, snd_sof_pci_intel_skl
01:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88W8897 [AVASTAR] 802.11ac Wireless [11ab:2b38]
	Subsystem: Device [0008:045e]
	Kernel driver in use: mwifiex_pcie
	Kernel modules: mwifiex_pcie
02:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd Device [144d:a806]
	Subsystem: Samsung Electronics Co Ltd Device [144d:a801]
	Kernel driver in use: nvme
	Kernel modules: nvme
xinput:

Code: Select all

Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Mouse      	id=8	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Consumer Control	id=9	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Touchpad   	id=10	[slave  pointer  (2)]
⎜   ↳ IPTS Touch                              	id=13	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Video Bus                               	id=6	[slave  keyboard (3)]
    ↳ Microsoft Surface Type Cover Keyboard   	id=7	[slave  keyboard (3)]
    ↳ gpio-keys                               	id=11	[slave  keyboard (3)]
    ↳ gpio-keys                               	id=12	[slave  keyboard (3)]
    ↳ IPTS Stylus                             	id=14	[slave  keyboard (3)]
    ↳ Microsoft Surface Type Cover Consumer Control	id=15	[slave  keyboard (3)]
lsusb:

Code: Select all

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 045e:09c0 Microsoft Corp. Surface Type Cover
Bus 001 Device 003: ID 1286:204c Marvell Semiconductor, Inc. Bluetooth and Wireless LAN Composite
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
cam -l: (Maybe the second line hints the solution, but I am not sure)

Code: Select all

[1:44:16.018069699] [20236]  INFO Camera camera_manager.cpp:299 libcamera v0.0.3+30-0f382a99
[1:44:16.059954453] [20237] ERROR V4L2 v4l2_device.cpp:92 'dw9719 3-000c': Failed to open V4L2 device '': No such file or directory
[1:44:16.060085814] [20237] ERROR CameraSensor camera_sensor.cpp:501 'ov8865 3-0010': Lens initialisation failed, lens disabled
[1:44:16.107872012] [20237] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'ov8865.yaml' not found for IPA module 'ipu3'
[1:44:16.113133768] [20237]  INFO IPU3 ipu3.cpp:1206 Registered Camera[0] "\_SB_.PCI0.I2C3.CAMR" connected to CSI-2 receiver 0
[1:44:16.162029381] [20237] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'ov5693.yaml' not found for IPA module 'ipu3'
[1:44:16.163938744] [20237]  INFO IPU3 ipu3.cpp:1206 Registered Camera[1] "\_SB_.PCI0.I2C2.CAMF" connected to CSI-2 receiver 1
Available cameras:
1: Internal back camera (\_SB_.PCI0.I2C3.CAMR)
2: Internal front camera (\_SB_.PCI0.I2C2.CAMF)
ls -l /dev/video*:

Code: Select all

crw-rw----+ 1 root video 81,  0 ene 28 17:55 /dev/video0
crw-rw----+ 1 root video 81,  1 ene 28 17:55 /dev/video1
crw-rw----+ 1 root video 81, 16 ene 28 17:55 /dev/video10
crw-rw----+ 1 root video 81, 17 ene 28 17:55 /dev/video11
crw-rw----+ 1 root video 81, 18 ene 28 17:55 /dev/video12
crw-rw----+ 1 root video 81, 19 ene 28 17:55 /dev/video13
crw-rw----+ 1 root video 81, 22 ene 28 19:09 /dev/video14
crw-rw----+ 1 root video 81,  2 ene 28 17:55 /dev/video2
crw-rw----+ 1 root video 81,  3 ene 28 17:55 /dev/video3
crw-rw----+ 1 root video 81,  9 ene 28 17:55 /dev/video4
crw-rw----+ 1 root video 81, 11 ene 28 17:55 /dev/video5
crw-rw----+ 1 root video 81, 12 ene 28 17:55 /dev/video6
crw-rw----+ 1 root video 81, 13 ene 28 17:55 /dev/video7
crw-rw----+ 1 root video 81, 14 ene 28 17:55 /dev/video8
crw-rw----+ 1 root video 81, 15 ene 28 17:55 /dev/video9
Last edited by LockBot on Fri Jul 28, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mikeflan
Level 17
Level 17
Posts: 7084
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by mikeflan »

Hello and welcome to the forum.

I can't help with Skype, since I don't use it. I consider it Linux unfriendly, but maybe I am wrong about that. If the camera can be seen in Cheese or guvcview, then I would expect you can go into the Video Settings in Zoom, for example, and select the camera from within the application software. Normally that is not required, but I think I did it once long ago.
Ehllay

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by Ehllay »

Yeah, I tried that. Skype does not allow me to select my camera and it says that It hasn't found any camera device. Also gucview doesn't find it either, it just errors
mikeflan
Level 17
Level 17
Posts: 7084
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by mikeflan »

it just errors
Please give the error, or confirm it is this one:
.
cam.png
cam.png (4.98 KiB) Viewed 3174 times
.
Is your Cheese ver 3.34.0?

Please start Cheese, chick on hamburger in upper right - select Preferences - Webcam tab. What is across from Device?

This explains why Cheese works, and is a complicated solution (or partial solution) to your problem:
https://github.com/linux-surface/linux- ... ra-Support
Ehllay

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by Ehllay »

Please give the error, or confirm it is this one
Yes it is that error, although mine says "no video device (/dev/video0) found"
Is your Cheese ver 3.34.0?
My version of Cheese is 41.1.0
What is across from Device?
Well, Cheese gives me 4 cameras to select, two front and two rear although they are just two of _SB_.PCI0.I2C2.CAMF and _SB_.PCI0.I2C2.CAMR

Also, I think I will try again the loopback solution mentioned in the linux surface github you linked. Maybe it fixes it
Ehllay

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by Ehllay »

Alright, I have tried reinstalling v4l2 and then setting the loopback and the good news is that the camera is working with everything! The bad news is that it seems to only display a static image and it seems that it only captures said image when Cheese is running (Though I am still not sure if this is the case, since it displayed a black screen until I started Cheese), but that's fine by me. By the way guvcview now says that it could not start a video stream in the device, but it also brings up the previous error sometimes.
Ehllay

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by Ehllay »

Well, I have tried rebooting and now the camera preview looks like this:

Cheese and qcam still show up as normal
Attachments
camera preview.png
mikeflan
Level 17
Level 17
Posts: 7084
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by mikeflan »

the good news is that the camera is working with everything! The bad news is that it seems to only display a static image and it seems that it only captures said image when Cheese is running
When you say the camera is working with everything I assume that means it is working with Skype, VLC, Cheese, qcam, and any webpage that uses the camera. Is that true?
Ehllay

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by Ehllay »

Yes, all of that
Ehllay

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by Ehllay »

Ok, so I tried doing the loopback yet again because I discovered that I was doing it wrong the whole time. However, I can only manage to activate the camara for about 5-20 secconds after running the modprobe command as well as running this gst-launch comand for at least 2 times:

Code: Select all

sudo modprobe v4l2loopback video_nr=42 card_label="virtualcam" exclusive_caps=1^C

Code: Select all

gst-launch-1.0 libcamerasrc camera-name='\\\_SB_.PCI0.I2C2.CAMF' !     video/x-raw,width=1280,height=720,framerate=30/1,format=NV12     ! videoconvert ! video/x-raw,format=YUY2 ! queue !     v4l2sink device=/dev/video42
The command manages to show the camera output correctly with no more colored bars or black screens, however, as I mentioned before, for a brief time, until it crashes with this:

Code: Select all

ERROR: from element /GstPipeline:pipeline0/GstLibcameraSrc:libcamerasrc0: Internal data stream error.
Additional debug info:
../src/gstreamer/gstlibcamerasrc.cpp(312): processRequest (): /GstPipeline:pipeline0/GstLibcameraSrc:libcamerasrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:20.552562664
Freeing pipeline ...
Setting pipeline to NULL ...
Caught SIGSEGV
Spinning.  Please run 'gdb gst-launch-1.0 15298' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
  

What could be the reason behind this -5 error? I tried googling but didn't find much about it. Also, the message after the "Execution ended after 20 seconds" can vary
Ehllay

Re: My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by Ehllay »

Welp I've managed to fix it by myself. It turns out that I had to replace the

Code: Select all

! queue ! 
in the original gst-launch command with

Code: Select all

! videoconvert !
so now the command looks like this:

Code: Select all

gst-launch-1.0 libcamerasrc camera-name='\\\_SB_.PCI0.I2C2.CAMF' !     video/x-raw,width=1280,height=720,framerate=30/1,format=NV12     ! videoconvert ! video/x-raw,format=YUY2 ! videoconvert !     v4l2sink device=/dev/video42
I will leave the automatization for later, but I have made a shorter version of the command with bashrc so I can run it whenever I need my cam.
it4bitcoin
Level 1
Level 1
Posts: 1
Joined: Sat Mar 18, 2023 4:35 pm

Re: [Solved] My camera doesn't seem to be detected on anything but Cheese and qcam.

Post by it4bitcoin »

I made a handy Python3 GUI to manage the virtual loopback. To make it even more handy you can create a launcher in the desktop like this:

nano Camera-Switch.desktop
```

Code: Select all

[Desktop Entry]
Name=Camera Switch
Exec=python3 toggle-camera-gui.py
Comment=
Terminal=false
Icon=camera-hardware-disabled-symbolic
Type=Application
```


And then to create the script you will run:

nano toggle-camera-gui.py
```

Code: Select all

#!/usr/bin/env python3
import tkinter as tk
import subprocess
from threading import Thread

class CameraToggleGUI:
    def __init__(self, master):
        self.master = master
        master.title("MS Surface Pro (2017)")

        self.front_camera_on = False
        self.rear_camera_on = False

        self.btn_front_camera = tk.Button(window, text="Start Front Camera", bg="#0B3861", fg="white", width=20, height=3, font=("Ubuntu", 12, "bold"), command=self.toggle_front_camera)
        self.btn_front_camera.grid(row=0, column=0, padx=10, pady=10, sticky="nsew")

        self.btn_rear_camera = tk.Button(window, text="Start Rear Camera", bg="#0B3861", fg="white", width=20, height=3, font=("Ubuntu", 12, "bold"), command=self.toggle_rear_camera)
        self.btn_rear_camera.grid(row=1, column=0, padx=10, pady=10, sticky="nsew")

        master.geometry("520x130")
        master.grid_columnconfigure(0, weight=1, minsize=430)
        master.grid_rowconfigure([0,1,2], weight=1, minsize=60)

    def toggle_front_camera(self):
        if not self.front_camera_on:
            self.front_camera_on = True
            self.btn_front_camera.configure(text="Stop Front Camera", bg="#D72323")
            self.start_front_camera()
        else:
            self.front_camera_on = False
            self.btn_front_camera.configure(text="Start Front Camera", bg="#0B3861")
            self.stop_front_camera()

    def toggle_rear_camera(self):
        if not self.rear_camera_on:
            self.rear_camera_on = True
            self.btn_rear_camera.configure(text="Stop Rear Camera", bg="#D72323")
            self.start_rear_camera()
        else:
            self.rear_camera_on = False
            self.btn_rear_camera.configure(text="Start Rear Camera", bg="#0B3861")
            self.stop_rear_camera()

    def start_front_camera(self):
        self.process_front_camera = subprocess.Popen(["/bin/bash", "-c", 'gst-launch-1.0 libcamerasrc camera-name=\'\\\\_SB_.PCI0.I2C2.CAMF\' ! video/x-raw,width=1280,height=720,framerate=30/1,format=NV12 ! videoconvert ! video/x-raw,format=YUY2 ! videoconvert ! v4l2sink device=/dev/video42'])

    def stop_front_camera(self):
        self.process_front_camera.kill()

    def start_rear_camera(self):
        self.process_rear_camera = subprocess.Popen(["/bin/bash", "-c", 'gst-launch-1.0 libcamerasrc camera-name=\'\\\\_SB_.PCI0.I2C3.CAMR\' ! video/x-raw,width=1280,height=720,framerate=30/1,format=NV12 ! videoconvert ! video/x-raw,format=YUY2 ! videoconvert ! v4l2sink device=/dev/video42'])

    def stop_rear_camera(self):
        self.process_rear_camera.kill()

if __name__ == '__main__':
    window = tk.Tk()
    my_gui = CameraToggleGUI(window)
    window.mainloop()
```

So simple to use as to double Click the Icon in the Desktop Camera-Switch. It works in almost all apps including zoom.
Image

Image
Locked

Return to “Beginner Questions”