/srv/irclogs.ubuntu.com/2023/01/09/#ubuntu-kernel.txt

=== halvors1 is now known as halvors
=== cpaelzer_ is now known as cpaelzer
=== klebers_ is now known as klebers
giulianoHi. I'm building a uvcvideo.ko module, but have difficulties loading the new module on the system. May I ask for some help ?16:51
giulianoI 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/200094716:52
giulianoyes16:52
giulianothis is the ghithub I'm testing right now16:52
giulianohttps://github.com/Giuliano69/uvc_driver-for-Quanta-HD-User-Facing-0x0408-0x4035-16:52
giulianoI made a script to compile the module. The compilation ends correctly16:53
giulianoBUT the module is non loaded16:53
giulianoHope the bash is well documented... what am I missing ?16:53
giulianoI see two main problems:16:54
giuliano1) the dmesg shows this error failed to validate module [uvcvideo] BTF: -2216:54
giuliano2) there is a version mismatch between $ cat /proc/version_signature shows Ubuntu 5.15.0-57.63-generic 5.15.74.16:55
giulianoand modinfo uvcvideo.ko16:55
Jeremy31giuliano: I just commented on your bug22:10
giulianothanks Jeremy ! I saw your messagge on launchpad..22:29
Jeremy31giuliano: It is how I do bluetooth patches and I didn't see any module version issue with my method22:30
giulianoI installed inux-modules-extra-$(uname -r) where `uname -r` is  5.15.0-57-generic BUT ..22:31
giulianoThe 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
giulianodo you mean a different directory ?22:31
Jeremy31giuliano: You need the source code for linux-modules-extra22:32
giulianoI entered "sudo apt-get source linux-modules-extra-$(uname -r)22:32
giuliano"22:32
giulianoand it pulled 2045Mb...22:32
giuliano20422:32
Jeremy31Don't use sudo for that22:32
giulianoReading the console I now see... "dpkg-source: Informazioni: extracting linux in linux-5.15.022:34
giuliano"22:34
Jeremy31Hopefully it isn't owned by root22:34
giulianoI ran the command from my home directory...22:35
Jeremy31It might have different permissions22:36
giulianohops... it created a new dir in my home .... owned by root....22:36
giulianogonna change the owner...22:36
Jeremy31That will simplify things22:37
giulianook ... changed owner:group..22:39
giulianook... the directory has got the c file inside...22:39
giulianoI would kindly ask...22:40
Jeremy31Rename the original and copy the patched version in22:40
giulianoI've got in /usr/src/ a BIG tar file linux-source-5.15.0.tar.bz2 22:40
giulianoI used that file, extracting in my home and compiling22:41
giulianothat tar file is 153 MB but expanded got 1-2 Gb.... 22:41
giulianoShouldn't it be the ALL linux kernel ? Why I need to downlaod the linux-extra inf already is present that tar file ?22:41
Jeremy31Just eliminating some possible problems with that linux-source file22:42
Jeremy31I am not real sure how your built module ended up with vermagic of 5.15.6422:43
giulianorenamed and downloaded the uvcvideo.c22:44
giulianoShould 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:45
giulianoor in the uvc dir ?22:46
Jeremy31Run it in the uvc directory22:46
Jeremy31Faster22:46
giulianoSkipping BTF generation for /home/giuliano/linux-5.15.0/drivers/media/usb/uvc/uvcvideo.ko due to unavailability of vmlinux22:46
Jeremy31normal22:47
giuliano?? 22:47
giulianowhat does it mean ?22:47
Jeremy31IIRC it means Secure Boot is disabled22:47
giulianomy previous compileed module, failed modprove because "failed to validate module [uvcvideo] BTF: -22"22:47
giulianois something similar with BTF ?22:48
Jeremy31giuliano: Is there a uvcvideo.ko file in the directory now?22:48
giulianoyes, AND vermagic:       5.15.0-57-generic SMP mod_unload modversions 22:48
Jeremy31Copy it to the kernel22:49
giulianocat /proc/version_signature22:49
giulianoUbuntu 5.15.0-57.63-generic 5.15.7422:49
giulianoIs  the .63 missing ?22:49
Jeremy31That is normal also, check in terminal>  uname -r22:52
giulianoCOPIED into /lib/modules/5.15.0-57-generic/kernel/drivers/media/usb/uvc22:53
giulianoshould i change owner:group befor modprobe ?22:53
Jeremy31No need to do that to anything in /home22:53
giulianowell... destination file was copied in system path /lib/modules/...22:54
giulianoand file shows22:54
giuliano-rw-rw-r-- 1 giuliano giuliano 4386720 gen  9 23:46 uvcvideo.ko22:54
Jeremy31And using sudo to copy into /lib/modules already changed it22:54
giulianoI 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.0a22: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/input3822:55
giuliano[103970.949630] usbcore: registered new interface driver uvcvideo22:55
giulianofrom dmesg22:55
giulianoWell... I can get back to Pinchart.... the Cheese program is running 22:56
giulianoand I can see myself in the window... BUT it is very slow.... extremely slow...22:57
giulianothanks a lot for your help22:58
Jeremy31Good luck22:59
giulianothanks...22:59
giulianoI will try to fix this for all the other that have similar problem23:00
Jeremy31If 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) clean23:00
giulianoyou mean to run it in the uvc directory or in the root of the source ?23:02
Jeremy31The linux-5.15 uvc directory in /home23:03
giulianook23:04
giulianoBTW 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
giulianoEven the top menu screen luminosity slider does not work…23:05
giulianoStrangely, I installed https://github.com/lordamit/Brightness, and it works… 23:05
giulianoWhere do you suggest me to  start inspecting the code ?23:05
giulianomay be something ACPI related, or something at more higer leverl (gnome) ?23:05
Jeremy31I have no clue, most of what I do is with wifi and bluetooth, but I can fix some issues compiling drivers23:07
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 -223:14
giuliano[    3.286082] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-so-a0-hr-b0-65.ucode failed with error -223:14
giuliano[    3.288700] iwlwifi 0000:00:14.3: api flags index 2 larger than supported by driver23:14
giuliano[    3.288719] iwlwifi 0000:00:14.3: TLV_FW_FSEQ_VERSION: FSEQ Version: 0.0.2.2523:14
giuliano[    3.289123] iwlwifi 0000:00:14.3: loaded firmware version 64.97bbee0a.0 so-a0-hr-b0-64.ucode op_mode iwlmvm23:14
giulianoIs someting to not working properly ?23:14
Jeremy31giuliano: 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 loaded23:17
giulianothanks again for your help23:17
giulianogonna inform Pichard of the progress !!23:18
giulianoHave a nice day !23:18
Jeremy31Good, later23:18

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!