我购买了联想 ThinkPad X1 Yoga Gen 7,其特点如下:
32 GiB RAM
CPU:第 12 代英特尔酷睿 i7-1260P x 16
Mesa 英特尔显卡 (ADL GT2)
SSD:2 TB
FHD 摄像头系统,配备 4 个麦克风 3840x2400 显示屏,据我了解,这意味着有一个 MiPi 摄像头*
并安装了 Ubuntu 23.04。
*我无法使用 Linux 或 Windows 检测到相机硬件。通过研究,我发现了“MiPi”。
据我测试,除了内置摄像头外,其他一切都运行良好。我还没能测试麦克风。
这似乎是一个众所周知的问题,类似于这个问题
我尝试按照描述的解决方案操作。不幸的是,由于找不到之前安装的 libcamhal,因此构建 icamerasrc.git 失败。我在我的系统上手动构建和安装的经验并不多,所以我可能犯了一些初学者的错误,任何帮助我都非常感谢。
我尝试的具体内容:
首先,我安装了 Ubuntu 22.04。失败后,我尝试了 Ubuntu 20.04.06,因为有些这种类型的 ThinkPad 是随 Ubuntu 20.04 一起出售的,但再次失败。现在我有 Ubuntu 23.04,我仍在尝试让它工作。
我意识到有些需要的软件包默认情况下没有安装,例如 dkms 和 git。另外,我认为使用 sudo 应该可以,但由于我不知道是什么原因导致的,我尝试以 root 身份安装它。然后我遇到了一些问题,这些问题是由包含空格的路径引起的。我来自 macOS,对此感到很惊讶。无论如何,我消除了不必要的空格。
我最后实际做的是这样的:
sudo su
mkdir -p /media/data/shared/Installer/Linux/avp/Lenovo_ThinkPad_X1_Yoga_Gen_7_internal_Cam/
cd /media/data/shared/Installer/Linux/avp/Lenovo_ThinkPad_X1_Yoga_Gen_7_internal_Cam/
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git build-essential dkms cmake libdrm-dev v4l-utils libexpat-dev automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
Hinweis: »libexpat1-dev« wird an Stelle von »libexpat-dev« gewählt.
git clone https://github.com/intel/ipu6-drivers.git
cd ipu6-drivers
git clone https://github.com/intel/ivsc-driver.git
cp -r ivsc-driver/backport-include ivsc-driver/drivers ivsc-driver/include .
rm -rf ivsc-driver
cd ..
git clone https://github.com/intel/ipu6-camera-bins.git
git clone https://github.com/intel/ipu6-camera-hal.git
git clone https://github.com/intel/icamerasrc.git
cd icamerasrc/
git checkout icamerasrc_slim_api
cd ..
cp ipu6-camera-hal/build.sh .
cd ipu6-drivers
sudo dkms add .
sudo dkms autoinstall ipu6-drivers/0.0.0
cd ..
sudo cp -r ipu6-camera-bins/include/* /usr/include/
sudo cp -r ipu6-camera-bins/lib/* /usr/lib/
sudo ./build.sh
Libraries have been installed in:
/media/data/shared/Installer/Linux/avp/Lenovo_ThinkPad_X1_Yoga_Gen_7_internal_Cam/out/install/lib/gstreamer-1.0
############### build_icamerasrc OK #############
sudo cp -r ./out/install/include/* /usr/include
sudo cp -r ./out/install/lib/* /usr/lib
sudo cp -r ./out/install/share/* /usr/share
cd icamerasrc
export CHROME_SLIM_CAMHAL=ON
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig"
sudo ./autogen.sh
Building with libcamhal
checking for libcamhal... no
configure: error: Cannot find libcamhal pkgconfig
configure failed
虽然我刚刚安装了 ipu6-camera-hal,但它无法被识别为 libcamhal。这有什么不同吗?我是不是忘了一个重要的步骤?./out 包含以下内容:
out/install/lib/libhal_adaptor.so
out/install/lib/libgsticamerainterface-1.0.so
out/install/lib/ipu_mtl/libcamhal.so
out/install/lib/gstreamer-1.0/libgsticamerasrc.so
out/install/lib/ipu_tgl/libcamhal.so
out/install/lib/ipu_adl/libcamhal.so
这些不是刚刚通过复制安装的库吗/usr/lib
?
根据要求,这里有一些输出:
$ sudo dmesg|grep ipu6
[ 3.935647] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
[ 3.935884] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 3.935906] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 3.935908] intel-ipu6 0000:00:05.0: mapped as: 0x000000000721f56d
[ 3.935954] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 3.935956] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 3.935957] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 3.952548] intel-ipu6 0000:00:05.0: IPC reset done
[ 3.952552] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 3.953693] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 3.962943] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 3.962966] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 3.962968] intel-ipu6 0000:00:05.0: mapped as: 0x00000000d3a0191d
[ 3.963175] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 3.963177] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 3.963179] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 3.968141] intel-ipu6 0000:00:05.0: IPC reset done
[ 3.968144] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 3.968273] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 3.971715] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 3.971737] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 3.971739] intel-ipu6 0000:00:05.0: mapped as: 0x000000000721f56d
[ 3.971777] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 3.971779] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 3.971780] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 3.974112] intel-ipu6 0000:00:05.0: IPC reset done
[ 3.974115] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 3.974204] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 3.982624] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 3.982640] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 3.982642] intel-ipu6 0000:00:05.0: mapped as: 0x00000000d3a0191d
[ 3.982680] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 3.982682] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 3.982683] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 3.987948] intel-ipu6 0000:00:05.0: IPC reset done
[ 3.987951] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 3.988080] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 3.991085] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 3.991101] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 3.991103] intel-ipu6 0000:00:05.0: mapped as: 0x000000005eca06cc
[ 3.991145] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 3.991146] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 3.991148] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 3.993267] intel-ipu6 0000:00:05.0: IPC reset done
[ 3.993270] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 3.993351] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.000086] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.000108] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.000110] intel-ipu6 0000:00:05.0: mapped as: 0x000000005cc98771
[ 4.000150] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.000152] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.000153] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.005098] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.005100] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.005171] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.016569] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.016584] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.016586] intel-ipu6 0000:00:05.0: mapped as: 0x00000000d3a0191d
[ 4.016618] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.016619] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.016621] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.020530] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.020532] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.020631] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.036195] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.036209] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.036210] intel-ipu6 0000:00:05.0: mapped as: 0x000000005eca06cc
[ 4.036235] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.036236] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.036237] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.040313] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.040316] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.040424] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.052389] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.052424] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.052426] intel-ipu6 0000:00:05.0: mapped as: 0x000000000721f56d
[ 4.052472] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.052475] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.052477] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.054276] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.054279] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.054385] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.079801] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.079830] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.079832] intel-ipu6 0000:00:05.0: mapped as: 0x00000000d3a0191d
[ 4.079898] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.079899] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.079901] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.083581] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.083584] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.083661] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.147389] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.147410] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.147411] intel-ipu6 0000:00:05.0: mapped as: 0x00000000d3a0191d
[ 4.147472] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.147475] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.147476] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.149845] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.149848] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.150028] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.191684] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.191708] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.191710] intel-ipu6 0000:00:05.0: mapped as: 0x0000000002ee22b0
[ 4.191756] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.191758] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.191759] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.193603] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.193605] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.193716] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.262608] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.262621] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.262622] intel-ipu6 0000:00:05.0: mapped as: 0x0000000002ee22b0
[ 4.262722] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.262725] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.262727] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.264803] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.264805] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.264943] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.299846] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.299857] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.299859] intel-ipu6 0000:00:05.0: mapped as: 0x00000000c6ca14e3
[ 4.299888] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.299891] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.299892] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.301706] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.301707] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.301837] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.319503] intel-ipu6 0000:00:05.0: Device 0x465d (rev: 0x2)
[ 4.319523] intel-ipu6 0000:00:05.0: physical base address 0x603c000000
[ 4.319525] intel-ipu6 0000:00:05.0: mapped as: 0x00000000cf4333ff
[ 4.319564] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 4.319565] intel-ipu6 0000:00:05.0: IPU secure touch = 0x0
[ 4.319567] intel-ipu6 0000:00:05.0: IPU camera mask = 0xff
[ 4.321381] intel-ipu6 0000:00:05.0: IPC reset done
[ 4.321382] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6ep_fw.bin
[ 4.321488] intel-ipu6 0000:00:05.0: FW version: 20230102
[ 4.323547] intel-ipu6 0000:00:05.0: Found supported sensor INT3474:01
[ 4.323651] intel-ipu6 0000:00:05.0: Connected 1 cameras
[ 4.324616] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[ 4.333343] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[ 4.401681] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[ 4.401698] intel-ipu6 0000:00:05.0: IPU6-v3 driver version 1.0
[ 4.403190] intel-ipu6-isys intel-ipu6-isys0: bind ov2740 5-0036 nlanes is 2 port is 1
[ 4.411593] intel-ipu6-isys intel-ipu6-isys0: All sensor registration completed.
[ 4.411836] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[ 4.411955] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
[ 7.312145] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16
[ 7.312152] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16
[ 8.460580] intel-ipu6-isys intel-ipu6-isys0: isys port open ready failed -16
[ 8.460618] intel-ipu6-isys intel-ipu6-isys0: Device close failure: -16
[213694.863767] intel-ipu6 0000:00:05.0: IPU in secure mode
[257080.442282] intel-ipu6 0000:00:05.0: IPU in secure mode
$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Device [8086:4621] (rev 02)
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P Integrated Graphics Controller [8086:46a6] (rev 0c)
00:04.0 Signal processing controller [1180]: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant [8086:461d] (rev 02)
00:05.0 Multimedia controller [0480]: Intel Corporation Device [8086:465d] (rev 02)
00:06.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 [8086:464d] (rev 02)
00:07.0 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root P[edit] ort #0 [8086:466e] (rev 02)
00:07.2 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #2 [8086:462f] (rev 02)
00:08.0 System peripheral [0880]: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator [8086:464f] (rev 02)
00:0a.0 Signal processing controller [1180]: Intel Corporation Platform Monitoring Technology [8086:467d] (rev 01)
00:0d.0 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller [8086:461e] (rev 02)
00:0d.2 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 [8086:463e] (rev 02)
00:0d.3 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #1 [8086:466d] (rev 02)
00:12.0 Serial controller [0700]: Intel Corporation Alder Lake-P Integrated Sensor Hub [8086:51fc] (rev 01)
00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01)
00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01)
00:14.3 Network controller [0280]: Intel Corporation Alder Lake-P PCH CNVi WiFi [8086:51f0] (rev 01)
00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01)
00:15.1 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 [8086:51e9] (rev 01)
00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01)
00:19.0 Serial bus controller [0c80]: Intel Corporation Alder Lake-P Serial IO I2C Controller #0 [8086:51c5] (rev 01)
00:1c.0 PCI bridge [0604]: Intel Corporation Device [8086:51b8] (rev 01)
00:1f.0 ISA bridge [0601]: Intel Corporation Alder Lake PCH eSPI Controller [8086:5182] (rev 01)
00:1f.3 Audio device [0403]: Intel Corporation Alder Lake PCH-P High Definition Audio Controller [8086:51c8] (rev 01)
00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01)
04:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO [144d:a80a]
08:00.0 Wireless controller [0d40]: Intel Corporation XMM7560 LTE Advanced Pro Modem [8086:7560] (rev 01)
答案1
安装 Ubuntu 22.04.3。它包含最新的 Linux 内核 6.2.0.34。
安装软件更新程序提供的所有软件更新。
在终端中运行以下命令:
sudo apt update sudo apt upgrade sudo apt full-upgrade sudo apt install linux-modules-ipu6-generic-hwe-22.04 linux-modules-ivsc-generic-hwe-22.04 sudo add-apt-repository ppa:oem-solutions-group/intel-ipu6 sudo apt install libcamhal0 v4l2loopback-dkms v4l2-relayd v4l-utils vlc sudo reboot
现在您可以将 VLC 与相机一起使用作为录音设备。