NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.52k stars 13k forks source link

Tracking Issue: Intel MIPI/IPU6 webcam-support #225743

Open betaboon opened 1 year ago

betaboon commented 1 year ago

Recently a couple of PRs introduced support for Intel MIPI/IPU6 based webcams. (#212799, #225160, #225292)

As the upstream situation for these devices currently is a mess, this does not work on all devices.

This tracking issue should serve two purposes:

reporting success

please provide the following information:

reporting failure

please provide the following information:

Known-good devices

gvolpe commented 2 months ago

Reporting failure with kernel 6.8.7

I tried https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-1916499267 and it built after a long while only when hardware.ipu6.enable = false;, but webcam still isn't detected.

If I enable ipu6, it fails to build.

Build log ```console ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> LD [M] /build/source/drivers/media/pci/intel/ipu6/intel-ipu6.o ipu6-drivers-unstable> make[5]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys.o] Error 1 ipu6-drivers-unstable> make[5]: *** Waiting for unfinished jobs.... ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function 'ipu_psys_probe': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-psys.c:1650:9: error: implicit declaration of function 'strlcpy'; did you mean 'strscpy'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 1650 | strlcpy(psys->caps.dev_model, IPU_MEDIA_DEV_MODEL_NAME, ipu6-drivers-unstable> | ^~~~~~~ ipu6-drivers-unstable> | strscpy ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-video.c: In function 'ipu_isys_vidioc_querycap': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-video.c:362:9: error: implicit declaration of function 'strlcpy'; did you mean 'strscpy'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 362 | strlcpy(cap->driver, IPU_ISYS_NAME, sizeof(cap->driver)); ipu6-drivers-unstable> | ^~~~~~~ ipu6-drivers-unstable> | strscpy ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c: In function '__ipu_isys_get_ffmt': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:166:24: error: implicit declaration of function 'v4l2_subdev_get_try_format'; did you mean 'v4l2_subdev_get_fmt'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] copying 0 paths... ipu6-drivers-unstable> 166 | return v4l2_subdev_get_try_format(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> | v4l2_subdev_get_fmt ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:166:24: warning: returning 'int' from a function with return type 'struct v4l2_mbus_framefmt *' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 166 | return v4l2_subdev_get_try_format(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c: In function '__ipu_isys_get_selection': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:204:32: error: implicit declaration of function 'v4l2_subdev_get_try_crop'; did you mean 'v4l2_subdev_state_get_crop'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 204 | return v4l2_subdev_get_try_crop(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> | v4l2_subdev_state_get_crop ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:204:32: warning: returning 'int' from a function with return type 'struct v4l2_rect *' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 204 | return v4l2_subdev_get_try_crop(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copying path '/nix/store/v8wnkb2j6105fkjg3yphh8wz5ngkwqz7-v4l2loopback-0.12.7-unstable-2024-02-12-6.8.7' from 'ssh-ng://nix-ssh@garnix3'... copying 1 paths... copying path '/nix/store/vdih507k21fq9lx51rwr0l2zzrrb6wz8-source' from 'ssh-ng://nix-ssh@garnix3'... ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:206:32: error: implicit declaration of function 'v4l2_subdev_get_try_compose'; did you mean 'v4l2_subdev_state_get_compose'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 206 | return v4l2_subdev_get_try_compose(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> | v4l2_subdev_state_get_compose ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:206:32: warning: returning 'int' from a function with return type 'struct v4l2_rect *' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 206 | return v4l2_subdev_get_try_compose(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c: In function 'ipu_isys_subdev_open': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:760:25: warning: initialization of 'struct v4l2_mbus_framefmt *' from 'int' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 760 | v4l2_subdev_get_try_format(sd, fh->state, i); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:762:25: warning: initialization of 'struct v4l2_rect *' from 'int' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 762 | v4l2_subdev_get_try_crop(sd, fh->state, i); building '/nix/store/hvbdi05b7wvjp4v53z50anjpp2sl11yc-unit-systemd-udevd.service.drv'... copying 1 paths... copying path '/nix/store/7zszw553s9zfk7slvn1r4yj16rskqz7x-unit-systemd-udevd.service' from 'ssh-ng://nix-ssh@garnix2'... ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:764:25: warning: initialization of 'struct v4l2_rect *' from 'int' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 764 | v4l2_subdev_get_try_compose(sd, fh->state, i); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> make[5]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-psys.o] Error 1 ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> make[5]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.o] Error 1 ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> make[5]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-video.o] Error 1 ipu6-drivers-unstable> make[4]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/pci/intel/ipu6] Error 2 ipu6-drivers-unstable> make[3]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/pci/intel] Error 2 ipu6-drivers-unstable> make[2]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/Makefile:1921: /build/source] Error 2 ipu6-drivers-unstable> make[1]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/Makefile:240: __sub-make] Error 2 ipu6-drivers-unstable> make[1]: Leaving directory '/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/build' ipu6-drivers-unstable> make: *** [Makefile:78: all] Error 2 error: build of '/nix/store/2bxy0p318w3v156rncpxaryq9wgacq53-ipu6-drivers-unstable-2023-11-24.drv' on 'ssh-ng://nix-ssh@garnix3' failed: builder for '/nix/store/2bxy0p318w3v156rncpxaryq9wgacq53-ipu6-drivers-unstable-2023-11-24.drv' failed with exit code 2; last 10 log lines: > cc1: some warnings being treated as errors > make[5]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.o] Error 1 > cc1: some warnings being treated as errors > make[5]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-video.o] Error 1 > make[4]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/pci/intel/ipu6] Error 2 > make[3]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/pci/intel] Error 2 > make[2]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/Makefile:1921: /build/source] Error 2 > make[1]: *** [/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/source/Makefile:240: __sub-make] Error 2 > make[1]: Leaving directory '/nix/store/krb5nm240s7d99ggs3y9s3lvxi5v3rl9-linux-6.8.7-dev/lib/modules/6.8.7/build' > make: *** [Makefile:78: all] Error 2 For full logs, run 'nix log /nix/store/2bxy0p318w3v156rncpxaryq9wgacq53-ipu6-drivers-unstable-2023-11-24.drv'. running post-build-hook '/nix/store/9fx0s4mij1hyyq9mj7dp79ksr40jr5vg-enqueue-package/bin/enqueue-package'... error: builder for '/nix/store/2bxy0p318w3v156rncpxaryq9wgacq53-ipu6-drivers-unstable-2023-11-24.drv' failed with exit code 1 error: 1 dependencies of derivation '/nix/store/b2g8s13iskvvcaq85rbkhl16lm2j2hf7-linux-6.8.7-modules.drv' failed to build error: 1 dependencies of derivation '/nix/store/2j1qxkd74vh1al2yvb4imr6z9kz98zgn-nixos-system-thinkpad-x1-24.05pre-git.drv' failed to build ```

I also tried https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-1984955853 without success, fails to build too.

Build log ```console ipu6-drivers-unstable> CC [M] /build/source/drivers/media/pci/intel/ipu6/ipu6ep-fw-resources.o ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> CC [M] /build/source/drivers/media/pci/intel/ipu6/../ipu-fw-psys.o ipu6-drivers-unstable> make[4]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/i2c/ov2740.o] Error 1 ipu6-drivers-unstable> make[3]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/i2c] Error 2 ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../cio2-bridge.c:471:5: warning: no previous prototype for 'cio2_bridge_init' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmissing-prototypes-Wmissing-prototypes8;;] ipu6-drivers-unstable> 471 | int cio2_bridge_init(struct pci_dev *cio2) ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~ ipu6-drivers-unstable> CC [M] /build/source/drivers/media/pci/intel/ipu6/../ipu-psys-compat32.o ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys.c: In function 'isys_register_devices': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys.c:979:9: error: implicit declaration of function 'strlcpy'; did you mean 'strscpy'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 979 | strlcpy(isys->media_dev.model, ipu6-drivers-unstable> | ^~~~~~~ ipu6-drivers-unstable> | strscpy source> 100 5750k 0 5750k 0 0 6202k 0 --:--:-- --:--:-- --:--:-- 17.0M source> unpacking source archive /build/10c214fea5560060d387fbd2fb8a1af329cb6232.tar.gz copying path '/nix/store/p5misxx43bxx7qa312n33lbbjzf2wm6p-ipu6-camera-bins-unstable-2023-10-26' from 'https://cache.garnix.io'... copying 1 paths... copying path '/nix/store/x6c5xjyzzjshrgl4c3dzfmz8indjm2l4-source' from 'ssh-ng://nix-ssh@garnix4'... ipu6-drivers-unstable> LD [M] /build/source/drivers/media/pci/intel/ipu6/intel-ipu6.o ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function 'ipu_psys_probe': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-psys.c:1650:9: error: implicit declaration of function 'strlcpy'; did you mean 'strscpy'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 1650 | strlcpy(psys->caps.dev_model, IPU_MEDIA_DEV_MODEL_NAME, ipu6-drivers-unstable> | ^~~~~~~ ipu6-drivers-unstable> | strscpy ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> make[5]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys.o] Error 1 ipu6-drivers-unstable> make[5]: *** Waiting for unfinished jobs.... running post-build-hook '/nix/store/9fx0s4mij1hyyq9mj7dp79ksr40jr5vg-enqueue-package/bin/enqueue-package'... building '/nix/store/xiw7gblw5n8r2zlcmk0nyzj29462d9g0-ivsc-firmware-unstable-2023-08-11.drv' on 'ssh-ng://nix-ssh@garnix4'... ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c: In function '__ipu_isys_get_ffmt': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:166:24: error: implicit declaration of function 'v4l2_subdev_get_try_format'; did you mean 'v4l2_subdev_get_fmt'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 166 | return v4l2_subdev_get_try_format(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> | v4l2_subdev_get_fmt ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:166:24: warning: returning 'int' from a function with return type 'struct v4l2_mbus_framefmt *' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 166 | return v4l2_subdev_get_try_format(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-video.c: In function 'ipu_isys_vidioc_querycap': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-video.c:362:9: error: implicit declaration of function 'strlcpy'; did you mean 'strscpy'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 362 | strlcpy(cap->driver, IPU_ISYS_NAME, sizeof(cap->driver)); ipu6-drivers-unstable> | ^~~~~~~ ipu6-drivers-unstable> | strscpy ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c: In function '__ipu_isys_get_selection': copying 0 paths... building '/nix/store/kxl3crqwy1b4cym04as5naza7fk403m4-dbus-1.drv'... copying 0 paths... copying 0 paths... ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:204:32: error: implicit declaration of function 'v4l2_subdev_get_try_crop'; did you mean 'v4l2_subdev_state_get_crop'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 204 | return v4l2_subdev_get_try_crop(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> | v4l2_subdev_state_get_crop ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:204:32: warning: returning 'int' from a function with return type 'struct v4l2_rect *' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 204 | return v4l2_subdev_get_try_crop(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:206:32: error: implicit declaration of function 'v4l2_subdev_get_try_compose'; did you mean 'v4l2_subdev_state_get_compose'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration8;;] ipu6-drivers-unstable> 206 | return v4l2_subdev_get_try_compose(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> | v4l2_subdev_state_get_compose ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:206:32: warning: returning 'int' from a function with return type 'struct v4l2_rect *' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 206 | return v4l2_subdev_get_try_compose(sd, state, pad); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c: In function 'ipu_isys_subdev_open': ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:760:25: warning: initialization of 'struct v4l2_mbus_framefmt *' from 'int' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 760 | v4l2_subdev_get_try_format(sd, fh->state, i); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:762:25: warning: initialization of 'struct v4l2_rect *' from 'int' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 762 | v4l2_subdev_get_try_crop(sd, fh->state, i); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.c:764:25: warning: initialization of 'struct v4l2_rect *' from 'int' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;] ipu6-drivers-unstable> 764 | v4l2_subdev_get_try_compose(sd, fh->state, i); ipu6-drivers-unstable> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> make[5]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-psys.o] Error 1 ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> make[5]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.o] Error 1 ipu6-drivers-unstable> cc1: some warnings being treated as errors ipu6-drivers-unstable> make[5]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-video.o] Error 1 ipu6-drivers-unstable> make[4]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/pci/intel/ipu6] Error 2 ipu6-drivers-unstable> make[3]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/pci/intel] Error 2 ipu6-drivers-unstable> make[2]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/Makefile:1921: /build/source] Error 2 ipu6-drivers-unstable> make[1]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/Makefile:240: __sub-make] Error 2 ipu6-drivers-unstable> make[1]: Leaving directory '/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/build' ipu6-drivers-unstable> make: *** [Makefile:78: all] Error 2 error: build of '/nix/store/187wqmflljpbqi263mr866cprkln8s25-ipu6-drivers-unstable-2023-11-24.drv' on 'ssh-ng://nix-ssh@garnix4' failed: builder for '/nix/store/187wqmflljpbqi263mr866cprkln8s25-ipu6-drivers-unstable-2023-11-24.drv' failed with exit code 2; last 10 log lines: > cc1: some warnings being treated as errors > make[5]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-subdev.o] Error 1 > cc1: some warnings being treated as errors > make[5]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:243: /build/source/drivers/media/pci/intel/ipu6/../ipu-isys-video.o] Error 1 > make[4]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/pci/intel/ipu6] Error 2 > make[3]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/scripts/Makefile.build:481: /build/source/drivers/media/pci/intel] Error 2 > make[2]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/Makefile:1921: /build/source] Error 2 > make[1]: *** [/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/source/Makefile:240: __sub-make] Error 2 > make[1]: Leaving directory '/nix/store/digcs5lpdv2p7wg62ivmixya50zh9pc9-linux-6.8.7-dev/lib/modules/6.8.7/build' > make: *** [Makefile:78: all] Error 2 For full logs, run 'nix log /nix/store/187wqmflljpbqi263mr866cprkln8s25-ipu6-drivers-unstable-2023-11-24.drv'. error: builder for '/nix/store/187wqmflljpbqi263mr866cprkln8s25-ipu6-drivers-unstable-2023-11-24.drv' failed with exit code 1 error: 1 dependencies of derivation '/nix/store/hx94dy8c5ibshc2a4csxrw6c2ir4634v-linux-6.8.7-modules.drv' failed to build error: 1 dependencies of derivation '/nix/store/hb4fn1q8xac6836if536x45vdin5nd9v-nixos-system-thinkpad-x1-24.05pre-git.drv' failed to build ```

EDIT: it doesn't build with Kernel 6.8.8 either when enabling hardware.ipu6.

Reporting partial success with Kernel 6.6.29

I got it building with this kernel version while enabling hardware.ipu6, and now Firefox detects the camera!

Screenshot ![2024-05-03T15:23:38,936504625+02:00](https://github.com/NixOS/nixpkgs/assets/443978/62c94753-19d3-4d61-a225-eac1e69c3349)

However, it doesn't work. I noticed some initialization issues with ipu6, here's what I found in the logs:

```console [ 4.029442] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002) [ 4.029915] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.029942] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.029945] intel-ipu6 0000:00:05.0: mapped as: 0x0000000056b1da4f [ 4.030004] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.030006] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.030007] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.032872] intel-ipu6 0000:00:05.0: IPC reset done [ 4.032875] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.053945] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.056904] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.056922] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.056924] intel-ipu6 0000:00:05.0: mapped as: 0x0000000052e81dfa [ 4.056978] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.056982] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.056984] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.059320] intel-ipu6 0000:00:05.0: IPC reset done [ 4.059324] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.086899] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.105448] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.105465] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.105466] intel-ipu6 0000:00:05.0: mapped as: 0x0000000056b1da4f [ 4.105530] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.105531] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.105531] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.107369] intel-ipu6 0000:00:05.0: IPC reset done [ 4.107372] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.121801] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.153679] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.153697] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.153699] intel-ipu6 0000:00:05.0: mapped as: 0x0000000056b1da4f [ 4.153779] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.153781] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.153783] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.155868] intel-ipu6 0000:00:05.0: IPC reset done [ 4.155871] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.175397] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.205734] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.205758] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.205759] intel-ipu6 0000:00:05.0: mapped as: 0x0000000056b1da4f [ 4.205805] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.205806] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.205807] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.208848] intel-ipu6 0000:00:05.0: IPC reset done [ 4.208850] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.226623] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.229989] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.230006] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.230008] intel-ipu6 0000:00:05.0: mapped as: 0x0000000052e81dfa [ 4.230086] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.230087] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.230088] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.232413] intel-ipu6 0000:00:05.0: IPC reset done [ 4.232415] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.253588] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.275052] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.275101] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.275101] intel-ipu6 0000:00:05.0: mapped as: 0x0000000056b1da4f [ 4.275139] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.275142] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.275144] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.276982] intel-ipu6 0000:00:05.0: IPC reset done [ 4.276984] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.290889] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.295167] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.295195] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.295197] intel-ipu6 0000:00:05.0: mapped as: 0x0000000052e81dfa [ 4.295242] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.295244] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.295245] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.296961] intel-ipu6 0000:00:05.0: IPC reset done [ 4.296964] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.313000] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.324423] intel-ipu6 0000:00:05.0: Device 0xa75d (rev: 0x0) [ 4.324456] intel-ipu6 0000:00:05.0: physical base address 0x603c000000 [ 4.324459] intel-ipu6 0000:00:05.0: mapped as: 0x0000000056b1da4f [ 4.324523] intel-ipu6 0000:00:05.0: IPU in secure mode [ 4.324528] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0 [ 4.324531] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff [ 4.326631] intel-ipu6 0000:00:05.0: IPC reset done [ 4.326633] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin [ 4.351242] intel-ipu6 0000:00:05.0: FW version: 20230102 [ 4.353261] intel-ipu6 0000:00:05.0: Found supported sensor INT3474:01 [ 4.353389] intel-ipu6 0000:00:05.0: Connected 1 cameras [ 4.354212] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE [ 4.362581] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE [ 4.432072] intel-ipu6 0000:00:05.0: CSE authenticate_run done [ 4.432106] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0 [ 4.434506] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8 [ 4.434609] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0 [ 4.573991] intel-ipu6-isys intel-ipu6-isys0: bind ov2740 2-0036 nlanes is 2 port is 1 [ 4.574060] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed. [ 5.566712] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 5.566722] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 [ 6.649142] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 6.650279] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 [ 7.702014] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 7.702135] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 [ 8.726042] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 8.726169] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 [ 9.748076] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 9.748201] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 [ 10.771004] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 10.771166] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 [ 11.793544] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 11.793650] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 [ 12.817094] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 12.817217] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 [ 13.840887] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16 [ 13.841004] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16 ```

The good news is that it works on Slack! I had a successful test call where the camera worked without issues. Also a good test for my bluetooth headphones, though the audio quality isn't as great as on my other machine, need to work on this.

nixos-discourse commented 2 months ago

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

https://discourse.nixos.org/t/lenovo-x13s-experience-and-support/44589/15

christoph-blessing commented 1 month ago

Reporting success with https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-1984955853

keeakita commented 1 month ago

(Also) Reporting success with #225743 (comment)

Works fine in-browser, but not in Cheese (as others have reported)

wasserpanther commented 1 month ago

reporting failure

Notes: Webcam shows up as "Intel MIPI Camera" but only a black image is shown (tested in Teams, Jitsi and Cheese)

guibou commented 1 month ago

Reporting failure with https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-1984955853

Note that I dowrgraded from nixos-unstable to 23.11 following comment https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-2119466759

I've tried:

Everytime I do have a camera listed in browser, but it is always black with 0 fps. When using @flokli solution, when opening qcam, the verbosity options lists me the camera in terminal, but the camera selection dropdown is empty.

With my latest attempt (e.g. https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-1984955853 using nixos 23.11)

lsmod | grep -Ei "int3472|ipu"
intel_ipu6_isys       135168  0
videobuf2_dma_contig    20480  1 intel_ipu6_isys
videobuf2_v4l2         36864  1 intel_ipu6_isys
videobuf2_common       65536  4 videobuf2_dma_contig,videobuf2_v4l2,intel_ipu6_isys,videobuf2_memops
intel_ipu6_psys        98304  0
intel_ipu6            106496  2 intel_ipu6_isys,intel_ipu6_psys
intel_skl_int3472_tps68470    20480  0
v4l2_fwnode            32768  2 ov01a10,intel_ipu6_isys
intel_skl_int3472_discrete    16384  0
v4l2_async             28672  3 v4l2_fwnode,ov01a10,intel_ipu6_isys
videodev              282624  7 v4l2_async,videobuf2_v4l2,ov01a10,v4l2loopback,intel_ipu6_isys,videobuf2_common
mc                     73728  6 v4l2_async,videodev,videobuf2_v4l2,ov01a10,intel_ipu6_isys,videobuf2_common
firmware_class         49152  17 btrtl,snd_hda_intel,intel_ipu6,xhci_pci_renesas,btmtk,snd_sof,drm_display_helper,mei_vsc,intel_ipu6_isys,btintel,btbcm,iwlwifi,btusb,i915,intel_ipu6_psys,cfg80211,drm
dmesg | grep -Ei "int3472|ipu"
[    0.006824] ACPI: SSDT 0x000000005D75F000 000150 (v02 INTEL  IpuSsdt  00001000 INTL 20200717)
[    9.774670] int3472-discrete INT3472:01: INT3472 seems to have no dependents.
[    9.783850] int3472-discrete INT3472:06: GPIO type 0x02 unknown; the sensor may not work
[    9.857166] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
[    9.858573] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x6)
[    9.858613] intel-ipu6 0000:00:05.0: physical base address 0x6076000000
[    9.858616] intel-ipu6 0000:00:05.0: mapped as: 0x0000000053a580c3
[    9.859840] intel-ipu6 0000:00:05.0: Unable to set secure mode
[    9.859846] intel-ipu6 0000:00:05.0: IPU in non-secure mode
[    9.859849] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[    9.859854] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[    9.861770] intel-ipu6 0000:00:05.0: Skip ipc reset for non-secure mode
[    9.861776] intel-ipu6 0000:00:05.0: IPC reset done
[    9.861779] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[    9.895194] intel-ipu6 0000:00:05.0: FW version: 20230102
[    9.897942] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[   10.079820] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   10.080184] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   25.186188] ipu own camera failed
grep -A4 '(CAM' dsdt.dsl 
        Device (CAM0)
        {
            Name (_HID, "INT3471")  // _HID: Hardware ID
            Name (_DDN, "IMX135-CRDG2")  // _DDN: DOS Device Name
            Name (_UID, "0")  // _UID: Unique ID
--
        Device (CAM1)
        {
            Name (_HID, "INT3474")  // _HID: Hardware ID
            Name (_DDN, "OV2740-CRDG2")  // _DDN: DOS Device Name
            Name (_UID, "0")  // _UID: Unique ID
guibou commented 1 month ago

For the record, here i a screenshot of qcam with no camera listed:

image

And here is the debug output:

$ LIBCAMERA_LOG_LEVELS=*:DEBUG qcam
[9:40:42.025491367] [125264]  INFO IPAManager ipa_manager.cpp:143 libcamera is not installed. Adding '/nix/store/src/ipa' to the IPA search path
[9:40:42.025572011] [125264] DEBUG IPAModule ipa_module.cpp:334 ipa_ipu3.so: IPA module /nix/store/x062jabqpl2g7fbyp1z8gnmnizr90y1l-libcamera-0.2.0/lib/libcamera/ipa_ipu3.so is signed
[9:40:42.025586641] [125264] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/nix/store/x062jabqpl2g7fbyp1z8gnmnizr90y1l-libcamera-0.2.0/lib/libcamera/ipa_ipu3.so'
[9:40:42.025605804] [125264]  INFO Camera camera_manager.cpp:284 libcamera v0.2.0
[9:40:42.025814602] [125269] DEBUG Camera camera_manager.cpp:69 Starting camera manager
[9:40:42.033581371] [125269] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "intel-ipu6-isys" created from /dev/media0
[9:40:42.033592688] [125269] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 24 missing dependencies
[9:40:42.035072256] [125269] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found
[9:40:42.035078066] [125269] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: intel-ipu6-isys
[9:40:42.035225423] [125269] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerIPU3'
[9:40:42.035237116] [125269] DEBUG Camera camera_manager.cpp:113 Found registered pipeline handler 'PipelineHandlerUVC'
wasserpanther commented 1 month ago

reporting success

keeakita commented 1 month ago

@guibou I find it very interesting that we have the same machine and same kernel version but different results. I’m going to collect the outputs of the commands you ran and see if I can spot any differences

guibou commented 1 month ago

@keeakita My branch with the specific setup which tries to mimic your configuration is here: https://github.com/guibou/nixos_config/compare/main...camera_tobias_bora

It contains the content of the file from https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-1984955853 as well as specific changes in order to get the same kernel and same nixos version as you have.

The result is a "black" camera in firefox or chrome.

edit: I have this feeling that I'm super close to completion, but that I'm missing something obvious. Setting in bios looks like correct (e.g. camera is enabled), I don't have secure boot. I'm using X (are you using X or wayland?). I'm also using pipewire.

tobiasBora commented 1 month ago

No idea if it's related but you should remove the udev rules from my comment as a first step as it hides some webcams… maybe yours was removed since the name of the camera to keep may be slightly different? What do you see in obs?

tobiasBora commented 1 month ago

And I think to remember that I also had black camera in firefox/chrome and that I needed to change the camera (a dummy black camera is created if my memory is correct), and my udev rules were trying to automatically select the good one.

guibou commented 1 month ago

@tobiasBora, thank you. I removed the udev rules and now I have something like 10 different camera available (named dummy, or ipu6 something, in obs), but none of them are working (error, or black with 0 fps)

nixos-discourse commented 3 weeks ago

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

https://discourse.nixos.org/t/nixos-of-intel-core-ultra/46970/14

christoph-blessing commented 3 weeks ago

Reporting failure

Webcam does not show up in Zoom or in Firefox.

I tried the following snippet:

hardware.ipu6 = {
  enable = true;
  platform = "ipu6epmtl";
};

But then the build of ipu6-drivers-unstable-2023-11-24.drv fails. Here is the log: build-error.log

guibou commented 3 weeks ago

@christoph-blessing you may have a kernelPackages = pkgs.linuxPackages_latest; in your configuration. Remove it to revert back to a 6.6 kernel and the build should be ok. (But does not guarantee that the camera will work).

christoph-blessing commented 2 weeks ago

@guibou thanks for the tip. The build indeed works on 6.6 and the camera gets detected but it only outputs a black image. I am using the 6.9 kernel because of some unrelated issues with the device on 6.6.

keeakita commented 2 weeks ago

@guibou

(are you using X or wayland?)

I'm on Wayland, specifically sway.

Re your extra outputs, I don't actaully see much different. I get exactly the same lsmod output, and the only dmesg diff is that doesn't report failure:

[   26.652612] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[   26.652765] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[   36.177794] intel-ipu6-isys intel-ipu6-isys0: bind ov01a10 18-0036 nlanes is 1 port is 2
[   36.177952] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.

I also get slightly different results from dsdt:

        Device (CAM0)
        {
            Name (_HID, "INT3471")  // _HID: Hardware ID
            Name (_DDN, "IMX135-CRDG2")  // _DDN: DOS Device Name
            Name (_UID, "0")  // _UID: Unique ID
--
        Device (CAM1)
        {
            Name (_HID, "INT3474")  // _HID: Hardware ID
            Name (_DDN, "OV2740-CRDG2")  // _DDN: DOS Device Name
            Name (_UID, "0")  // _UID: Unique ID

The only other difference I see if our specific minor versions of NixOS. I'm going to try rebuilding my system off a more recent 23.11 and see if things still work.

guibou commented 2 weeks ago

@keeakita

I'm sorry if I'm missing something obvious, but looks like your dsdt (if what you did paste in the previous comment, https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-2179647935) and mine (in https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-2143298896) are the same.

I have two co workers with the same hardware and different result. Both have the same dsdt as me, one is using wayland (and camera is working) and the other is using X (and camera is not working). The first do have the All sensor registration completed and the other have the ipu own camera failed messages in dmesg.

I just tried with wayland (sway) and same in dmesg.

The "huge" delay between the psys probe minor: 0 message and the success or failure (10s in your case, 15 in my failure, 9s for my collegue with success, still waiting for the timing for my collegue with failure).

I'm wondering. Either we have minor hardware differences (e.g. same XPS, but internally, intel may have done "minor" revision of the chip), or there is a service enabled/disabled or a module in our system which breaks for any reason the camera initialisation (the LONG 10+s.).

guibou commented 2 weeks ago

I'm a bit dispapointed.

My next try will be to install window and confirm that the camera is working, maybe it is just dead since the beginning.

tobiasBora commented 2 weeks ago

I don't know if it can help, but if it works on one laptop but not the other, it might help to upgrade the firmwares and the uefi bios?

guibou commented 2 weeks ago

@tobiasBora everything was updated (as far as I know, we used fwupdmgr

tobiasBora commented 6 days ago

@guibou Including the bios? You can't upgrade it via fwupdmgr, on my Dell I needed to go to the bios itself, go to a tab like "Update" (can't remember the exact name), and follow the instructions (it will try to connect to the internet to download the latest version).

adminy commented 4 days ago
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:20.981] CamHAL[ERR] Failed to find NVM directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:20.981] CamHAL[ERR] Failed to find NVM directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:21.91] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:21.92] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:21.93] CamHAL[ERR] invalid media format, default value used.
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:21.93] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:21.93] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:21.93] CamHAL[ERR] invalid media format, default value used.
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:21.94] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:21.283] CamHAL[ERR] sensor output sub device is not set
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: Enter ia_aiq_get_aiqd_data()
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: Out-aiqd data size: 41480
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:43.576] CamHAL[WAR] Failed to open file /run/camera/hi556-uf_VIDEO.aiqd, error No such file or directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.631] CamHAL[ERR] Failed to find NVM directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.631] CamHAL[ERR] Failed to find NVM directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.718] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.718] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.719] CamHAL[ERR] invalid media format, default value used.
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.719] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.719] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.719] CamHAL[ERR] invalid media format, default value used.
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.719] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:50.873] CamHAL[ERR] sensor output sub device is not set
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: Enter ia_aiq_get_aiqd_data()
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: Out-aiqd data size: 41480
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.750] CamHAL[WAR] Failed to open file /run/camera/hi556-uf_VIDEO.aiqd, error No such file or directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.827] CamHAL[ERR] Failed to find NVM directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.827] CamHAL[ERR] Failed to find NVM directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.934] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.934] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.934] CamHAL[ERR] invalid media format, default value used.
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.934] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.935] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.935] CamHAL[ERR] invalid media format, default value used.
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:51.936] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.216] CamHAL[ERR] sensor output sub device is not set
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: Enter ia_aiq_get_aiqd_data()
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: Out-aiqd data size: 41480
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.787] CamHAL[WAR] Failed to open file /run/camera/hi556-uf_VIDEO.aiqd, error No such file or directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.856] CamHAL[ERR] Failed to find NVM directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.857] CamHAL[ERR] Failed to find NVM directory
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.940] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.940] CamHAL[INF] aiqb file name HI556_1BG502T3_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.940] CamHAL[ERR] invalid media format, default value used.
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.940] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.940] CamHAL[INF] aiqb file name HI556_CJFLE25_ADL.aiqb
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.940] CamHAL[ERR] invalid media format, default value used.
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:52.941] CamHAL[ERR] GetControl: Device node /dev/v4l-subdev16 IOCTL VIDIOC_G_EXT_CTRLS error: Invalid argument
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:34:53.173] CamHAL[ERR] sensor output sub device is not set
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: Enter ia_aiq_get_aiqd_data()
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: Out-aiqd data size: 41480
Jul 05 09:35:07 box v4l2-relayd-ipu6-start[46582]: [07-05 09:35:07.534] CamHAL[WAR] Failed to open file /run/camera/hi556-uf_VIDEO.aiqd, error No such file or directory
Jul 05 09:35:07 box systemd-timesyncd[1159]: Network configuration changed, trying to establish connection.
Jul 05 09:35:07 box v4l2-relayd-ipu6-post-stop[47000]: /dev/video28: Device or resource busy
Jul 05 09:35:07 box systemd[1]: v4l2-relayd-ipu6.service: Deactivated successfully.
Jul 05 09:35:07 box systemd[1]: v4l2-relayd-ipu6.service: Consumed 12.533s CPU time, no IP traffic.
Jul 05 09:35:07 box systemd-timesyncd[1159]: Contacted time server 131.111.8.61:123 (3.nixos.pool.ntp.org).
Jul 05 09:35:07 box systemd[1]: v4l2-relayd-ipu6.service: Scheduled restart job, restart counter is at 23.
Jul 05 09:35:07 box systemd[1]: Starting Streaming relay for v4l2loopback using GStreamer...
Jul 05 09:35:07 box systemd-timesyncd[1159]: Network configuration changed, trying to establish connection.
Jul 05 09:35:07 box systemd[1]: Started Streaming relay for v4l2loopback using GStreamer.
Jul 05 09:35:07 box systemd-timesyncd[1159]: Network configuration changed, trying to establish connection.
Jul 05 09:35:07 box systemd-timesyncd[1159]: Contacted time server 131.111.8.61:123 (3.nixos.pool.ntp.org).
Jul 05 09:35:08 box v4l2-relayd[47011]: Registering meta implementation 'GstCamerasrcMeta' without init function
Jul 05 09:35:08 box kernel: intel-ipu6-isys intel-ipu6-isys0: stream on hi556 12-0020
Jul 05 09:35:09 box kernel: intel-ipu6-isys intel-ipu6-isys0: stream off hi556 12-0020