elementary / camera

Camera app designed for elementary OS
https://elementary.io
GNU General Public License v3.0
65 stars 18 forks source link

Camera not working on Dell XPS 13 9370 #175

Open im-barney opened 3 years ago

im-barney commented 3 years ago

Hi,

Installed eOS 6.0 The camera worked without any issues on eOS 5.1.x. Seems not to be working now. Installed Cheese and that works fine but it would be nice to have the default camera app working. I just get a black "image" in Camera and the camera light doesn't come on so it seems like it isn't even recognising the hardware.

Output from lshw: *-usb:0 description: Video product: Integrated_Webcam_HD vendor: CN0FFMHCLOG0087TB1W8A01 physical id: 5 bus info: usb@1:5 version: 72.79 serial: 200901010001 capabilities: usb-2.01 configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s

Thanks!

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/100375768-camera-not-working-on-dell-xps-13-9370?utm_campaign=plugin&utm_content=tracker%2F45629460&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F45629460&utm_medium=issues&utm_source=github).
casasfernando commented 3 years ago

Having the same issue on my laptop: Dell XPS 13 9310.

lshw output:

              *-usb:1
                   description: Video
                   product: Integrated_Webcam_HD
                   vendor: CKFJH91Q395430021240
                   physical id: 6
                   bus info: usb@3:6
                   version: 6.01
                   capabilities: usb-2.01
                   configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s

The webcam works fine with Cheese, ffplay and howdy.

Thanks

jeremypw commented 3 years ago

Do you have two cameras installed? There is a possibility of an issue related to two cameras.

casasfernando commented 3 years ago

I have only one camera but it actually has two: RGB + IR

Camera devices (video0 is RGB, video2 is IR):

fernando@nbookfcs:~$ v4l2-ctl --list-devices
Integrated_Webcam_HD: Integrate (usb-0000:00:14.0-6):
    /dev/video0
    /dev/video1
    /dev/video2
    /dev/video3
fernando@nbookfcs:~$ ll /dev/video*
crw-rw----+ 1 root video 81, 0 oct 29 21:47 /dev/video0
crw-rw----+ 1 root video 81, 1 oct 29 21:47 /dev/video1
crw-rw----+ 1 root video 81, 2 oct 29 21:47 /dev/video2
crw-rw----+ 1 root video 81, 3 oct 29 21:47 /dev/video3
fernando@nbookfcs:~$ v4l2-ctl -d /dev/video0 --all
Driver Info:
    Driver name      : uvcvideo
    Card type        : Integrated_Webcam_HD: Integrate
    Bus info         : usb-0000:00:14.0-6
    Driver version   : 5.10.68
    Capabilities     : 0x84a00001
        Video Capture
        Metadata Capture
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps      : 0x04200001
        Video Capture
        Streaming
        Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
    Width/Height      : 1280/720
    Pixel Format      : 'MJPG' (Motion-JPEG)
    Field             : None
    Bytes per Line    : 0
    Size Image        : 1843789
    Colorspace        : Default
    Transfer Function : Default (maps to Rec. 709)
    YCbCr/HSV Encoding: Default (maps to ITU-R 601)
    Quantization      : Default (maps to Full Range)
    Flags             : 
Crop Capability Video Capture:
    Bounds      : Left 0, Top 0, Width 1280, Height 720
    Default     : Left 0, Top 0, Width 1280, Height 720
    Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1280, Height 720, Flags: 
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1280, Height 720, Flags: 
Streaming Parameters Video Capture:
    Capabilities     : timeperframe
    Frames per second: 30.000 (30/1)
    Read buffers     : 0
                     brightness 0x00980900 (int)    : min=-64 max=64 step=1 default=0 value=0
                       contrast 0x00980901 (int)    : min=0 max=95 step=1 default=0 value=0
                     saturation 0x00980902 (int)    : min=0 max=100 step=1 default=64 value=64
                            hue 0x00980903 (int)    : min=-2000 max=2000 step=1 default=0 value=0
 white_balance_temperature_auto 0x0098090c (bool)   : default=1 value=1
                          gamma 0x00980910 (int)    : min=100 max=300 step=1 default=100 value=100
                           gain 0x00980913 (int)    : min=1 max=8 step=1 default=1 value=1
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=2 value=1
                0: Disabled
                1: 50 Hz
                2: 60 Hz
      white_balance_temperature 0x0098091a (int)    : min=2800 max=6500 step=1 default=4600 value=4600 flags=inactive
                      sharpness 0x0098091b (int)    : min=1 max=7 step=1 default=2 value=2
         backlight_compensation 0x0098091c (int)    : min=0 max=3 step=1 default=3 value=3
                  exposure_auto 0x009a0901 (menu)   : min=0 max=3 default=3 value=3
                1: Manual Mode
                3: Aperture Priority Mode
              exposure_absolute 0x009a0902 (int)    : min=9 max=625 step=1 default=156 value=156 flags=inactive
         exposure_auto_priority 0x009a0903 (bool)   : default=0 value=1
fernando@nbookfcs:~$ v4l2-ctl -d /dev/video1 --all
Driver Info:
    Driver name      : uvcvideo
    Card type        : Integrated_Webcam_HD: Integrate
    Bus info         : usb-0000:00:14.0-6
    Driver version   : 5.10.68
    Capabilities     : 0x84a00001
        Video Capture
        Metadata Capture
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps      : 0x04a00000
        Metadata Capture
        Streaming
        Extended Pix Format
Priority: 2
Format Metadata Capture:
    Sample Format   : 'UVCH' (UVC Payload Header Metadata)
    Buffer Size     : 1024
fernando@nbookfcs:~$ v4l2-ctl -d /dev/video2 --all
Driver Info:
    Driver name      : uvcvideo
    Card type        : Integrated_Webcam_HD: Integrate
    Bus info         : usb-0000:00:14.0-6
    Driver version   : 5.10.68
    Capabilities     : 0x84a00001
        Video Capture
        Metadata Capture
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps      : 0x04200001
        Video Capture
        Streaming
        Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
    Width/Height      : 640/360
    Pixel Format      : 'GREY' (8-bit Greyscale)
    Field             : None
    Bytes per Line    : 640
    Size Image        : 230400
    Colorspace        : sRGB
    Transfer Function : Rec. 709
    YCbCr/HSV Encoding: ITU-R 601
    Quantization      : Default (maps to Full Range)
    Flags             : 
Crop Capability Video Capture:
    Bounds      : Left 0, Top 0, Width 640, Height 360
    Default     : Left 0, Top 0, Width 640, Height 360
    Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 640, Height 360, Flags: 
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 640, Height 360, Flags: 
Streaming Parameters Video Capture:
    Capabilities     : timeperframe
    Frames per second: 30.000 (30/1)
    Read buffers     : 0
fernando@nbookfcs:~$ v4l2-ctl -d /dev/video3 --all
Driver Info:
    Driver name      : uvcvideo
    Card type        : Integrated_Webcam_HD: Integrate
    Bus info         : usb-0000:00:14.0-6
    Driver version   : 5.10.68
    Capabilities     : 0x84a00001
        Video Capture
        Metadata Capture
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps      : 0x04a00000
        Metadata Capture
        Streaming
        Extended Pix Format
Priority: 2
Format Metadata Capture:
    Sample Format   : 'UVCH' (UVC Payload Header Metadata)
    Buffer Size     : 1024

Hope this helps. Thanks.

jeremypw commented 3 years ago

@casasfernando Thanks! If it is an integrated device it could be giving the same display name for both video0 and video devices, in which case PR #190 may fix you issue. If you are able to test that PR and leave a comment that would be great.

bmbariah commented 3 years ago

Having the same issue with the Dell XPS 15 9500

cassidyjames commented 2 years ago

@im-barney @casasfernando @bmbariah can you confirm whether the camera light comes on and a photo is taken when you hit the capture button? I'm seeing something similar here and wondering if it's the same issue or not.

casasfernando commented 2 years ago

I just checked with the latest version of Camera (system up to date) and things improved a little bit.

Now to answer your question @cassidyjames if I click on the capture button the image just freeze, but no picture is taken/saved and the camera light goes off (the image in the app is still there tough). The only way I found to get it back to work is to select again the second camera from the list. Then picture is live again and camera light is on.

On the other hand if I switch the app into video capture mode and I click on the capture button the camera light remains on, the image is still live -but with many random freezes- and when I click on stop, the video is saved correctly but the image freeze, the camera light remains on and I need to select again the second camera from the list to get it to work again. If I playback the saved video, it looks exactly as while capturing it, with a lot of freezes and no audio during the freezes.

Camera version:

Name                                             Application ID                                       Version                 Branch                Origin                Installation
Camera                                           io.elementary.camera                                 6.0.2                   stable                appcenter             system

Hope this detailed description of the current status helps. :smile:

cassidyjames commented 2 years ago

Thank you @casasfernando! It sounds like it's not the exact issue I am seeing in #198 then, so I will leave that issue open.

casasfernando commented 2 years ago

In case it helps I just ran Camera in debug mode and this is the output when trying to capture a photo:

[📦 io.elementary.camera ~]$ G_MESSAGES_DEBUG=all io.elementary.camera
(io.elementary.camera:223): GVFS-DEBUG: 01:07:33.356: org.gtk.vfs.MountTracker.listMountableInfo call failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown (g-dbus-error-quark, 2)

(io.elementary.camera:223): GLib-GIO-DEBUG: 01:07:33.356: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ?gio-vfs?
(io.elementary.camera:223): GLib-GIO-DEBUG: 01:07:33.359: _g_io_module_get_default: Found default implementation keyfile (GKeyfileSettingsBackend) for ?gsettings-backend?
(io.elementary.camera:223): GLib-DEBUG: 01:07:33.359: unsetenv() is not thread-safe and should not be used after threads are created
Gtk-Message: 01:07:33.411: Failed to load module "canberra-gtk-module"
Gtk-Message: 01:07:33.412: Failed to load module "canberra-gtk-module"
(io.elementary.camera:223): GLib-DEBUG: 01:07:33.412: unsetenv() is not thread-safe and should not be used after threads are created

** (io.elementary.camera:223): WARNING **: 01:07:39.290: CameraView.vala:264: Could not make picture pipeline for photo - could not set property "brightness" in element "videobalance2" to "0,000000"

And below, the output when I re-select the second camera from the list to get it back to work:

(io.elementary.camera:223): GStreamer-CRITICAL **: 01:07:58.092: gst_element_unlink: assertion 'GST_IS_ELEMENT (dest)' failed

(io.elementary.camera:223): GStreamer-CRITICAL **: 01:07:58.093: gst_bin_get_by_name: assertion 'GST_IS_BIN (bin)' failed

(io.elementary.camera:223): GStreamer-CRITICAL **: 01:07:58.093: gst_bin_remove: assertion 'GST_IS_ELEMENT (element)' failed

(io.elementary.camera:223): GStreamer-CRITICAL **: 01:07:58.093: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(io.elementary.camera:223): GLib-GObject-CRITICAL **: 01:07:58.093: g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed

Thanks.