sparrow: USB Webcam not working properly

Camera imagery shows only when webcamDevice has been emptied in config, prior in opening Sparrow app:

...
  "webcamResolution": "HD",
  "mirrorCapture": true,
  "useZbar": true,
  "webcamDevice": "",
  "serverType": "ELECTRUM_SERVER",
...

But then it stops working, as soon as you try to change the resolution via the dropdown options.

System Setup:

  • Sparrow Wallet: 2.2.3 (only tried it with this version)
  • OS Kernel: 6.15.3-arch1-1
  • RAM: 32Gb

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16

Most upvoted comments

Great.

I’ve made another minor change in 6c9a0d14 - @Tacitoku if you can run from source you might wish to try it.

Closing this off as resolved.

Thanks for the testing. I’ve made fixes in 49ab9e40 and cec7eac9ac031ad7c30616d2d548a57757fc3ce2 that I think will resolve this.

Can you try the test build at https://github.com/craigraw/beta/releases/tag/2.2.4-duplicate-webcam and see if it fixes the issue?

Yes, I tried those as well. I’m getting: ./openpnp-capture-test-ubuntu-20.04-x86_64: error while loading shared libraries: libopenpnp-capture.so.0: cannot open shared object file: No such file or directory I believe I needed to install libopenpnp. I’m still new with linux, trying to figure things really slow. Thank you for your patience and help.

Just able to ran it. A typo on the symlink I created before. Here’s what I got, while camera connected only on USB 2 port:

OpenPNP Capture Test Program
Linux 64 bit debug v0.0.28-4-2-g726d2f1 Jun  3 2025 
[DBG ] Context created
[INFO] Enumerating devices
[INFO] Name: 'Logitech BRIO'
[INFO] Path: '/dev/video0'
[INFO] Bus : 'usb-0000:03:00.0-5'
[INFO] capflags = 84A00001
[INFO] devflags = 04200001
[INFO] read/write NOT supported
[INFO] streaming I/O supported
[INFO] async I/O NOT supported
[INFO] Format 0
[INFO]   FOURCC = YUYV
[INFO] Format 1
[INFO]   FOURCC = MJPG
[INFO] Name: 'Logitech BRIO'
[INFO] Path: '/dev/video2'
[INFO] Bus : 'usb-0000:03:00.0-5'
[INFO] capflags = 84A00001
[INFO] devflags = 04200001
[INFO] read/write NOT supported
[INFO] streaming I/O supported
[INFO] async I/O NOT supported
[INFO] Format 0
[INFO]   FOURCC = GREY
Number of devices: 2
ID 0 -> Logitech BRIO
  Number of formats: 36
  Format ID 0: 640 x 480 pixels  FOURCC=YUYV
  Format ID 1: 160 x 120 pixels  FOURCC=YUYV
  Format ID 2: 176 x 144 pixels  FOURCC=YUYV
  Format ID 3: 320 x 180 pixels  FOURCC=YUYV
  Format ID 4: 320 x 240 pixels  FOURCC=YUYV
  Format ID 5: 352 x 288 pixels  FOURCC=YUYV
  Format ID 6: 340 x 340 pixels  FOURCC=YUYV
  Format ID 7: 424 x 240 pixels  FOURCC=YUYV
  Format ID 8: 440 x 440 pixels  FOURCC=YUYV
  Format ID 9: 480 x 270 pixels  FOURCC=YUYV
  Format ID 10: 640 x 360 pixels  FOURCC=YUYV
  Format ID 11: 800 x 448 pixels  FOURCC=YUYV
  Format ID 12: 800 x 600 pixels  FOURCC=YUYV
  Format ID 13: 848 x 480 pixels  FOURCC=YUYV
  Format ID 14: 960 x 540 pixels  FOURCC=YUYV
  Format ID 15: 1024 x 576 pixels  FOURCC=YUYV
  Format ID 16: 1280 x 720 pixels  FOURCC=YUYV
  Format ID 17: 1600 x 896 pixels  FOURCC=YUYV
  Format ID 18: 1920 x 1080 pixels  FOURCC=YUYV
  Format ID 19: 640 x 480 pixels  FOURCC=MJPG
  Format ID 20: 160 x 120 pixels  FOURCC=MJPG
  Format ID 21: 176 x 144 pixels  FOURCC=MJPG
  Format ID 22: 320 x 180 pixels  FOURCC=MJPG
  Format ID 23: 320 x 240 pixels  FOURCC=MJPG
  Format ID 24: 352 x 288 pixels  FOURCC=MJPG
  Format ID 25: 424 x 240 pixels  FOURCC=MJPG
  Format ID 26: 480 x 270 pixels  FOURCC=MJPG
  Format ID 27: 640 x 360 pixels  FOURCC=MJPG
  Format ID 28: 800 x 448 pixels  FOURCC=MJPG
  Format ID 29: 800 x 600 pixels  FOURCC=MJPG
  Format ID 30: 848 x 480 pixels  FOURCC=MJPG
  Format ID 31: 960 x 540 pixels  FOURCC=MJPG
  Format ID 32: 1024 x 576 pixels  FOURCC=MJPG
  Format ID 33: 1280 x 720 pixels  FOURCC=MJPG
  Format ID 34: 1600 x 896 pixels  FOURCC=MJPG
  Format ID 35: 1920 x 1080 pixels  FOURCC=MJPG
ID 1 -> Logitech BRIO
  Number of formats: 1
  Format ID 0: 340 x 340 pixels  FOURCC=GREY
[INFO] Format buffer type: 1
[INFO] Width  = 640 pixels
[INFO] Height = 480 pixels
[INFO] FOURCC = YUYV
[INFO] FPS    = 30
[DBG ] FOURCC = YUYV
Stream ID = 0
[DBG ] captureThreadFunctionAsync started
Stream is open
Press Q to exit..
[DBG ] PlatformStreamHelper created.
[DBG ] Reserving 8 mmap buffers
[DBG ] Created mmap buffer of 614400 bytes
[DBG ] Created mmap buffer of 614400 bytes
[DBG ] Created mmap buffer of 614400 bytes
[DBG ] Created mmap buffer of 614400 bytes
[DBG ] Created mmap buffer of 614400 bytes
[DBG ] Created mmap buffer of 614400 bytes
[DBG ] Created mmap buffer of 614400 bytes
[DBG ] Created mmap buffer of 614400 bytes
[DBG ] stream is On
[ERR ] setAutoProperty (ID=5) failed on VIDIOC_S_CTRL (errno 22)
Set exposure to 1025
Default exposure = 250
Set focus to 127
Default focus = 0
Set zoom to 100
Default focus = 100
[ERR ] setProperty (ID=4) failed on VIDIOC_S_CTRL (errno 13)
Set white balance to 4750
Default white balance = 4000
Could not get gain limits.
Use the following keys:
  +/-    : change the exposure
  0      : set exposure to 0
  f/g    : change the focus
  z/x    : change the zoom
  [/]    : change the white balance
  a/s    : change the gain
  p      : estimate the frame rate
  w      : write one frame to a PPM file
  q      : quit
q
[INFO] closing stream
[DBG ] captureThreadFunctionAsync exited
[DBG ] stream is Off
[DBG ] Mmap buffers deleted
[DBG ] PlatformStreamHelper deleted.
[DBG ] Stream::~Stream reports 7 frames captured.
[DBG ] Context destroyed

Since it’s USB, is the udev rules necessary to be ran?

Nope, this would be group video:

ls -al /dev/video0                                                                                                                                                                                                                                         
crw-rw----+ 1 root video 81, 0 22. Jun 18:13 /dev/video0

But in this case even the video group is not needed, as this device is handled by systemd-logind automatically. Otherwise you also would not be able to use it at all.

There were some changes in the webcam libs in the recent versions. Maybe you try again v2.1.3 with a fresh config to check if there is maybe a bug in the new lib?