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