stefanpartheym / archlinux-ipu6-webcam

Easy installation for patched Intel IPU6 camera drivers
145 stars 15 forks source link

Only working in some programs #1

Closed alba4k closed 1 year ago

alba4k commented 1 year ago

First of all, I know this isn't your work, as you mention in the readme, but maybe you'll be able to help anyway, as you probably have a better understanding than me.

Basically, my webcam still doesn't seem to work.

What I find curious and that might be related is a series of errors that pop up while installing the v4l2loopback, ipu6-drivers and ivsc-driver modules packages:

==> ERROR: Missing dev kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing lib64 kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing lost+found kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing root kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing usr kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing tmp kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing lib kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing mnt kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing sys kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing swapfile kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing var kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing home kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing opt kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing boot kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing run kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing sbin kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing etc kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing srv kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing proc kernel headers for module ipu6-drivers/r67.278b7e3d0.
==> ERROR: Missing bin kernel headers for module ipu6-drivers/r67.278b7e3d0.

(same errors, all that changes is the module name and version)

As you probably noticed, the list of elements is simply a list of the files and directories in my root. My competence in kernel module building is close to none.

Also, if I try to load any of those modules, I get nothing (e.g. modprobe v4l2loopbaclk: modprobe: FATAL: Module v4l2loopback not found in directory /lib/modules/6.0.9-arch1-1; modprobe -r v4l2loopback: modprobe: FATAL: Module v4l2loopback not found.)

$ journalctl -xb -p3

Nov 24 23:56:54 dell-xps kernel: pci 0000:00:07.0: DPC: RP PIO log size 0 is invalid
Nov 24 23:56:54 dell-xps kernel: pci 0000:00:07.2: DPC: RP PIO log size 0 is invalid
Nov 24 23:56:53 dell-xps systemd-modules-load[313]: Failed to find module 'v4l2loopback'
Nov 24 23:56:55 dell-xps kernel: int3472-discrete INT3472:01: INT3472 seems to have no dependents.
Nov 24 23:56:56 dell-xps systemd[1]: Failed to start v4l2-relay daemon service.
-- Subject: A start job for unit v4l2-relayd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit v4l2-relayd.service has finished with a failure.
-- 
-- The job identifier is 806 and the job result is failed.
Nov 24 23:57:01 dell-xps kernel: dell_smm_hwmon: unable to get SMM Dell signature
Nov 24 23:57:02 dell-xps bluetoothd[1450]: src/plugin.c:plugin_init() Failed to init vcp plugin
Nov 24 23:57:02 dell-xps bluetoothd[1450]: src/plugin.c:plugin_init() Failed to init mcp plugin
Nov 24 23:57:02 dell-xps bluetoothd[1450]: src/plugin.c:plugin_init() Failed to init bap plugin
Nov 24 23:57:04 dell-xps sddm-helper[1481]: gkr-pam: couldn't unlock the login keyring.
Nov 24 23:57:04 dell-xps pipewire[1492]: pw.module: No module "libpipewire-module-x11-bell" was found
Nov 24 23:57:04 dell-xps kernel: Bluetooth: hci0: Malformed MSFT vendor event: 0x02
Nov 24 23:57:04 dell-xps bluetoothd[1450]: src/device.c:set_wake_allowed_complete() Set device flags return status: Invalid Parameters
Nov 24 23:57:04 dell-xps bluetoothd[1450]: src/device.c:set_wake_allowed_complete() Set device flags return status: Invalid Parameters
Nov 24 23:57:11 dell-xps bluetoothd[1450]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down

# GST_DEBUG=3 gst-launch-1.0 icamerasrc ! autovideoconvert

Setting pipeline to PAUSED ...
[11-24 23:57:50.326] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-24 23:57:50.326] CamHAL[ERR] there is no aiqb file:ov13b10
[11-24 23:57:50.326] CamHAL[INF] aiqb file name ov13b10.aiqb
[11-24 23:57:50.326] CamHAL[ERR] there is no aiqb file:ov13b10
[11-24 23:57:50.326] CamHAL[INF] aiqb file name ov8856.aiqb
[11-24 23:57:50.326] CamHAL[ERR] there is no aiqb file:ov8856
[11-24 23:57:50.326] CamHAL[INF] aiqb file name ov8856.aiqb
[11-24 23:57:50.326] CamHAL[ERR] there is no aiqb file:ov8856
[11-24 23:57:50.326] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-24 23:57:50.326] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-24 23:57:50.326] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name ov01a10.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name OV02C10_1BG203N3_ADL.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name OV02C10_1SG204N3_ADL.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name OV02C10_CIFME14_ADL.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name OV2740_CJFLE23_ADL.aiqb
[11-24 23:57:50.327] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name HM2170_1SG205N3_ADL.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name HM2170_CJFME18_ADL.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-24 23:57:50.328] CamHAL[INF] aiqb file name ov01a1s.aiqb
[11-24 23:57:50.329] CamHAL[ERR] @getDeviceName, Fail open : /sys/class/video4linux/
[11-24 23:57:50.329] CamHAL[ERR] Failed to find DevName for cameraId: 0, get video node: ov13b10 , devname: /dev/v4l-subdev1
[11-24 23:57:50.331] CamHAL[ERR] MediaControl init failed
0:00:00.263195316  8524 0x5650103c3a90 ERROR             icamerasrc gstcamerasrc.cpp:2845:gst_camerasrc_start: CameraId=0 failed to open libcamhal device.
0:00:00.289852695  8524 0x5650103c3a90 WARN              CamBaseSrc gstcambasesrc.cpp:4192:gst_cam_base_src_activate_push:<camerasrc0> Failed to start in push mode
0:00:00.289864168  8524 0x5650103c3a90 WARN                GST_PADS gstpad.c:1141:gst_pad_set_active:<camerasrc0:src> Failed to activate pad
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

I don't have any /dev/video* virtual devices

Tested on both linux and linux-zen, XPS 13 Plus (i7-1260P)

sigboe commented 1 year ago

ops forgot to ping @stefanpartheym

stefanpartheym commented 1 year ago

Hi @sigboe,

Currently, I use the suffix -archfix. Not sure, if it really fits, but probably not too important sweat_smile

Well my only opinion is that it's implicit this is a fix for arch, and many AUR packages have -fix suffix while no AUR package has -archfix suffix. So if you are interested in pushing this to AUR, then maybe the -fix suffix would suffice.

You're right. However, I didn't plan to push those packages to AUR. With the archfix suffix I wanted to avoid any possible conflicts with packages from AUR. Hope you guys agree, otherwise I'm gonna change the suffix.

sigboe commented 1 year ago

@stefanpartheym I don't think it matters if you have zero intentions to put the packages on the AUR.

Just as an FYI here are the packaging guidelines, I guess you know about them already https://wiki.archlinux.org/title/Arch_package_guidelines

alba4k commented 1 year ago

Currently, I use the suffix -archfix. Not sure, if it really fits, but probably not too important 😅

I guess using -fix would be enough, but yeah that sounds good.

Also, @stefanpartheym @sigboe , can you confirm that my fork works, so I know whether to open a pr or not.

Tropicao commented 1 year ago

Yes, same for me when using yay. I modified all PKGBUILDs in the repo to use a suffix in order for the AUR package managers to be able to distinguish between those packages (also specifying provides and conflicts). This will be part of the v1.0.0 "release". Currently, I use the suffix -archfix. Not sure, if it really fits, but probably not too important sweat_smile @alba4k @Tropicao @sigboe : Do you have any suggestions/wishes regarding the suffix? Otherwise I'll commit and push my changes to the repo.

You're right. However, I didn't plan to push those packages to AUR. With the archfix suffix I wanted to avoid any possible conflicts with packages from AUR. Hope you guys agree, otherwise I'm gonna change the suffix.

Hi @stefanpartheym. Before seeing your last answer, I was about to preach for a push to AUR : not only for a "fix" package, but to improve existing AUR packages by providing your modifications to those. IMHO, while this whole repository is currently the best way to make the webcam work on alder lake hardware, this package conflict issues (and your suggestion to add a suffix to fix this) highlights a more general issue, which is that we are kind of "forking" what already exists in AUR. While it seems valid as a short term solution (since the webcam support mess is here to stay for a while), any newcomer wanting to make the camera work will be confronted to multiple packages sources : the AUR packages, and your repository. In the mean time, I totally understand if you do not want to undertake this. In this case, I do not have any strong suggestion about the best prefix :)

stefanpartheym commented 1 year ago

Thanks @sigboe @alba4k @Tropicao for all the suggestions. I your answers give a clear direction as to what the suffix should be. Not that I would want to make a huge deal out of this, but you convinced me to use a simple fix suffix instead a weird unconventional archfix. I'll change the suffix in the repo and release a v1.0.1 for this. However, I think right now, I'm not going to release those packages to AUR any time soon. Also, not sure if I would need to ask the authors of the patches and PKGBUILDs before doing so.

Again thanks to all of you for your input and contributions :)

stefanpartheym commented 1 year ago

Hi @alba4k,

Ok so, it's not working for me, which I expected, but if any of you can confirm that it works with gst-plugin-pipewire installed, then using my branch should be working too. I can open a pull request if someone is able to confirm that it is indeed working.

sorry, I didn't check your fork before committing my changes. But yes, go ahead and create a PR, so I can merge your commit :)

alba4k commented 1 year ago

I also agree on not pushing to the aur, to be honest, as it would only add complexity to the already existing mess. I could though add a note on the Arch Wiki mentioning this, as it already mentions the arch support thread from which this was created.

I'm currently merging everything with your branch so I can open a pr.

Also, @stefanpartheym , if you get the same errors while building the modules, I believe that the only reason the camera works for you is that you already have the modules installed and never uninstalled them (I'm just assuming). Does dkms status complain about anything? Have you ever uninstalled the drivers completely and then reinstalled them? I think that we might overcome this issue by calling dkms with --force. This would either break everything or fix the issue.

Also, I do see the webcam led turn on for a split second when running test.sh, which prints the following:

Setting pipeline to PAUSED ...
[02-05 01:41:05.210] CamHAL[INF] aiqb file name ov01a10.aiqb
[02-05 01:41:05.210] CamHAL[INF] aiqb file name ov01a10.aiqb
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

(gst-launch-1.0:26124): GStreamer-CRITICAL **: 01:41:05.294: Registering meta implementation 'GstCamerasrcMeta' without init function
ERROR: from element /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0: src pad: Internal data flow error.
Additional debug info:
gstcambasesrc.cpp(3143): gst_cam_base_src_loop (): /GstPipeline:pipeline0/Gstcamerasrc:camerasrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.829491013
Setting pipeline to NULL ...
Enter ia_aiq_get_aiqd_data()
Out-aiqd data size: 41480
[02-05 01:41:06.225] CamHAL[WAR] Failed to open file /run/camera/ov01a10-uf_VIDEO.aiqd, error No such file or directory
Freeing pipeline ...

Edit: Here it is.

stefanpartheym commented 1 year ago

I think this issue could be closed now. Camera still not working in all programs probably. However, with the --workaround flag at least fixes it in some other programs, as far as I can tell. Anyone seeing still a need for this issue, please open a new one – thanks :)

alba4k commented 1 year ago

Fully agree. I think that now that the bulk of thee problem is gone (due to the "implicit" format conversion) new issues should be waaay more specific ahah