Skip to content

Camera support #91

Closed
Closed

Description

@jrevillard

I see that there is some activity here: jakeday/linux-surface#145

I think it's better to trace it here isn't it ?

Best,
Jerome


Maintainer note: There is a BountySource bounty available for this issue. If you'd like to see a camera driver consider donating to incentivise the work.

Activity

  1. mmalmeida commented on Feb 19, 2020

    @mmalmeida

    I agree

  2. qzed commented on Feb 19, 2020

    @qzed
    Member

    Right, makes sense to track this here.

  3. archseer commented on Feb 19, 2020

    @archseer
    Member

    Copying my old comment here:


    I found libcamera based on this bug report, it seems to have the required userspace code to have ipu3 working on 5.0. libcamera FOSDEM slides

    • ov7251 is upstream
    • ov5693 could probably be derived from ov5695
    • ov8865 could probably be derived with some work from ov8856
  4. archseer commented on Feb 19, 2020

    @archseer
    Member

    Unlikely to get anywhere without someone stepping up and putting some work into it though.

    I was hoping to work on the cameras before buying my Surface Laptop 3, but since the newest generation's cameras are available via USB it just worked out of the box -- I don't have hardware to develop against.

    I think @GrayHatter was taking a look at things a while ago.

  5. koroki commented on Feb 24, 2020

    @koroki

    Also Surface go has not support for camera.

    It helps to me a lot because I use Surface Go basically for working outside the office and, sometime I have to do some Skype videocall... And I should do in my mobile.

  6. Doridian commented on Mar 13, 2020

    @Doridian

    Well, I managed to find datasheets for the two missing drivers at least. Never done kernel dev, but I mean, how hard could it be? (sarcasm).
    Eh, due to obvious current events I have a bit more free time than usual, so let's see where I can get...
    Put random stuff in my repo here: https://github.com/Doridian/sb2-linux-cameras
    Will probbaly put random C files in there if I managed to get anywhere at all.

  7. 1774 remaining items

  8. derkrasseleo commented on Jan 7, 2024

    @derkrasseleo

    What is the current status for SP9? Seems like IPU6 isn't really on the radar from what I see of the recent discussion in this thread :( it looks to be the last remaining stuff for SP9's to work well (although the Sensors column has "?" so dunno what to say about that).

    I'm curious about that as well, I don't even know if anyone has successfully used the SP9 camera under linux yet. If someone knows what I could try, let me know. For now, I only tried installing the inte-ipu6-* packages from the aur.

    So how did it go with the aur packages? Thinking about the same...

    I haven't really done anything besides installing all ipu6-related packages, and I can only tell you that I still have no camera. (No available cameras in cam -l and nothing to choose from in cheese)

    This is what I get from LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l:

    [0:22:40.355337471] [67252] DEBUG IPAModule ipa_module.cpp:334 ipa_ipu3.so: IPA module /usr/lib/libcamera/ipa_ipu3.so is signed
    [0:22:40.355411990] [67252] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/lib/libcamera/ipa_ipu3.so'
    [0:22:40.355450549] [67252] DEBUG IPAModule ipa_module.cpp:334 ipa_vimc.so: IPA module /usr/lib/libcamera/ipa_vimc.so is signed
    [0:22:40.355468959] [67252] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/lib/libcamera/ipa_vimc.so'
    [0:22:40.355496405] [67252] ERROR IPAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found
    [0:22:40.355502708] [67252] ERROR IPAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info
    [0:22:40.355540618] [67252]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0
    [0:22:40.355748815] [67253] DEBUG Camera camera_manager.cpp:69 Starting camera manager
    [0:22:40.364230154] [67253] DEBUG DeviceEnumerator device_enumerator.cpp:224 New media device "intel-ipu6-isys" created from /dev/media0
    [0:22:40.364301266] [67253] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 24 missing dependencies
    [0:22:40.368286241] [67253] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found
    [0:22:40.368300636] [67253] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media0: intel-ipu6-isys
    [0:22:40.368574309] [67253] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerVimc'
    [0:22:40.368599446] [67253] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerUVC'
    [0:22:40.368607226] [67253] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerIPU3'
    Available cameras:
    
    
  9. derkrasseleo commented on Jan 7, 2024

    @derkrasseleo

    Update:
    After running install.sh from https://github.com/stefanpartheym/archlinux-ipu6-webcam I see a virtual camera in chesse and also in firefox/chromium. Just a black image unfortunately.
    image

    This is the error cheese throws: stream error: can't negotiate buffers on port: ../pipewire/src/gst/gstpipewiresrc.c(689): on_state_changed (): /GstCameraBin:camerabin/GstWrapperCameraBinSrc:camera_source/GstBin:bin36/GstPipeWireSrc:pipewiresrc1

  10. hmtheboy154 commented on Jan 26, 2024

    @hmtheboy154

    with this recent news it seems like IPU6 camera will going to be usable with libcamera ?
    https://www.phoronix.com/news/Intel-Webcam-IPU6-2024-State

    There's a COPR repo here from Hans de Goede
    https://copr.fedorainfracloud.org/coprs/jwrdegoede/ipu6-softisp/

  11. PhilDevProg commented on Jan 27, 2024

    @PhilDevProg

    I just found this guide made by someone who works on the IPU6 drivers: https://github.com/hao-yao/ipu6-sensor-guide
    It seems to explain how they work and what's needed exactly.

  12. pinchartl commented on Jan 27, 2024

    @pinchartl

    Note that the ipu6-sensor-guide covers sensor enablement when using the closed-source Intel camera stack, not libcamera.

  13. PhilDevProg commented on Jan 27, 2024

    @PhilDevProg

    After update to fedora 39(didn't patach the kernel), the camera works for once with qcam(both back and rear), but after reboot(maybe), the camera sensor not showing up in cam --list

    ❯ ll /lib/firmware/intel/ipu3-fw.bin.xz
    lrwxrwxrwx. 1 root root 55 12月13日 08:00 /lib/firmware/intel/ipu3-fw.bin.xz -> irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz
    
    ❯ sudo dmesg | grep ipu
    [    7.827026] ipu3-cio2 0000:00:14.3: Found supported sensor INT33BE:00
    [    7.827869] ipu3-cio2 0000:00:14.3: Found supported sensor INT347A:00
    [    7.828463] ipu3-cio2 0000:00:14.3: Found supported sensor INT347E:00
    [    7.828585] ipu3-cio2 0000:00:14.3: Connected 3 cameras
    [    7.828733] ipu3-cio2 0000:00:14.3: device 0x9d32 (rev: 0x1)
    [    7.842987] ipu3_imgu: module is from the staging directory, the quality is unknown, you have been warned.
    [    7.869488] ipu3-imgu 0000:00:05.0: device 0x1919 (rev: 0x1)
    [    7.869520] ipu3-imgu 0000:00:05.0: physical base address 0x00000000b1000000, 4194304 bytes
    [    8.041751] ipu3-imgu 0000:00:05.0: loaded firmware version irci_irci_ecr-master_20161208_0213_20170112_1500, 17 binaries, 1212984 bytes
    
    ❯ lsmod | grep ipu3
    ipu3_imgu             245760  0
    ipu3_cio2              49152  0
    ipu_bridge             24576  1 ipu3_cio2
    videobuf2_dma_sg       20480  2 ipu3_cio2,ipu3_imgu
    videobuf2_v4l2         40960  2 ipu3_cio2,ipu3_imgu
    videobuf2_common       94208  5 ipu3_cio2,videobuf2_v4l2,videobuf2_dma_sg,ipu3_imgu,videobuf2_memops
    v4l2_fwnode            32768  4 ipu3_cio2,ov7251,ov5693,ov8865
    v4l2_async             32768  6 v4l2_fwnode,ipu3_cio2,ov7251,ov5693,dw9719,ov8865
    videodev              389120  9 v4l2_async,v4l2_fwnode,ipu3_cio2,ov7251,videobuf2_v4l2,ov5693,dw9719,ov8865,ipu3_imgu
    mc                     90112  10 v4l2_async,videodev,ipu3_cio2,ov7251,videobuf2_v4l2,ov5693,videobuf2_common,dw9719,ov8865,ipu3_imgu
    

    Looks like I maybe have a similar or the same problem on my Go 3 (also on Fedora 39). Some days ago the camera still worked, but now it doesn't exist anymore if I run cam -l.

  14. mfa-nw commented on Jan 29, 2024

    @mfa-nw

    I am having the same issue on Fedora 39. On checking, /lib/firmware/intel/ipu3-fw.bin.xz is a link to irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz but the file irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz is no longer in my /lib/firmware/intel/ directory.

    I copied irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz back to my /lib/firmware/intel/ directory from an old version and the cameras started working again.

    I am not sure when the file was deleted but assume it was part of a fedora update. May be a problem with the linux-firmware package on Fedora 39?

  15. Dariqq commented on Jan 29, 2024

    @Dariqq

    I am having the same issue on Fedora 39. On checking, /lib/firmware/intel/ipu3-fw.bin.xz is a link to irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz but the file irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz is no longer in my /lib/firmware/intel/ directory.

    I copied irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz back to my /lib/firmware/intel/ directory from an old version and the cameras started working again.

    I am not sure when the file was deleted but assume it was part of a fedora update. May be a problem with the linux-firmware package on Fedora 39?

    I had the same issue . The irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz seems to have been moved to the intel-vsc-firmware package. Installing that and rebooting made the cameras work again.

  16. PhilDevProg commented on Jan 29, 2024

    @PhilDevProg

    I am having the same issue on Fedora 39. On checking, /lib/firmware/intel/ipu3-fw.bin.xz is a link to irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz but the file irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz is no longer in my /lib/firmware/intel/ directory.

    I copied irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz back to my /lib/firmware/intel/ directory from an old version and the cameras started working again.

    I am not sure when the file was deleted but assume it was part of a fedora update. May be a problem with the linux-firmware package on Fedora 39?

    I had the same issue . The irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz seems to have been moved to the intel-vsc-firmware package. Installing that and rebooting made the cameras work again.

    That unfortunately didn't fix it for me. Both camera still don't work and don't show up in cam -l.
    Output of sudo LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l:

    [0:02:26.624657890] [3464] DEBUG IPAModule ipa_module.cpp:334 ipa_ipu3.so: IPA module /usr/lib64/libcamera/ipa_ipu3.so is signed
    [0:02:26.624799570] [3464] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/lib64/libcamera/ipa_ipu3.so'
    [0:02:26.624887714] [3464]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0
    [0:02:26.625290184] [3468] DEBUG Camera camera_manager.cpp:69 Starting camera manager
    [0:02:26.642201396] [3468] DEBUG DeviceEnumerator device_enumerator.cpp:224 New media device "ipu3-imgu" created from /dev/media1
    [0:02:26.642257347] [3468] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media1 due to 12 missing dependencies
    [0:02:26.649143928] [3468] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media1 found
    [0:02:26.649182752] [3468] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media1: ipu3-imgu
    [0:02:26.649564443] [3468] DEBUG DeviceEnumerator device_enumerator.cpp:224 New media device "ipu3-cio2" created from /dev/media0
    [0:02:26.649604411] [3468] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 4 missing dependencies
    [0:02:26.651903827] [3468] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found
    [0:02:26.651939674] [3468] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media0: ipu3-cio2
    [0:02:26.652379406] [3468] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerIPU3'
    [0:02:26.652436512] [3468] DEBUG DeviceEnumerator device_enumerator.cpp:312 Successful match for media device "ipu3-cio2"
    [0:02:26.652484282] [3468] DEBUG DeviceEnumerator device_enumerator.cpp:312 Successful match for media device "ipu3-imgu"
    [0:02:26.652537488] [3468] DEBUG MediaDevice media_device.cpp:830 /dev/media1[ipu3-imgu]: ipu3-imgu 0[3] -> ipu3-imgu 0 viewfinder[0]: 0
    [0:02:26.652599857] [3468] DEBUG MediaDevice media_device.cpp:830 /dev/media1[ipu3-imgu]: ipu3-imgu 0[4] -> ipu3-imgu 0 3a stat[0]: 0
    [0:02:26.652631255] [3468] DEBUG MediaDevice media_device.cpp:830 /dev/media1[ipu3-imgu]: ipu3-imgu 0 input[0] -> ipu3-imgu 0[0]: 0
    [0:02:26.652680191] [3468] DEBUG MediaDevice media_device.cpp:830 /dev/media1[ipu3-imgu]: ipu3-imgu 0 parameters[0] -> ipu3-imgu 0[1]: 0
    [0:02:26.652735161] [3468] DEBUG MediaDevice media_device.cpp:830 /dev/media1[ipu3-imgu]: ipu3-imgu 1[3] -> ipu3-imgu 1 viewfinder[0]: 0
    [0:02:26.652781865] [3468] DEBUG MediaDevice media_device.cpp:830 /dev/media1[ipu3-imgu]: ipu3-imgu 1[4] -> ipu3-imgu 1 3a stat[0]: 0
    [0:02:26.652822657] [3468] DEBUG MediaDevice media_device.cpp:830 /dev/media1[ipu3-imgu]: ipu3-imgu 1 input[0] -> ipu3-imgu 1[0]: 0
    [0:02:26.652866666] [3468] DEBUG MediaDevice media_device.cpp:830 /dev/media1[ipu3-imgu]: ipu3-imgu 1 parameters[0] -> ipu3-imgu 1[1]: 0
    [0:02:26.652962200] [3468] DEBUG V4L2 v4l2_device.cpp:636 'ipu3-imgu 0': Control: IPU3 Pipe Mode (0x009819c1)
    [0:02:26.653288078] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video4[15:out]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.653418638] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video6[16:cap]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.653542718] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video7[17:cap]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.653659884] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video5[18:out]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.653770874] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video8[19:cap]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.653886243] [3468] DEBUG V4L2 v4l2_device.cpp:636 'ipu3-imgu 1': Control: IPU3 Pipe Mode (0x009819c1)
    [0:02:26.654073897] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video9[21:out]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.654211519] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video11[22:cap]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.654329475] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video12[23:cap]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.654455155] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video10[24:out]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.654573298] [3468] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video13[25:cap]: Opened device PCI:0000:00:05.0: ipu3-imgu: ipu3-imgu
    [0:02:26.654975744] [3468] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerUVC'
    Available cameras:
    

    My dmesg log:
    dmesg.log

  17. djrscally commented on Jan 29, 2024

    @djrscally

    @PhilDevProg

    The problem there is probably the VCM failing to probe:

    [    8.374365] dw9719 i2c-INT347A:00-VCM: Error writing reg 0x   2: -121
    [    8.374880] dw9719: probe of i2c-INT347A:00-VCM failed with error -121
    

    I'll try to take a look at that kernel on my Go2 tonight and figure out what's happened.

  18. StollD commented on Jan 30, 2024

    @StollD
    Member

    I had the same issue . The irci_irci_ecr-master_20161208_0213_20170112_1500.bin.xz seems to have been moved to the intel-vsc-firmware package. Installing that and rebooting made the cameras work again.

    For what its worth, not installing that package by default was an intentional decision by the Fedora maintainers. To keep things working smoothly, the surface kernel will now pull it in automatically.

  19. StollD commented on Jan 30, 2024

    @StollD
    Member

    This issue has been open for 4 years now, and it has gotten pretty much out of control.

    There are over 1700 posts in here, and with the GitHub interface being what it is, it is absolutely impossible to find anything, even when you know what you need to look for. Its time to close it.

    If you have a specific issues with getting the cameras to work, please open a dedicated issue on the issue tracker!

    For the general discussion, the news sharing and so on, we have created discussion topics, one for each IPU generation and one for general discussion.

    For example, news about the upstreaming status of IPU6 should be posted in the IPU6 topic, while news about libcamera integration into userspace should be posted in the general topic.

    I repeat, PLEASE post actual BUGS on the ISSUE TRACKER and not in the discussion topics.

    If you have any suggestions about this "structure", feel free to hit me up on Matrix.

    Weekend project idea: Figure out how many issues on GitHub are larger than this one, or if we have to call the Guinness Book

  20. locked and limited conversation to collaborators on Jan 30, 2024
  21. unpinned this issue on Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions