=== halvors1 is now known as halvors === cpaelzer_ is now known as cpaelzer === klebers_ is now known as klebers [16:51] Hi. I'm building a uvcvideo.ko module, but have difficulties loading the new module on the system. May I ask for some help ? [16:52] I opened bug 2000947, and received from laurent.pinchart@ideasonboard.com some c code to test... [16:52] -ubottu:#ubuntu-kernel- Bug 2000947 in linux (Ubuntu) "UVC Quanta 0408:4035 camera PROBLEM" [Undecided, Confirmed] https://launchpad.net/bugs/2000947 [16:52] yes [16:52] this is the ghithub I'm testing right now [16:52] https://github.com/Giuliano69/uvc_driver-for-Quanta-HD-User-Facing-0x0408-0x4035- [16:53] I made a script to compile the module. The compilation ends correctly [16:53] BUT the module is non loaded [16:53] Hope the bash is well documented... what am I missing ? [16:54] I see two main problems: [16:54] 1) the dmesg shows this error failed to validate module [uvcvideo] BTF: -22 [16:55] 2) there is a version mismatch between $ cat /proc/version_signature shows Ubuntu 5.15.0-57.63-generic 5.15.74. [16:55] and modinfo uvcvideo.ko [22:10] giuliano: I just commented on your bug [22:29] thanks Jeremy ! I saw your messagge on launchpad.. [22:30] giuliano: It is how I do bluetooth patches and I didn't see any module version issue with my method [22:31] I installed inux-modules-extra-$(uname -r) where `uname -r` is 5.15.0-57-generic BUT .. [22:31] The directory /usr/src/linux-headers-5.15.0-57-generic/drivers/media/usb/uvc/ has got only two make files, no C lang. File… [22:31] do you mean a different directory ? [22:32] giuliano: You need the source code for linux-modules-extra [22:32] I entered "sudo apt-get source linux-modules-extra-$(uname -r) [22:32] " [22:32] and it pulled 2045Mb... [22:32] 204 [22:32] Don't use sudo for that [22:34] Reading the console I now see... "dpkg-source: Informazioni: extracting linux in linux-5.15.0 [22:34] " [22:34] Hopefully it isn't owned by root [22:35] I ran the command from my home directory... [22:36] It might have different permissions [22:36] hops... it created a new dir in my home .... owned by root.... [22:36] gonna change the owner... [22:37] That will simplify things [22:39] ok ... changed owner:group.. [22:39] ok... the directory has got the c file inside... [22:40] I would kindly ask... [22:40] Rename the original and copy the patched version in [22:40] I've got in /usr/src/ a BIG tar file linux-source-5.15.0.tar.bz2 [22:41] I used that file, extracting in my home and compiling [22:41] that tar file is 153 MB but expanded got 1-2 Gb.... [22:41] Shouldn't it be the ALL linux kernel ? Why I need to downlaod the linux-extra inf already is present that tar file ? [22:42] Just eliminating some possible problems with that linux-source file [22:43] I am not real sure how your built module ended up with vermagic of 5.15.64 [22:44] renamed and downloaded the uvcvideo.c [22:45] Should I run "make -j4 -C /lib/modules/$(uname -r)/build M=$(pwd) modules" in the top level of ~/linux-5.15.0 I just created ? [22:46] or in the uvc dir ? [22:46] Run it in the uvc directory [22:46] Faster [22:46] Skipping BTF generation for /home/giuliano/linux-5.15.0/drivers/media/usb/uvc/uvcvideo.ko due to unavailability of vmlinux [22:47] normal [22:47] ?? [22:47] what does it mean ? [22:47] IIRC it means Secure Boot is disabled [22:47] my previous compileed module, failed modprove because "failed to validate module [uvcvideo] BTF: -22" [22:48] is something similar with BTF ? [22:48] giuliano: Is there a uvcvideo.ko file in the directory now? [22:48] yes, AND vermagic: 5.15.0-57-generic SMP mod_unload modversions [22:49] Copy it to the kernel [22:49] cat /proc/version_signature [22:49] Ubuntu 5.15.0-57.63-generic 5.15.74 [22:49] Is the .63 missing ? [22:52] That is normal also, check in terminal> uname -r [22:53] COPIED into /lib/modules/5.15.0-57-generic/kernel/drivers/media/usb/uvc [22:53] should i change owner:group befor modprobe ? [22:53] No need to do that to anything in /home [22:54] well... destination file was copied in system path /lib/modules/... [22:54] and file shows [22:54] -rw-rw-r-- 1 giuliano giuliano 4386720 gen 9 23:46 uvcvideo.ko [22:54] And using sudo to copy into /lib/modules already changed it [22:55] I thougt... but checking ... it has not (?))) [22:55] [103970.912878] usb 3-6: Found UVC 1.50 device ACER HD User Facing (0408:4035) [22:55] [103970.912882] usb 3-6: Forcing UVC version to 1.0a [22:55] [103970.949432] input: ACER HD User Facing: ACER HD Us as /devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.0/input/input38 [22:55] [103970.949630] usbcore: registered new interface driver uvcvideo [22:55] from dmesg [22:56] Well... I can get back to Pinchart.... the Cheese program is running [22:57] and I can see myself in the window... BUT it is very slow.... extremely slow... [22:58] thanks a lot for your help [22:59] Good luck [22:59] thanks... [23:00] I will try to fix this for all the other that have similar problem [23:00] If he has any new updates run this in the source directory before trying to make modules again> make -j4 -C /lib/modules/$(uname -r)/build M=$(pwd) clean [23:02] you mean to run it in the uvc directory or in the root of the source ? [23:03] The linux-5.15 uvc directory in /home [23:04] ok [23:05] BTW I've got also another bug with the screen luminisity control. I can see the OSD reacting to my key pressed, but the screen does not change intensity. [23:05] Even the top menu screen luminosity slider does not work… [23:05] Strangely, I installed https://github.com/lordamit/Brightness, and it works… [23:05] Where do you suggest me to start inspecting the code ? [23:05] may be something ACPI related, or something at more higer leverl (gnome) ? [23:07] I have no clue, most of what I do is with wifi and bluetooth, but I can fix some issues compiling drivers [23:14] ?? wifi ?? I noticed a failure about wifi in the dmesg.... but then it said it was loaded something... [23:14] [ 3.286067] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-so-a0-hr-b0-66.ucode failed with error -2 [23:14] [ 3.286082] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-so-a0-hr-b0-65.ucode failed with error -2 [23:14] [ 3.288700] iwlwifi 0000:00:14.3: api flags index 2 larger than supported by driver [23:14] [ 3.288719] iwlwifi 0000:00:14.3: TLV_FW_FSEQ_VERSION: FSEQ Version: 0.0.2.25 [23:14] [ 3.289123] iwlwifi 0000:00:14.3: loaded firmware version 64.97bbee0a.0 so-a0-hr-b0-64.ucode op_mode iwlmvm [23:14] Is someting to not working properly ? [23:17] giuliano: Normal for iwlwifi, the max and min firmware versions are specified in the module but it seems that version 65 or 66 aren't available so version 64 loaded [23:17] thanks again for your help [23:18] gonna inform Pichard of the progress !! [23:18] Have a nice day ! [23:18] Good, later