NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.7k stars 13.15k forks source link

Snapshot cannot play camera stream #261217

Open jtojnar opened 9 months ago

jtojnar commented 9 months ago

When using Snapshot from the gnome branch on my laptop, it does not display any camera output. I tried with ugly plugins as well:

$ GST_PLUGIN_SYSTEM_PATH_1_0=/nix/store/v41i6g3fhb9wkqf006ql0y5j5dv68rly-gst-plugins-ugly-1.22.5/lib/gstreamer-1.0 RUST_LOG=snapshot=debug,aperture=debug RUST_BACKTRACE=1 GST_DEBUG=3 snapshot
  INFO snapshot::application::imp: Snapshot (org.gnome.Snapshot)    
  INFO snapshot::application::imp: Version: 45.0    
  INFO snapshot::application::imp: Datadir: /nix/store/r273hlp4pyq2s7a3iwpg7lc7pgsx8637-snapshot-45.0/share/snapshot    
 DEBUG snapshot::application::imp: Application::startup    
 DEBUG snapshot::application::imp: Application::activate    
 DEBUG aperture::viewfinder::imp: Setup recording    
 DEBUG snapshot::widgets::gallery: Done loading 0 pictures    
 DEBUG snapshot::widgets::gallery: Done loading 0 videos    
 DEBUG aperture::device_provider: Starting device provider with file descriptor: 24    
 DEBUG snapshot::widgets::camera: Device provider started    
 DEBUG aperture::device_provider: Camera added: Dummy video device (0x0000) (V4L2), target-object: Some(51)
Properties {
    "api.v4l2.cap.bus_info": (gchararray) "platform:v4l2loopback-000",
    "api.v4l2.cap.capabilities": (gchararray) "85200003",
    "api.v4l2.cap.card": (gchararray) "Dummy video device (0x0000)",
    "api.v4l2.cap.device-caps": (gchararray) "05200003",
    "api.v4l2.cap.driver": (gchararray) "v4l2 loopback",
    "api.v4l2.cap.version": (gchararray) "6.5.7",
    "api.v4l2.path": (gchararray) "/dev/video0",
    "client.id": (gchararray) "33",
    "clock.quantum-limit": (gchararray) "8192",
    "device.api": (gchararray) "v4l2",
    "device.devids": (gchararray) "20736",
    "device.id": (gchararray) "44",
    "factory.id": (gchararray) "10",
    "factory.name": (gchararray) "api.v4l2.source",
    "media.class": (gchararray) "Video/Source",
    "media.role": (gchararray) "Camera",
    "node.description": (gchararray) "Dummy video device (0x0000) (V4L2)",
    "node.driver": (gchararray) "true",
    "node.name": (gchararray) "v4l2_input._sys_devices_virtual_video4linux_video0",
    "node.nick": (gchararray) "Dummy video device (0x0000)",
    "node.pause-on-idle": (gchararray) "false",
    "object.id": (gchararray) "51",
    "object.path": (gchararray) "v4l2:/dev/video0",
    "object.serial": (gchararray) "51",
    "priority.session": (gchararray) "1000",
}    
0:00:00.534912023 59201 0x7f7ea0003010 FIXME                default gstutils.c:4036:gst_pad_create_stream_id_internal:<preview-appsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.535238065 59201 0x7f7ea00032b0 FIXME                default gstutils.c:4036:gst_pad_create_stream_id_internal:<camerasrc-real-src-actual-src-pipewir:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.653451152 59201 0x7f7e40003710 WARN             pipewiresrc gstpipewiresrc.c:685:on_state_changed:<camerasrc-real-src-actual-src-pipewir> error: stream error: no more input formats
0:00:00.653532015 59201 0x7f7e40003710 WARN             pipewiresrc gstpipewiresrc.c:685:on_state_changed:<camerasrc-real-src-actual-src-pipewir> error: stream error: no more input formats
0:00:00.653871366 59201 0x7f7ea00032b0 WARN                 basesrc gstbasesrc.c:3132:gst_base_src_loop:<camerasrc-real-src-actual-src-pipewir> error: Internal data stream error.
0:00:00.653915174 59201 0x7f7ea00032b0 WARN                 basesrc gstbasesrc.c:3132:gst_base_src_loop:<camerasrc-real-src-actual-src-pipewir> error: streaming stopped, reason not-negotiated (-4)
 ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
 ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
 DEBUG aperture::device_provider: Camera added: Front Camera (V4L2), target-object: Some(49)
Properties {
    "api.v4l2.cap.bus_info": (gchararray) "usb-0000:00:14.0-5",
    "api.v4l2.cap.capabilities": (gchararray) "84a00001",
    "api.v4l2.cap.card": (gchararray) "Front Camera: Front Camera",
    "api.v4l2.cap.device-caps": (gchararray) "04200001",
    "api.v4l2.cap.driver": (gchararray) "uvcvideo",
    "api.v4l2.cap.version": (gchararray) "6.5.7",
    "api.v4l2.path": (gchararray) "/dev/video1",
    "client.id": (gchararray) "33",
    "clock.quantum-limit": (gchararray) "8192",
    "device.api": (gchararray) "v4l2",
    "device.devids": (gchararray) "20737",
    "device.id": (gchararray) "42",
    "device.product.id": (gchararray) "0xb42",
    "device.vendor.id": (gchararray) "0x04f",
    "factory.id": (gchararray) "10",
    "factory.name": (gchararray) "api.v4l2.source",
    "media.class": (gchararray) "Video/Source",
    "media.role": (gchararray) "Camera",
    "node.description": (gchararray) "Front Camera (V4L2)",
    "node.driver": (gchararray) "true",
    "node.name": (gchararray) "v4l2_input.pci-0000_00_14.0-usb-0_5_1.0",
    "node.nick": (gchararray) "Front Camera",
    "node.pause-on-idle": (gchararray) "false",
    "object.id": (gchararray) "49",
    "object.path": (gchararray) "v4l2:/dev/video1",
    "object.serial": (gchararray) "49",
    "priority.session": (gchararray) "990",
}    
 ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
 DEBUG aperture::device_provider: Camera added: Front Camera  Front Camera, target-object: Some(53)
Properties {
    "api.libcamera.location": (gchararray) "external",
    "api.libcamera.path": (gchararray) "\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-04f2:b42d",
    "client.id": (gchararray) "33",
    "clock.quantum-limit": (gchararray) "8192",
    "device.api": (gchararray) "libcamera",
    "device.description": (gchararray) "Front Camera: Front Camera",
    "device.id": (gchararray) "45",
    "device.name": (gchararray) "libcamera_device.\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-04f2:b42d",
    "device.product.name": (gchararray) "Front Camera: Front Camera",
    "factory.id": (gchararray) "10",
    "factory.name": (gchararray) "api.libcamera.source",
    "media.class": (gchararray) "Video/Source",
    "media.role": (gchararray) "Camera",
    "node.description": (gchararray) "Front Camera  Front Camera",
    "node.driver": (gchararray) "true",
    "node.name": (gchararray) "libcamera_input.__SB_.PCI0.XHC_.RHUB.HS05-5_1.0-04f2_b42d",
    "node.nick": (gchararray) "Front Camera  Front Camera",
    "node.pause-on-idle": (gchararray) "false",
    "object.id": (gchararray) "53",
    "object.path": (gchararray) "libcamera:\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-04f2:b42d",
    "object.serial": (gchararray) "53",
    "priority.session": (gchararray) "850",
}    
 ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
 ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
stream error: no more input formats
Some("../src/gst/gstpipewiresrc.c(685): on_state_changed (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")    
 ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
stream error: no more input formats
Some("../src/gst/gstpipewiresrc.c(685): on_state_changed (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")    
 ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
Internal data stream error.
Some("../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir:\nstreaming stopped, reason not-negotiated (-4)")    
 DEBUG aperture::viewfinder: Camerabin state succesfully set to NULL    

And after turning on v4l2 loopback program (Droidcam):

$ GST_PLUGIN_SYSTEM_PATH_1_0=/nix/store/v41i6g3fhb9wkqf006ql0y5j5dv68rly-gst-plugins-ugly-1.22.5/lib/gstreamer-1.0 RUST_LOG=snapshot=debug,aperture=debug RUST_BACKTRACE=1 GST_DEBUG=3 snapshot
  INFO snapshot::application::imp: Snapshot (org.gnome.Snapshot)    
  INFO snapshot::application::imp: Version: 45.0    
  INFO snapshot::application::imp: Datadir: /nix/store/r273hlp4pyq2s7a3iwpg7lc7pgsx8637-snapshot-45.0/share/snapshot    
 DEBUG snapshot::application::imp: Application::startup    
 DEBUG snapshot::application::imp: Application::activate    
 DEBUG aperture::viewfinder::imp: Setup recording    
 DEBUG snapshot::widgets::gallery: Done loading 0 pictures    
 DEBUG snapshot::widgets::gallery: Done loading 0 videos    
 DEBUG aperture::device_provider: Starting device provider with file descriptor: 24    
 DEBUG snapshot::widgets::camera: Device provider started    
 DEBUG aperture::device_provider: Camera added: Dummy video device (0x0000) (V4L2), target-object: Some(51)
Properties {
    "api.v4l2.cap.bus_info": (gchararray) "platform:v4l2loopback-000",
    "api.v4l2.cap.capabilities": (gchararray) "85200003",
    "api.v4l2.cap.card": (gchararray) "Dummy video device (0x0000)",
    "api.v4l2.cap.device-caps": (gchararray) "05200003",
    "api.v4l2.cap.driver": (gchararray) "v4l2 loopback",
    "api.v4l2.cap.version": (gchararray) "6.5.7",
    "api.v4l2.path": (gchararray) "/dev/video0",
    "client.id": (gchararray) "33",
    "clock.quantum-limit": (gchararray) "8192",
    "device.api": (gchararray) "v4l2",
    "device.devids": (gchararray) "20736",
    "device.id": (gchararray) "44",
    "factory.id": (gchararray) "10",
    "factory.name": (gchararray) "api.v4l2.source",
    "media.class": (gchararray) "Video/Source",
    "media.role": (gchararray) "Camera",
    "node.description": (gchararray) "Dummy video device (0x0000) (V4L2)",
    "node.driver": (gchararray) "true",
    "node.name": (gchararray) "v4l2_input._sys_devices_virtual_video4linux_video0",
    "node.nick": (gchararray) "Dummy video device (0x0000)",
    "node.pause-on-idle": (gchararray) "false",
    "object.id": (gchararray) "51",
    "object.path": (gchararray) "v4l2:/dev/video0",
    "object.serial": (gchararray) "51",
    "priority.session": (gchararray) "1000",
}    
0:00:00.666097502 62656 0x7fd870003a90 FIXME                default gstutils.c:4036:gst_pad_create_stream_id_internal:<preview-appsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.666382374 62656 0x7fd870003d30 FIXME                default gstutils.c:4036:gst_pad_create_stream_id_internal:<camerasrc-real-src-actual-src-pipewir:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.757367760 62656 0x7fd804004150 WARN             pipewiresrc gstpipewiresrc.c:685:on_state_changed:<camerasrc-real-src-actual-src-pipewir> error: stream error: can't negotiate buffers on port
0:00:00.757561301 62656 0x7fd804004150 WARN             pipewiresrc gstpipewiresrc.c:685:on_state_changed:<camerasrc-real-src-actual-src-pipewir> error: stream error: can't negotiate buffers on port
0:00:00.761120651 62656 0x7fd870003d30 WARN                GST_PADS gstpad.c:4361:gst_pad_peer_query:<src-crop:src> could not send sticky events
0:00:00.761702137 62656 0x7fd870003d30 WARN                 basesrc gstbasesrc.c:3132:gst_base_src_loop:<camerasrc-real-src-actual-src-pipewir> error: Internal data stream error.
0:00:00.761736422 62656 0x7fd870003d30 WARN                 basesrc gstbasesrc.c:3132:gst_base_src_loop:<camerasrc-real-src-actual-src-pipewir> error: streaming stopped, reason not-negotiated (-4)
 ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
 ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
 DEBUG aperture::device_provider: Camera added: Front Camera (V4L2), target-object: Some(49)
Properties {
    "api.v4l2.cap.bus_info": (gchararray) "usb-0000:00:14.0-5",
    "api.v4l2.cap.capabilities": (gchararray) "84a00001",
    "api.v4l2.cap.card": (gchararray) "Front Camera: Front Camera",
    "api.v4l2.cap.device-caps": (gchararray) "04200001",
    "api.v4l2.cap.driver": (gchararray) "uvcvideo",
    "api.v4l2.cap.version": (gchararray) "6.5.7",
    "api.v4l2.path": (gchararray) "/dev/video1",
    "client.id": (gchararray) "33",
    "clock.quantum-limit": (gchararray) "8192",
    "device.api": (gchararray) "v4l2",
    "device.devids": (gchararray) "20737",
    "device.id": (gchararray) "42",
    "device.product.id": (gchararray) "0xb42",
    "device.vendor.id": (gchararray) "0x04f",
    "factory.id": (gchararray) "10",
    "factory.name": (gchararray) "api.v4l2.source",
    "media.class": (gchararray) "Video/Source",
    "media.role": (gchararray) "Camera",
    "node.description": (gchararray) "Front Camera (V4L2)",
    "node.driver": (gchararray) "true",
    "node.name": (gchararray) "v4l2_input.pci-0000_00_14.0-usb-0_5_1.0",
    "node.nick": (gchararray) "Front Camera",
    "node.pause-on-idle": (gchararray) "false",
    "object.id": (gchararray) "49",
    "object.path": (gchararray) "v4l2:/dev/video1",
    "object.serial": (gchararray) "49",
    "priority.session": (gchararray) "990",
}    
 ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
 DEBUG aperture::device_provider: Camera added: Front Camera  Front Camera, target-object: Some(53)
Properties {
    "api.libcamera.location": (gchararray) "external",
    "api.libcamera.path": (gchararray) "\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-04f2:b42d",
    "client.id": (gchararray) "33",
    "clock.quantum-limit": (gchararray) "8192",
    "device.api": (gchararray) "libcamera",
    "device.description": (gchararray) "Front Camera: Front Camera",
    "device.id": (gchararray) "45",
    "device.name": (gchararray) "libcamera_device.\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-04f2:b42d",
    "device.product.name": (gchararray) "Front Camera: Front Camera",
    "factory.id": (gchararray) "10",
    "factory.name": (gchararray) "api.libcamera.source",
    "media.class": (gchararray) "Video/Source",
    "media.role": (gchararray) "Camera",
    "node.description": (gchararray) "Front Camera  Front Camera",
    "node.driver": (gchararray) "true",
    "node.name": (gchararray) "libcamera_input.__SB_.PCI0.XHC_.RHUB.HS05-5_1.0-04f2_b42d",
    "node.nick": (gchararray) "Front Camera  Front Camera",
    "node.pause-on-idle": (gchararray) "false",
    "object.id": (gchararray) "53",
    "object.path": (gchararray) "libcamera:\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-04f2:b42d",
    "object.serial": (gchararray) "53",
    "priority.session": (gchararray) "850",
}    
 ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
 ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
stream error: can't negotiate buffers on port
Some("../src/gst/gstpipewiresrc.c(685): on_state_changed (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")    
 ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
stream error: can't negotiate buffers on port
Some("../src/gst/gstpipewiresrc.c(685): on_state_changed (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")    
 ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
Internal data stream error.
Some("../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir:\nstreaming stopped, reason not-negotiated (-4)")    
 DEBUG aperture::viewfinder: Camerabin state succesfully set to NULL    

Cheese does display camera output.

cc @bobby285271

accelbread commented 8 months ago

Seeing this as well on nixos-unstable.

Snapshot fails to load camera but Cheese works.

This is the Snapshot output I'm getting:

2023-11-27T04:29:36.731714Z  INFO snapshot::application::imp: Snapshot (org.gnome.Snapshot)    
2023-11-27T04:29:36.731729Z  INFO snapshot::application::imp: Version: 45.0    
2023-11-27T04:29:36.731734Z  INFO snapshot::application::imp: Datadir: /nix/store/3jn3nmf7kbrgnrfnlvrq494nhaqv1xzy-snapshot-45.0/share/snapshot    
2023-11-27T04:29:36.942503Z  INFO ashpd::desktop::request: Creating a org.freedesktop.portal.Request /org/freedesktop/portal/desktop/request/1_137/ashpd_GuFy0PKGEB
2023-11-27T04:29:36.943785Z  INFO ashpd::desktop::request: Received signal 'Response' on 'org.freedesktop.portal.Request'
2023-11-27T04:29:36.943807Z  INFO ashpd::proxy: Calling method org.freedesktop.portal.Camera:OpenPipeWireRemote
0:00:00.154152797 55239 0x6d13a80034c0 FIXME                default gstutils.c:4036:gst_pad_create_stream_id_internal:<preview-appsrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.154274622 55239 0x6d13a8003750 FIXME                default gstutils.c:4036:gst_pad_create_stream_id_internal:<camerasrc-real-src-actual-src-pipewir:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.155131856 55239 0x6d12e0011000 FIXME              glcontext gstglcontext.c:2038:gst_gl_wrapped_context_get_config:<glwrappedcontext0> wrapped context could not retrieve config. The application may be missing a call to gst_gl_context_fill_info() or the specific platform implemention is not implemented for retrieving the config from a wrapped OpenGL context.
0:00:00.752375437 55239 0x6d13140031c0 WARN             pipewiresrc gstpipewiresrc.c:685:on_state_changed:<camerasrc-real-src-actual-src-pipewir> error: stream error: no more input formats
0:00:00.752418745 55239 0x6d13140031c0 WARN             pipewiresrc gstpipewiresrc.c:685:on_state_changed:<camerasrc-real-src-actual-src-pipewir> error: stream error: no more input formats
0:00:00.752475122 55239 0x6d13a8003750 WARN                 basesrc gstbasesrc.c:3132:gst_base_src_loop:<camerasrc-real-src-actual-src-pipewir> error: Internal data stream error.
0:00:00.752488772 55239 0x6d13a8003750 WARN                 basesrc gstbasesrc.c:3132:gst_base_src_loop:<camerasrc-real-src-actual-src-pipewir> error: streaming stopped, reason not-negotiated (-4)
2023-11-27T04:29:37.568532Z ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
2023-11-27T04:29:37.570635Z ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
2023-11-27T04:29:37.571483Z ERROR aperture::viewfinder: Could not start camerabin: Element failed to change its state    
2023-11-27T04:29:37.571976Z ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
stream error: no more input formats
Some("../src/gst/gstpipewiresrc.c(685): on_state_changed (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")    
2023-11-27T04:29:37.571994Z ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
stream error: no more input formats
Some("../src/gst/gstpipewiresrc.c(685): on_state_changed (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")    
2023-11-27T04:29:37.572010Z ERROR aperture::viewfinder: Bus Error from Some("/GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir")
Internal data stream error.
Some("../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstCameraBin:camerabin0/GstWrapperCameraBinSrc:camerasrc/GstAutoVideoSrc:camerasrc-real-src/GstPipeWireSrc:camerasrc-real-src-actual-src-pipewir:\nstreaming stopped, reason not-negotiated (-4)")    
bobby285271 commented 8 months ago

Since this works fine for me™ (i.e. both starting from terminal and from Activities works fine), I am not sure where to start help debug this. I noticed that upstream now has a TROUBLESHOOTING.md though I am not sure if that can actually help, maybe if neither the flathub build (also works for me) nor a pipewire bump helps then asking for help on upstream is okay :upside_down_face:

Posting my outputs on various things (I am on https://github.com/NixOS/nixpkgs/commit/5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8, using built-in camera on Dell Inspiron 7591):

pw-dump | grep default.video.source ``` $ pw-dump | grep default.video.source { "subject": 0, "key": "default.video.source", "type": "Spa:String:JSON", "value": { "name": "v4l2_input.pci-0000_00_14.0-usb-0_5_1.0" } } ```
nix-shell -p gst_all_1.gst-plugins-base -p gst_all_1.gst-plugins-good -p gst_all_1.gst-plugins-bad -p gst_all_1.gst-plugins-rs -p gst_all_1.gstreamer --run "gst-device-monitor-1.0 Video/Source" ``` $ nix-shell -p gst_all_1.gst-plugins-base -p gst_all_1.gst-plugins-good -p gst_all_1.gst-plugins-bad -p gst_all_1.gst-plugins-rs -p gst_all_1.gstreamer --run "gst-device-monitor-1.0 Video/Source" Probing devices... Device found: name : Integrated_Webcam_HD: Integrate class : Video/Source caps : video/x-raw, format=YUY2, width=1280, height=720, pixel-aspect-ratio=1/1, framerate=10/1 video/x-raw, format=YUY2, width=640, height=480, pixel-aspect-ratio=1/1, framerate=30/1 video/x-raw, format=YUY2, width=640, height=360, pixel-aspect-ratio=1/1, framerate=30/1 video/x-raw, format=YUY2, width=424, height=240, pixel-aspect-ratio=1/1, framerate=30/1 video/x-raw, format=YUY2, width=320, height=240, pixel-aspect-ratio=1/1, framerate=30/1 video/x-raw, format=YUY2, width=320, height=180, pixel-aspect-ratio=1/1, framerate=30/1 video/x-raw, format=YUY2, width=160, height=120, pixel-aspect-ratio=1/1, framerate=30/1 image/jpeg, parsed=true, width=1280, height=720, pixel-aspect-ratio=1/1, framerate=30/1 image/jpeg, parsed=true, width=960, height=540, pixel-aspect-ratio=1/1, framerate=30/1 image/jpeg, parsed=true, width=848, height=480, pixel-aspect-ratio=1/1, framerate=30/1 image/jpeg, parsed=true, width=640, height=480, pixel-aspect-ratio=1/1, framerate=30/1 image/jpeg, parsed=true, width=640, height=360, pixel-aspect-ratio=1/1, framerate=30/1 properties: udev-probed = true device.bus_path = pci-0000:00:14.0-usb-0:5:1.0 sysfs.path = /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/video4linux/video0 device.bus = usb device.subsystem = video4linux device.vendor.id = 0bda device.vendor.name = CKFHH66P235410035FD0 device.product.id = 5538 device.product.name = Integrated_Webcam_HD: Integrate device.serial = CKFHH66P235410035FD0_Integrated_Webcam_HD_200901010001 device.capabilities = :capture: device.api = v4l2 device.path = /dev/video0 v4l2.device.driver = uvcvideo v4l2.device.card = Integrated_Webcam_HD: Integrate v4l2.device.bus_info = usb-0000:00:14.0-5 v4l2.device.version = 394508 (0x0006050c) v4l2.device.capabilities = 2225078273 (0x84a00001) v4l2.device.device_caps = 69206017 (0x04200001) gst-launch-1.0 v4l2src ! ... ```
RUST_LOG=snapshot=debug,aperture=debug RUST_BACKTRACE=1 GST_DEBUG=3 snapshot ``` $ RUST_LOG=snapshot=debug,aperture=debug RUST_BACKTRACE=1 GST_DEBUG=3 snapshot 2023-11-27T13:23:47.269713Z INFO snapshot::application::imp: Snapshot (org.gnome.Snapshot) 2023-11-27T13:23:47.269728Z INFO snapshot::application::imp: Version: 45.0 2023-11-27T13:23:47.269733Z INFO snapshot::application::imp: Datadir: /nix/store/3jn3nmf7kbrgnrfnlvrq494nhaqv1xzy-snapshot-45.0/share/snapshot 2023-11-27T13:23:47.269738Z DEBUG snapshot::application::imp: Application::startup 0:00:00.110126390 14457 0x235e830 WARN ladspa gstladspa.c:509:plugin_init: no LADSPA plugins found, check LADSPA_PATH 0:00:00.285043434 14457 0x235e830 WARN cudanvrtc gstcudanvrtc.c:148:gst_cuda_nvrtc_load_library_once: Could not open nvrtc library libnvrtc.so: cannot open shared object file: No such file or directory 0:00:00.392892325 14457 0x235e830 WARN vadisplay gstvadisplay.c:316:gst_va_display_initialize: vaInitialize: unknown libva error 0:00:00.409117965 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x120000: 'AVR (Audio Visual Research)' is not mapped 0:00:00.409129791 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x180000: 'CAF (Apple Core Audio File)' is not mapped 0:00:00.409134700 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x100000: 'HTK (HMM Tool Kit)' is not mapped 0:00:00.409140542 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xc0000: 'MAT4 (GNU Octave 2.0 / Matlab 4.2)' is not mapped 0:00:00.409145124 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xd0000: 'MAT5 (GNU Octave 2.1 / Matlab 5.0)' is not mapped 0:00:00.409149828 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x210000: 'MPC (Akai MPC 2k)' is not mapped 0:00:00.409154142 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x230000: 'MPEG-1/2 Audio' is not mapped 0:00:00.409159065 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xe0000: 'PVF (Portable Voice Format)' is not mapped 0:00:00.409164588 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x160000: 'SD2 (Sound Designer II)' is not mapped 0:00:00.409170693 14457 0x235e830 WARN default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x190000: 'WVE (Psion Series 3)' is not mapped 0:00:00.472621658 14457 0x235e830 WARN vadisplay gstvadisplay.c:316:gst_va_display_initialize: vaInitialize: unknown libva error 2023-11-27T13:23:48.116031Z DEBUG snapshot::application::imp: Application::activate 2023-11-27T13:23:48.188548Z DEBUG aperture::viewfinder::imp: Setup recording 2023-11-27T13:23:48.299153Z DEBUG snapshot::widgets::gallery: Done loading 2 pictures 2023-11-27T13:23:48.299344Z DEBUG snapshot::widgets::gallery: Done loading 0 videos 2023-11-27T13:23:48.304674Z DEBUG aperture::device_provider: Starting device provider with file descriptor: 30 2023-11-27T13:23:48.307675Z DEBUG snapshot::widgets::camera: Device provider started 2023-11-27T13:23:48.307769Z DEBUG aperture::device_provider: Camera added: Integrated_Webcam_HD (V4L2), target-object: Some(42) Properties { "device.id": (gchararray) "39", "api.v4l2.cap.bus_info": (gchararray) "usb-0000:00:14.0-5", "factory.name": (gchararray) "api.v4l2.source", "device.api": (gchararray) "v4l2", "factory.id": (gchararray) "10", "node.pause-on-idle": (gchararray) "false", "media.class": (gchararray) "Video/Source", "media.role": (gchararray) "Camera", "object.serial": (gchararray) "42", "node.nick": (gchararray) "Integrated_Webcam_HD", "object.id": (gchararray) "42", "api.v4l2.cap.device-caps": (gchararray) "04200001", "device.product.id": (gchararray) "0x553", "node.name": (gchararray) "v4l2_input.pci-0000_00_14.0-usb-0_5_1.0", "api.v4l2.cap.card": (gchararray) "Integrated_Webcam_HD: Integrate", "node.driver": (gchararray) "true", "device.vendor.id": (gchararray) "0x0bd", "api.v4l2.cap.capabilities": (gchararray) "84a00001", "api.v4l2.cap.version": (gchararray) "6.5.12", "api.v4l2.path": (gchararray) "/dev/video0", "node.description": (gchararray) "Integrated_Webcam_HD (V4L2)", "object.path": (gchararray) "v4l2:/dev/video0", "priority.session": (gchararray) "1000", "client.id": (gchararray) "35", "api.v4l2.cap.driver": (gchararray) "uvcvideo", "clock.quantum-limit": (gchararray) "8192", "device.devids": (gchararray) "20736", } 0:00:00.982245862 14449 0x7fc368003b40 FIXME default gstutils.c:4036:gst_pad_create_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:00.982329773 14449 0x7fc368003df0 FIXME default gstutils.c:4036:gst_pad_create_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:00.984210495 14449 0x7fc294010ea0 FIXME glcontext gstglcontext.c:2038:gst_gl_wrapped_context_get_config: wrapped context could not retrieve config. The application may be missing a call to gst_gl_context_fill_info() or the specific platform implemention is not implemented for retrieving the config from a wrapped OpenGL context. 2023-11-27T13:23:48.397555Z DEBUG aperture::viewfinder: Camerabin state succesfully set to PLAYING 2023-11-27T13:23:48.568480Z DEBUG aperture::viewfinder: Camerabin state succesfully set to NULL 0:00:01.256204880 14449 0x7fc368003df0 FIXME default gstutils.c:4036:gst_pad_create_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:01.256370977 14449 0x7fc368003b40 FIXME default gstutils.c:4036:gst_pad_create_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:01.302721696 14449 0x7fc368003b40 FIXME decodebin3 gstdecodebin3.c:1603:update_requested_selection: Implement EXPOSE_ALL_MODE 2023-11-27T13:23:48.648263Z DEBUG aperture::viewfinder: Camerabin state succesfully set to PLAYING 2023-11-27T13:23:48.649511Z DEBUG aperture::device_provider: Camera added: Built-in Front Camera, target-object: Some(44) Properties { "node.name": (gchararray) "libcamera_input.__SB_.PCI0.XHC_.RHUB.HS05-5_1.0-0bda_5538", "api.libcamera.path": (gchararray) "\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-0bda:5538", "object.id": (gchararray) "44", "device.id": (gchararray) "41", "node.nick": (gchararray) "Integrated_Webcam_HD Integrate", "device.api": (gchararray) "libcamera", "priority.session": (gchararray) "800", "object.serial": (gchararray) "44", "media.role": (gchararray) "Camera", "object.path": (gchararray) "libcamera:\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-0bda:5538", "node.driver": (gchararray) "true", "node.description": (gchararray) "Built-in Front Camera", "factory.id": (gchararray) "10", "api.libcamera.location": (gchararray) "front", "node.pause-on-idle": (gchararray) "false", "client.id": (gchararray) "35", "device.description": (gchararray) "Integrated_Webcam_HD: Integrate", "device.product.name": (gchararray) "Integrated_Webcam_HD: Integrate", "factory.name": (gchararray) "api.libcamera.source", "clock.quantum-limit": (gchararray) "8192", "media.class": (gchararray) "Video/Source", "device.name": (gchararray) "libcamera_device.\\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-0bda:5538", } 0:00:01.532402979 14449 0x7fc368003b40 FIXME decodebin3 gstdecodebin3-parse.c:453:unblock_pending_input: Re-use existing input streams if/when possible 0:00:01.533018157 14449 0x7fc368001040 FIXME decodebin3 gstdecodebin3.c:2130:get_output_for_slot: emit autoplug-continue 0:00:01.533066167 14449 0x7fc368001040 FIXME decodebin3 gstdecodebin3.c:2133:get_output_for_slot: Handle EXPOSE_ALL_MODE 0:00:01.534363462 14449 0x7fc30001a5e0 FIXME glcontext gstglcontext.c:2038:gst_gl_wrapped_context_get_config: wrapped context could not retrieve config. The application may be missing a call to gst_gl_context_fill_info() or the specific platform implemention is not implemented for retrieving the config from a wrapped OpenGL context. ```
nix-shell -p v4l-utils --run "v4l2-ctl --list-devices" ```diff $ nix-shell -p v4l-utils --run "v4l2-ctl --list-devices" Integrated_Webcam_HD: Integrate (usb-0000:00:14.0-5): /dev/video0 /dev/video1 /dev/media0 ```
env ``` $ env GNOME_SETUP_DISPLAY=:1 XCURSOR_PATH=/home/bobby285271/.icons:/home/bobby285271/.local/share/icons:/home/bobby285271/.local/share/flatpak/exports/share/icons:/home/bobby285271/.local/share/flatpak/exports/share/pixmaps:/var/lib/flatpak/exports/share/icons:/var/lib/flatpak/exports/share/pixmaps:/home/bobby285271/.nix-profile/share/icons:/home/bobby285271/.nix-profile/share/pixmaps:/nix/profile/share/icons:/nix/profile/share/pixmaps:/home/bobby285271/.local/state/nix/profile/share/icons:/home/bobby285271/.local/state/nix/profile/share/pixmaps:/etc/profiles/per-user/bobby285271/share/icons:/etc/profiles/per-user/bobby285271/share/pixmaps:/nix/var/nix/profiles/default/share/icons:/nix/var/nix/profiles/default/share/pixmaps:/run/current-system/sw/share/icons:/run/current-system/sw/share/pixmaps NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix TZ=Asia/Shanghai GDMSESSION=gnome __NIXOS_SET_ENVIRONMENT_DONE=1 NIX_GSETTINGS_OVERRIDES_DIR=/nix/store/q3cxx2rx16j8754frbj72h27s2k6q0ma-gnome-gsettings-overrides/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas DESKTOP_SESSION=gnome PWD=/home/bobby285271 NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR=/nix/store/1fg7r0ijqqjc8dd70ircblw56b615ybk-xdg-portal-configs/share/xdg-desktop-portal WAYLAND_DISPLAY=wayland-0 GDM_X_SERVER_EXTRA_ARGS=-config /nix/store/qgsg9qchdsx92qlp5jlz2fq6zk0zp94j-xserver.conf -xkbdir /nix/store/w4m1s9q2hlisl2bbhxmlwmci1m7nxzdr-xkeyboard-config-2.40/etc/X11/xkb -logfile /dev/null -nolisten tcp LOGNAME=bobby285271 EDITOR=nano INFOPATH=/home/bobby285271/.local/share/flatpak/exports/info:/home/bobby285271/.local/share/flatpak/exports/share/info:/var/lib/flatpak/exports/info:/var/lib/flatpak/exports/share/info:/home/bobby285271/.nix-profile/info:/home/bobby285271/.nix-profile/share/info:/nix/profile/info:/nix/profile/share/info:/home/bobby285271/.local/state/nix/profile/info:/home/bobby285271/.local/state/nix/profile/share/info:/etc/profiles/per-user/bobby285271/info:/etc/profiles/per-user/bobby285271/share/info:/nix/var/nix/profiles/default/info:/nix/var/nix/profiles/default/share/info:/run/current-system/sw/info:/run/current-system/sw/share/info QT_PLUGIN_PATH=/nix/store/145hggcdg95hnrhljbr1brprqpijgpmw-fcitx5-with-addons-5.1.5/lib/qt-6/plugins XDG_SESSION_TYPE=wayland SYSTEMD_EXEC_PID=3406 PATH=/home/bobby285271/.local/bin:/run/wrappers/bin:/home/bobby285271/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/home/bobby285271/.nix-profile/bin:/nix/profile/bin:/home/bobby285271/.local/state/nix/profile/bin:/etc/profiles/per-user/bobby285271/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin HOME=/home/bobby285271 USERNAME=bobby285271 QT_IM_MODULE=fcitx GDK_PIXBUF_MODULE_FILE=/nix/store/6kdk0rn09jjashhcb7yknklsc03dyycm-librsvg-2.57.0/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache USER=bobby285271 DISPLAY=:0 INVOCATION_ID=ef5e09269e514f1babff44336f1c07de NAUTILUS_4_EXTENSION_DIR=/nix/store/b9w8hlbr2rh0lh3v216lcji8h7hjdmch-system-path/lib/nautilus/extensions-4 SSH_ASKPASS=/nix/store/dx1xqvvv0h8dfzqcmr5spb93r9phj4sa-seahorse-43.0/libexec/seahorse/ssh-askpass GIO_EXTRA_MODULES=/nix/store/bhynrw9xbvgwhs0xc61wm7c5iwhbph4j-dconf-0.40.0-lib/lib/gio/modules:/nix/store/bhynrw9xbvgwhs0xc61wm7c5iwhbph4j-dconf-0.40.0-lib/lib/gio/modules:/nix/store/lkv8n0yi63dn2b38abrwzkarg8n0901b-gvfs-1.52.1/lib/gio/modules:/nix/store/phjy9jcaglcwy755wk7f8nmbh97rkjpl-glib-networking-2.78.0/lib/gio/modules:/nix/store/bhynrw9xbvgwhs0xc61wm7c5iwhbph4j-dconf-0.40.0-lib/lib/gio/modules JOURNAL_STREAM=8:26440 LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive LANG=zh_CN.UTF-8 XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.ETT9E2 XDG_DESKTOP_PORTAL_DIR=/nix/store/l63ha737cdbjq9jfwka0k27sarlklcw7-xdg-portals/share/xdg-desktop-portal/portals SESSION_MANAGER=local/inspiron:@/tmp/.ICE-unix/3406,unix/inspiron:/tmp/.ICE-unix/3406 SHLVL=1 NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/bobby285271 PAGER=less XDG_SESSION_DESKTOP=gnome XDG_DATA_DIRS=/nix/store/7n8wlc6600jx89kfqp7d5h23l3dbg18g-gnome-console-45.0/share:/nix/store/82zya9x49jsi9ajbl2n4g29pd3ql80gc-gsettings-desktop-schemas-45.0/share/gsettings-schemas/gsettings-desktop-schemas-45.0:/nix/store/5gdc4xw769fg44f7wp6yxhrhc3n99frh-gtk4-4.12.3/share/gsettings-schemas/gtk4-4.12.3:/nix/store/7n8wlc6600jx89kfqp7d5h23l3dbg18g-gnome-console-45.0/share/gsettings-schemas/gnome-console-45.0:/nix/store/cv38v8k6nf1ng6cr9mjfqq1as3vnb43w-gnome-mimeapps/share:/nix/store/b4p66vbxz9w65ix9kvxxza076dvs3m6l-desktops/share:/home/bobby285271/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/home/bobby285271/.nix-profile/share:/nix/profile/share:/home/bobby285271/.local/state/nix/profile/share:/etc/profiles/per-user/bobby285271/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share:/nix/store/1831r4rwifylnfc0zl8wnn3cr87zl5rf-gnome-shell-45.1/share/gsettings-schemas/gnome-shell-45.1:/nix/store/1ni21hnrb4x0h9n9xi1vp2ji65h6nv6z-gnome-shell-extensions-45.1/share/gsettings-schemas/gnome-shell-extensions-45.1:/nix/store/qwai148jhqxi5l3xj8x30jpg56shzv9i-gnome-session-45.0/share:/nix/store/82zya9x49jsi9ajbl2n4g29pd3ql80gc-gsettings-desktop-schemas-45.0/share/gsettings-schemas/gsettings-desktop-schemas-45.0:/nix/store/5pzqljy5fy7rsbrxicrqdlz3hvb25jhr-gtk+3-3.24.38/share/gsettings-schemas/gtk+3-3.24.38:/nix/store/d26di6ksnlpry7sa51c1dxrbp6by1yv9-gnome-settings-daemon-45.0/share/gsettings-schemas/gnome-settings-daemon-45.0:/nix/store/qwai148jhqxi5l3xj8x30jpg56shzv9i-gnome-session-45.0/share/gsettings-schemas/gnome-session-45.0:/nix/store/1831r4rwifylnfc0zl8wnn3cr87zl5rf-gnome-shell-45.1/share TERM_PROGRAM_VERSION=45.0 XDG_RUNTIME_DIR=/run/user/1000 XDG_CURRENT_DESKTOP=GNOME GDM_LANG=zh_CN.utf8 VTE_VERSION=7401 TZDIR=/etc/zoneinfo LESSOPEN=|/nix/store/78c2l3d5rrmpwddwdr7shwkz4nl6p868-lesspipe-2.10/bin/lesspipe.sh %s XDG_CONFIG_DIRS=/etc/xdg:/home/bobby285271/.local/share/flatpak/exports/etc/xdg:/var/lib/flatpak/exports/etc/xdg:/home/bobby285271/.nix-profile/etc/xdg:/nix/profile/etc/xdg:/home/bobby285271/.local/state/nix/profile/etc/xdg:/etc/profiles/per-user/bobby285271/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg:/nix/store/d26di6ksnlpry7sa51c1dxrbp6by1yv9-gnome-settings-daemon-45.0/etc/xdg MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA= GTK_PATH=/home/bobby285271/.local/share/flatpak/exports/lib/gtk-2.0:/home/bobby285271/.local/share/flatpak/exports/lib/gtk-3.0:/home/bobby285271/.local/share/flatpak/exports/lib/gtk-4.0:/var/lib/flatpak/exports/lib/gtk-2.0:/var/lib/flatpak/exports/lib/gtk-3.0:/var/lib/flatpak/exports/lib/gtk-4.0:/home/bobby285271/.nix-profile/lib/gtk-2.0:/home/bobby285271/.nix-profile/lib/gtk-3.0:/home/bobby285271/.nix-profile/lib/gtk-4.0:/nix/profile/lib/gtk-2.0:/nix/profile/lib/gtk-3.0:/nix/profile/lib/gtk-4.0:/home/bobby285271/.local/state/nix/profile/lib/gtk-2.0:/home/bobby285271/.local/state/nix/profile/lib/gtk-3.0:/home/bobby285271/.local/state/nix/profile/lib/gtk-4.0:/etc/profiles/per-user/bobby285271/lib/gtk-2.0:/etc/profiles/per-user/bobby285271/lib/gtk-3.0:/etc/profiles/per-user/bobby285271/lib/gtk-4.0:/nix/var/nix/profiles/default/lib/gtk-2.0:/nix/var/nix/profiles/default/lib/gtk-3.0:/nix/var/nix/profiles/default/lib/gtk-4.0:/run/current-system/sw/lib/gtk-2.0:/run/current-system/sw/lib/gtk-3.0:/run/current-system/sw/lib/gtk-4.0 SHELL=/run/current-system/sw/bin/zsh XDG_SESSION_CLASS=user GTK_IM_MODULE=fcitx NIXPKGS_NO_GC_PATH=/nix/store/klnbd9zqa3lmzq2pzcq6iv24nilwvz6c-NVIDIA-Linux-x86_64-545.29.02.run TRACKER_CLI_SUBCOMMANDS_DIR=/nix/store/n7ch1qa151h0zrf87vz0b5dfnkf6k6yb-tracker-with-subcommands-3.6.0/libexec/tracker3 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus,guid=1f1d8d529bd17c4a971a71b96564947b XMODIFIERS=@im=fcitx MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/app.slice/app-gnome\x2dsession\x2dmanager.slice/gnome-session-manager@gnome.service/memory.pressure MANAGERPID=3309 DBUS_STARTER_BUS_TYPE=session CUPS_DATADIR=/nix/store/db34h9yy0p6h88a3i9a2h76sy8506b63-cups-progs/share/cups OLDPWD=/home/bobby285271 TERM_PROGRAM=kgx LIBEXEC_PATH=/home/bobby285271/.local/share/flatpak/exports/lib/libexec:/var/lib/flatpak/exports/lib/libexec:/home/bobby285271/.nix-profile/lib/libexec:/nix/profile/lib/libexec:/home/bobby285271/.local/state/nix/profile/lib/libexec:/etc/profiles/per-user/bobby285271/lib/libexec:/nix/var/nix/profiles/default/lib/libexec:/run/current-system/sw/lib/libexec QTWEBKIT_PLUGIN_PATH=/home/bobby285271/.local/share/flatpak/exports/lib/mozilla/plugins/:/var/lib/flatpak/exports/lib/mozilla/plugins/:/home/bobby285271/.nix-profile/lib/mozilla/plugins/:/nix/profile/lib/mozilla/plugins/:/home/bobby285271/.local/state/nix/profile/lib/mozilla/plugins/:/etc/profiles/per-user/bobby285271/lib/mozilla/plugins/:/nix/var/nix/profiles/default/lib/mozilla/plugins/:/run/current-system/sw/lib/mozilla/plugins/ NIX_PATH=/home/bobby285271/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels TERM=xterm-256color XDG_MENU_PREFIX=gnome- LESSKEYIN_SYSTEM=/nix/store/fczp2895xddx33fzjr9yhfv9dxnbhiyr-lessconfig COLORTERM=truecolor GPG_TTY=/dev/pts/0 NIX_PROFILES=/run/current-system/sw /nix/var/nix/profiles/default /etc/profiles/per-user/bobby285271 /home/bobby285271/.local/state/nix/profile /nix/profile /home/bobby285271/.nix-profile /var/lib/flatpak/exports /home/bobby285271/.local/share/flatpak/exports SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TERMINFO_DIRS=/home/bobby285271/.local/share/flatpak/exports/share/terminfo:/var/lib/flatpak/exports/share/terminfo:/home/bobby285271/.nix-profile/share/terminfo:/nix/profile/share/terminfo:/home/bobby285271/.local/state/nix/profile/share/terminfo:/etc/profiles/per-user/bobby285271/share/terminfo:/nix/var/nix/profiles/default/share/terminfo:/run/current-system/sw/share/terminfo DBUS_STARTER_ADDRESS=unix:path=/run/user/1000/bus,guid=1f1d8d529bd17c4a971a71b96564947b ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=fg=8 ZSH=/nix/store/i5rmzsva2w7f5fk9j9sdw5q6878kira8-oh-my-zsh-2023-06-26/share/oh-my-zsh LESS=-R LSCOLORS=Gxfxcxdxbxegedabagacad LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90: _=/run/current-system/sw/bin/env ```
whoami && groups ``` $ whoami && groups bobby285271 users wheel tty audio video networkmanager docker input ```
jtojnar commented 8 months ago

Even weirder, on my work laptop, the camera works when started from terminal:

2023-11-27T14:15:38.413513Z  INFO snapshot::application::imp: Snapshot (org.gnome.Snapshot)    
2023-11-27T14:15:38.413524Z  INFO snapshot::application::imp: Version: 45.0    
2023-11-27T14:15:38.413525Z  INFO snapshot::application::imp: Datadir: /nix/store/3jn3nmf7kbrgnrfnlvrq494nhaqv1xzy-snapshot-45.0/share/snapshot    
2023-11-27T14:15:38.562766Z  INFO ashpd::desktop::request: Creating a org.freedesktop.portal.Request /org/freedesktop/portal/desktop/request/1_159/ashpd_WBoWzAvFBs
2023-11-27T14:15:38.564825Z  INFO ashpd::desktop::request: Received signal 'Response' on 'org.freedesktop.portal.Request'
2023-11-27T14:15:38.564863Z  INFO ashpd::proxy: Calling method org.freedesktop.portal.Camera:OpenPipeWireRemote

but not when started from Activities:

Nov 27 15:11:21 sy org.gnome.Snapshot.desktop[225701]: 2023-11-27T14:11:21.363954Z  INFO snapshot::application::imp: Snapshot (org.gnome.Snapshot)
Nov 27 15:11:21 sy org.gnome.Snapshot.desktop[225701]: 2023-11-27T14:11:21.363963Z  INFO snapshot::application::imp: Version: 45.0
Nov 27 15:11:21 sy org.gnome.Snapshot.desktop[225701]: 2023-11-27T14:11:21.363965Z  INFO snapshot::application::imp: Datadir: /nix/store/3jn3nmf7kbrgnrfnlvrq494nhaqv1xzy-snapshot-45.0/share/snapshot
Nov 27 15:11:21 sy systemd[203083]: Started Application launched by gnome-shell.
░░ Subject: A start job for unit UNIT has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit UNIT has finished successfully.
░░ 
░░ The job identifier is 1413.
Nov 27 15:11:21 sy org.gnome.Snapshot.desktop[225701]: 2023-11-27T14:11:21.511681Z  INFO ashpd::desktop::request: Creating a org.freedesktop.portal.Request /org/freedesktop/portal/desktop/request/1_133/ashpd_ERI3r1PRR7

Camera with no detected cameras

Weirdly, there are no significant environment differences I can see:

snapshot.console.env.txt snapshot.gnome-shell.env.txt

bjornfor commented 8 months ago

Since 14fb201c7ca9866ea9fd5bf953cb077191ce48ce swapped cheese for snapshot, there's no working camera app in NixOS 23.11 / GNOME (by default) :cry:

nixos-discourse commented 7 months ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-23-11-released/36210/34

hpfr commented 7 months ago

It also works fine for me regardless of launching from Activities/Bash. Let me know if any logs would be useful.

bjornfor commented 7 months ago

Now it works for me: snapshot shows camera output :tada:

I'm on NixOS 23.11 (commit d02d818) and iIt works both from GNOME Shell and gnome-terminal.

accelbread commented 7 months ago

Still not working here on unstable (5f64a12a728902226210bf01d25ec6cbb9d9265b). Is there commits on 23.11 not on unstable?

danilo-alm commented 6 months ago

Probably not a Nix problem, the same is happening with me on Arch. Starting from terminal triggered a pop up asking for camera access, but nothing changed. After the pop up, "Camera" (snapshot) was listed untoggled (no access) under settings -> privacy -> cameras; I checked it but nothing changed again.

edit: I forgot to mention: cheese works as expected. edit: for some reason, it's working fine after reboot. No upgrade was performed.

Aleksanaa commented 5 months ago

Please check if this is still the case. Working on 24.05.20240202.e92b601 with hyprland.

accelbread commented 5 months ago

Still not working for me on Gnome.

jtojnar commented 5 months ago

The symptoms described in https://github.com/NixOS/nixpkgs/issues/261217#issuecomment-1827940310 sound like they might stem from non-monotonic D-Bus serials. So maybe the issue I was having will be fixed by https://gitlab.gnome.org/GNOME/snapshot/-/merge_requests/194.

szw0407 commented 4 months ago

Has this issue been fixed yet in NixOS? If so, what caused this? I have the same error with snapshot on openSUSE Tumbleweed, GNOME 45. Thanks.