-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest patches failing on X1 Carbon Gen 11 using latest Ubuntu 24.04 oem kernel package #299
Comments
Thanks, I will go through those steps. |
Hi @The9Cat . I built kernel/modules packages and installed.
How can this be tested ? How to install rest of the stack on ubuntu ? |
One thing is strange, linux-modules-ipu6-6.11.0-1008-oem package seems to use isys module from intel/ipu6-drivers. So patching in kernel ipu6 isys by patch4.txt should have no impact. |
Interesting. You definitely got further than I did! found no v4l devices. Did you need to add something not described in my list of steps? Otherwise, I can't understand why it would work for you and not me...something different in the build environment, I guess, but what? To test, I would do the following:
That should give you everything you need to try capturing the camera stream with |
And, I must have misunderstood the situation with isys. I had assumed that the linux-modules packages was using the kernel drivers, since the driver did act differently with and without the patch! |
I had to skip step 7:
Because I got some build error when changed version number in the change log file. Apparently did not make this correctly, but .. I think it's the issue could be that: with the changed kernel version some external modules are not loaded i.e. v4l2loopback . |
This overwrite custom build oem-1008 installed kernel and I got ov2740 sensor error again when reboot second time. |
One more thing. During the process of above testing, something changed permission or owners of /dev/video* devices like this: |
Curious. In Step 7, I changed the version number not the name in the
to
so I don't think that should confuse the dependencies but your thought in #299 (comment) is worth checking. My understanding is that the debian scripts use that for tagging the modules with the version name. The kernel name should remain unchanged (the stuff before the final '.' in the changelog entry). I could try reverting to the the original My build was very clearly a fail with respect to the ipu6 camera. I was a bit surprised and confused. Perhaps I didn't investigate hard enough. The permissions of the |
I think you have right: changing to 6.11.0-1007.1000 should not change the kernel version , which should stay 6.11.0-1007-oem. Anything obvious from logs what when wrong ? I recommend install ppe packages and then just replace with custom kernel and modules , like described in #299 (comment) |
Is there difference between modules loaded on good-unpached and bad-patched case ? |
Do you mean behavior of the camera, or byte difference? The kernel modules do get compiled with the patches, I believe. The 1007-oem packages in the Ubuntu repo do work, albeit with occasional need for module reloads and gstreamer time outs. The patched ones did not work. There was nothing obvious in the system log. The |
SuccessLooks like a reliable ipu6 webcam so far. The detailsI followed the same steps as in #299 (comment) with two changes:
After building and installing the newly minted packages, the ipu6 works as expected! Tests
Comments
I'd like to thank @sgruszka for going through my Ubuntu recipe and making suggestions! |
Hopefully, these patches will get into mainline soon. Meanwhile, I'll be checking ipu6 performance. |
Also, a note to any Ubuntu user: I recommend putting these packages on hold using [Update] All attempts to modify the |
Another success story on Debian/sid here. With the patches included in this issue, I got a working video stream from a kernel built on Debian with these commands:
Where Installation is: I'm not using v4l2-relayd, and GNOME Snapshot and the GUM pages are working. |
@trygvis This is very interesting. I didn't realize that there was another way here...if you are not using the /dev/video* API along with |
@sgruszka Saw your patches in 6.13 (RC). Have requested that the Ubuntu oem kernel maintainer pull in those patches. We'll see... |
I tried compiling the kernel as shown here and it still doesn't work. I got the following error:
I tried installing v4l2loopback-dkms and it stopped showing that error but it still doesn't work. I already deleted it. Thanks to everyone who has contributed to this. It's frustrating that these days there is hardware with these problems with GNU/Linux. |
@rmasad Did you install the modules from Step 9 above? Specifically, the Can you remind me which hardware you have? Is it a Lenovo? These patches seem to have fixed the issues for me on my Lenovo X1C11 although there may be other issues on other hardware. Finally, I'm really sorry you are having trouble with this! I share your frustration and have been there, too. If you have suggestions on what I can do to improve the instructions above, LMK. |
The patches should be added next week to -stable linux releases as well i.e. 6.12.2, 6.11.11 ... , usually distributions update to latest stable minor release. |
I recompiled with the instructions (but with linux-image-unsigned-6.11.0-1008-oem and without changing the version number, step 7) and I no longer have the error with v4l2loopback but the camera still doesn't work (it doesn't even turn on the light). I have a Lenovo X1 Gen12 |
@rmasad This is very strange. I've been finding this to be very robust since the patches. Were there any relevant error messages in
|
The camera has not worked for me at all (even though I rebooted several times). Here are the results of the commands:
|
Hm. To me, it looks like the sensor isn't detected. I don't see the Honestly, I'm not 100% sure what's up with this. |
@rmasad please provide full output of dmesg command as txt file. What is your laptop/system ? |
ov02c10 is not loaded by default. Doing sudo modprobe ov02c10 (and removing it with sudo modprobe -r ov02c10 and loading it again a few times) does not work. Attached the log of sudo dmesg: dmesg.log |
Seems USB GPIO expander is missing . It's either ljca or usbio . Ljca modules should be already installed, usbio is provided external linux-modules-usbio*.deb package. |
@sgruszka Thanks! Yes, that makes sense. |
Summary
Following the discussion in #187 (comment), this documents my attempt to build and use the patched kernel. This is at the request of @sgruszka.
Steps to build the kernel
/etc/apt/sources.list.d/ubuntu.sources
file. Executesudo apt update
.I'm using an unsigned schema because I can't build the signed Ubuntu package, obviously...
4. Get the source package:
apt source linux-image-unsigned-6.11.0-1007-oem
5.
cd
to the kernel source directory and apply the following 4 patches usingpatch -p1 < file
.patch1.txt
patch2.txt
patch3.txt
patch4.txt
6. Use the debian scripts to prepare the source:
debian.oem/changelog
file to build*.deb
packages with a distinguishing version number. I arbitrarily picked1000
for this.fakeroot debian/rules clean fakeroot debian/rules binary
*.deb
files in the..
directory. I installed these with the command:sudo dpkg -i linux-oem-6.11-headers-6.11.0-1007_6.11.0-1007.1000_all.deb linux-headers-6.11.0-1007-oem_6.11.0-1007.1000_amd64.deb linux-modules-6.11.0-1007-oem_6.11.0-1007.1000_amd64.deb linux-modules-ipu6-6.11.0-1007-oem_6.11.0-1007.1000_amd64.deb linux-image-unsigned-6.11.0-1007-oem_6.11.0-1007.1000_amd64.deb
Notes/problems/issue with this build
6.11.0-1007-oem
. The kernel modules fail to correctly configure the ov2740 and v4l2_loopback some large fraction of the time, perhaps 50-60% of the time. This can often be recovered by a fewmodprobe -r ov2740
+modprobe ov2740
followed by asudo systemctl restart v4l2-relayd.service
to restart the gstreamer.video4linux
virtual devices seem not to be configured and therefore the gstreamer process fails to start from the service file.The text was updated successfully, but these errors were encountered: