* Re: ucv camera fix : tester offering :-)
[not found] <CA+DpmqZ1fh=MqEn-G6wb_6yELuPWVTROG2ReUDPJGAAOn7FN9Q@mail.gmail.com>
@ 2022-12-21 20:09 ` Ricardo Ribalda
2022-12-30 19:33 ` Laurent Pinchart
0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Ribalda @ 2022-12-21 20:09 UTC (permalink / raw)
To: Giuliano Lotta, Linux Media Mailing List; +Cc: laurent.pinchart, mchehab
Hi Giuliano
Usually it is better to ask at the linux-media mailing list
https://www.linuxtv.org/lists.php. there is better chance to get an
answer and your question will get better chances to get be answered.
On Wed, 21 Dec 2022 at 15:14, Giuliano Lotta <giuliano.lotta@gmail.com> wrote:
>
> Hi Laurent,
>
> I'm using using an ubuntu Ubuntu 22.04.1 LTS on 5.15.0-56-generic
>
> with an Acer Nitro 5 AN517-55 with Quanta ACER HD User Facing', USB 0408:4035.
>
> Currently the camera is not working under linux. The camera works perfectly on Windows 11 dual boot.
>
> The camera is reported to have problems on other linux versions: https://linux-hardware.org/?id=usb:0408-4035
>
> My console commands report similar info to other users: https://unix.stackexchange.com/questions/723504/integrated-camera-not-detected-working-on-acer-nitro-5-an515-58
>
> I see also that there is a proposed fix at https://patchwork.kernel.org/project/linux-media/patch/20220617235610.321917-9-ribalda@chromium.org/
If your error in dmesg is simiar
[ 4.629731] uvcvideo 3-6:1.1: Failed to query (129) UVC probe
control : 26 (exp. 48).
I am afraid that my patch won't help you much. My patch fixes the way
a control can be configured.
Can you copy your whole dmesg when you get an error. Also the output
of lsusb -v -d 0408:4035
Thanks!
>
>
> Installed linux-source but uvc_driver.c I found in the directory tree of Ubuntu is different from both :
>
> - https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c
>
> - https://patchwork.kernel.org/project/linux-media/patch/20220617235610.321917-9-ribalda@chromium.org/
>
>
> I would like to test your patch and see if the solution can be submitted to Ubuntu for the next fix release.
>
> -Could you give me some instructions on how to proceed ?
>
> -Should I compile a new whole kernel or just a mod?
>
> -Where can I find the source to which your fix applies (seems to apply to something different from Ubuntu and torvald versions) ? Will it be compatible with the current Ubuntu version?
>
> - May I ask for some instructions on how to proceed with testing your fix ?
>
>
> BR
>
> Giuliano
>
>
>
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ucv camera fix : tester offering :-)
2022-12-21 20:09 ` ucv camera fix : tester offering :-) Ricardo Ribalda
@ 2022-12-30 19:33 ` Laurent Pinchart
[not found] ` <CA+DpmqZ=v1TwfhnjpaT6ip9L4UnVuE-Cx2cJo0hDNybNhKwu4g@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2022-12-30 19:33 UTC (permalink / raw)
To: Ricardo Ribalda; +Cc: Giuliano Lotta, Linux Media Mailing List, mchehab
On Wed, Dec 21, 2022 at 09:09:37PM +0100, Ricardo Ribalda wrote:
> Hi Giuliano
>
> Usually it is better to ask at the linux-media mailing list
> https://www.linuxtv.org/lists.php. there is better chance to get an
> answer and your question will get better chances to get be answered.
>
> On Wed, 21 Dec 2022 at 15:14, Giuliano Lotta wrote:
> >
> > Hi Laurent,
> >
> > I'm using using an ubuntu Ubuntu 22.04.1 LTS on 5.15.0-56-generic
> >
> > with an Acer Nitro 5 AN517-55 with Quanta ACER HD User Facing', USB
> > 0408:4035.
> >
> > Currently the camera is not working under linux. The camera works
> > perfectly on Windows 11 dual boot.
> >
> > The camera is reported to have problems on other linux versions:
> > https://linux-hardware.org/?id=usb:0408-4035
> >
> > My console commands report similar info to other users:
> > https://unix.stackexchange.com/questions/723504/integrated-camera-not-detected-working-on-acer-nitro-5-an515-58
> >
> > I see also that there is a proposed fix at
> > https://patchwork.kernel.org/project/linux-media/patch/20220617235610.321917-9-ribalda@chromium.org/
>
> If your error in dmesg is simiar
>
> [ 4.629731] uvcvideo 3-6:1.1: Failed to query (129) UVC probe control : 26 (exp. 48).
It looks like your device advertise UVC 1.5 support (as also hinted by
the availability of the Region of Interest control in the camera input
terminal) but implements the UVC 1.0a video control. I'm honestly
puzzled by how abysmal compliance testing seems to be among webcam
manufacturers. In older days this would have called for beheading with a
rusty tea spoon, or worse, cursing in them Finnish.
> I am afraid that my patch won't help you much. My patch fixes the way
> a control can be configured.
>
> Can you copy your whole dmesg when you get an error.
That would be useful.
> Also the output of lsusb -v -d 0408:4035
That seems to be available from https://pastebin.com/raw/GQVWC6i3.
Giuliano, could you try the following patch ? You need to apply it to
the sources of the kernel you're running (available from your
distribution), and compile the uvcvideo module. Depending on the
distribution, it may sign kernel modules, in which case you may need to
recompile the whole kernel. That's a distribution-specific issue that
you should bring up with your distribution's support channel if you run
into issues.
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 6abec7a51f47..52e7cae5c249 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2447,6 +2447,17 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = UVC_PC_PROTOCOL_15,
.driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited },
+ /* Quanta ACER HD User Facing */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x0408,
+ .idProduct = 0x4035,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = (kernel_ulong_t)&(const struct uvc_device_info){
+ .uvc_version = 0x010a,
+ } },
/* LogiLink Wireless Webcam */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
This may cause side effects, for instance when it comes to handling of
the power line frequency control or other controls whose implementation
depend on the UVC version, but we'll worry about that later.
> > Installed linux-source but uvc_driver.c I found in the directory tree of Ubuntu is different from both :
> >
> > - https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c
> >
> > - https://patchwork.kernel.org/project/linux-media/patch/20220617235610.321917-9-ribalda@chromium.org/
> >
> >
> > I would like to test your patch and see if the solution can be
> > submitted to Ubuntu for the next fix release.
> >
> > - Could you give me some instructions on how to proceed ?
> >
> > - Should I compile a new whole kernel or just a mod?
> >
> > - Where can I find the source to which your fix applies (seems to
> > apply to something different from Ubuntu and torvald versions) ?
> > Will it be compatible with the current Ubuntu version?
> >
> > - May I ask for some instructions on how to proceed with testing
> > your fix ?
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: ucv camera fix : tester offering :-)
[not found] ` <CA+DpmqZ=v1TwfhnjpaT6ip9L4UnVuE-Cx2cJo0hDNybNhKwu4g@mail.gmail.com>
@ 2023-01-02 12:49 ` Laurent Pinchart
[not found] ` <CA+Dpmqax3M5=a=uPEorx=o2_kaKt_Aj7iXaXHreyjWFLscr+Ng@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2023-01-02 12:49 UTC (permalink / raw)
To: Giuliano Lotta; +Cc: Ricardo Ribalda, Linux Media Mailing List, mchehab
Hi Giuliano,
On Sun, Jan 01, 2023 at 10:26:00PM +0100, Giuliano Lotta wrote:
> *Hi Laurent *
>
> *Thanks a lot for your kind help… and thanks for finding time close to the
> new year holiday (btw… Happy new year !)*
>
> *I’m running **Ubuntu 22.04.1 LTS, with kernel **Ubuntu
> 5.15.0-56.62-generic 5.15.64*
>
>
> *I expanded the tar archive in my home directory, and created a new Eclipse
> project with Eclispe main site config info.*
You can use your favourite source code editor to work on the kernel, but
an Eclipse *project* may be overkill. I wouldn't recommend building the
kernel within Eclipse, running 'make' on the command line is preferable.
> *- UVC_DRIVER.C REFERENCE VERSION*
>
> *Thanks for the diff your are submitting me… considering the line numbers,
> your diff are NOT aligned with uvcdriver.c for my running ubuntu (kernel
> 5,15) :*
>
> *https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/tree/drivers/media/usb/uvc/uvc_driver.c?h=v5.15
> <https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/tree/drivers/media/usb/uvc/uvc_driver.c?h=v5.15>*
>
>
>
> *I also checked the Linus Torsvald git, and the ubuntu kernel 6,1. I see
> that some “other” Quanta camera has been added in Ubuntu 6,1 mainline and
> Torvald one, (e,g, 0x0408:0x4034), but non yet mine camera (0x0408:0x4035)
> !!*
>
> *https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/tree/drivers/media/usb/uvc/uvc_driver.c?h=v6.1
> <https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/tree/drivers/media/usb/uvc/uvc_driver.c?h=v6.1>*
>
> *https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c
> <https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c>*
>
>
> *The diff line number 2447, seems to match the Ubuntu 6,1 version, and NOT
> the current Torvald version. Is that right ?*
I don't recall which version I used as a base, but that doesn't matter
much here, you can apply the diff manually in the worst case by adding
the match entry to the array. The exact position doesn't matter much, as
long as it's before the last two items.
> *-DEVICE**_**INFO FIELD MACRO*
>
>
> *comparing how suc field is created, your macro seems to be different from
> the “ubuntu standard”. *
>
>
> *E.g. :*
> .driver_info = (kernel_ulong_t) &(const struct uvc_device_info ) { .uvc_version = 0x010a, } },
> vs
> .driver_info = (kernel_ulong_t)&uvc_quirk_probe_minmax },
>
> *Can I reform the .device_info field to follow the ubuntu standard ? Are
> there any real differences or incompatibilities ?*
The uvc_device_info structure should be in the v5.15 kernel already, so
the code I've sent should compile fine, I don't think there's a need to
change anything.
> *- **NEW **COMPILED VERSION*
>
> *I modified the 5,15 uvc_driver.c version with your lines of code, and
> loaded it on github*
>
> *https://github.com/Giuliano69/uvc_driver-for-Quanta-HD-User-Facing-0x0408-0x4035-/blob/main/uvc_driver.c
> <https://github.com/Giuliano69/uvc_driver-for-Quanta-HD-User-Facing-0x0408-0x4035-/blob/main/uvc_driver.c>*
>
> *Compiling the whole new kernel (“new” because the usb_driver.c is
> modified), shows NO ERROR:*
Good :-)
> > *21:42:38 **** Incremental Build of configuration Default for project
> > Linux 5.15 *****
> >
> make all
> >
> > CALL scripts/checksyscalls.sh
> > CALL scripts/atomic/check-atomics.sh
> > DESCEND objtool
> > DESCEND bpf/resolve_btfids
> > CHK include/generated/compile.h
> > CHK kernel/kheaders_data.tar.xz
> > CC [M] drivers/media/usb/uvc/uvc_driver.o
> > LD [M] drivers/media/usb/uvc/uvcvideo.o
> > Kernel: arch/x86/boot/bzImage is ready (#2)
> > MODPOST modules-only.symvers
> > GEN Module.symvers
> > CC [M] drivers/media/usb/uvc/uvcvideo.mod.o
> > LD [M] drivers/media/usb/uvc/uvcvideo.ko
> >
> > 21:43:52 Build Finished. 0 errors, 0 warnings. (took 1m:14s.207ms)
> >
> >
> *BUT **I’ve difficulties in finding WHERE is the new module after the
> building in my project directory tree!! *
>
> *Here is the ls -al*
>
> *giuliano@Astra2A:~/linux-source-5.15.0/drivers/media/usb/uvc$ ls -l*
>
> *totale 13288*
>
> *-rw-r--r-- 1 giuliano giuliano 623 ott 31 2021 Kconfig*
> *-rw-r--r-- 1 giuliano giuliano 290 ott 31 2021 Makefile*
> *-rw-rw-r-- 1 giuliano giuliano 34 gen 1 21:43 modules.order*
> *-rw-r--r-- 1 giuliano giuliano 61689 ott 31 2021 uvc_ctrl.c*
> *-rw-rw-r-- 1 giuliano giuliano 530176 gen 1 11:48 uvc_ctrl.o*
> *-rw-r--r-- 1 giuliano giuliano 2520 ott 31 2021 uvc_debugfs.c*
> *-rw-rw-r-- 1 giuliano giuliano 342808 gen 1 11:48 uvc_debugfs.o*
> *-rw-r--r-- 1 giuliano giuliano 87954 gen 1 21:42 uvc_driver.c*
> *-rw-rw-r-- 1 giuliano giuliano 631208 gen 1 21:43 uvc_driver.o*
> *-rw-r--r-- 1 giuliano giuliano 87571 ott 31 2021 uvc_driver.old*
> *-rw-r--r-- 1 giuliano giuliano 3967 ott 31 2021 uvc_entity.c*
> *-rw-rw-r-- 1 giuliano giuliano 344944 gen 1 11:48 uvc_entity.o*
> *-rw-r--r-- 1 giuliano giuliano 3779 ott 31 2021 uvc_isight.c*
> *-rw-rw-r-- 1 giuliano giuliano 315816 gen 1 11:48 uvc_isight.o*
> *-rw-r--r-- 1 giuliano giuliano 4964 ott 31 2021 uvc_metadata.c*
> *-rw-rw-r-- 1 giuliano giuliano 389056 gen 1 11:48 uvc_metadata.o*
> *-rw-r--r-- 1 giuliano giuliano 13448 ott 31 2021 uvc_queue.c*
> *-rw-rw-r-- 1 giuliano giuliano 416680 gen 1 11:48 uvc_queue.o*
> *-rw-r--r-- 1 giuliano giuliano 7213 ott 31 2021 uvc_status.c*
> *-rw-rw-r-- 1 giuliano giuliano 344240 gen 1 11:48 uvc_status.o*
> *-rw-r--r-- 1 giuliano giuliano 39618 nov 22 20:53 uvc_v4l2.c*
> *-rw-rw-r-- 1 giuliano giuliano 534856 gen 1 11:48 uvc_v4l2.o*
> *-rw-r--r-- 1 giuliano giuliano 64532 nov 22 20:53 uvc_video.c*
> *-rw-r--r-- 1 giuliano giuliano 27398 nov 22 20:53 uvcvideo.h*
> *-rw-rw-r-- 1 giuliano giuliano 4384280 gen 1 21:43 uvcvideo.ko*
This is the new module.
Normally modules are installed in the system by running `make
modules_install`. This will however overwrite all the modules installed
by the Ubuntu kernel package, so I don't recommend it, many things could
go wrong. Instead, you can try to load the module manually. First unload
the exising uvcvideo module with `sudo rmmod uvcvideo`, and then load
the new one with `sudo insmod drivers/media/usb/uvc/uvcvideo.ko` (note
how insmod uses the module file path as an argument, while modprobe uses
the module name and looks it up in /lib/modules - you should ajust the
path according to where you run the command).
If this fails, `dmesg` may give some useful information.
> *-rw-rw-r-- 1 giuliano giuliano 348 gen 1 21:43 uvcvideo.mod*
> *-rw-rw-r-- 1 giuliano giuliano 10098 gen 1 21:43 uvcvideo.mod.c*
> *-rw-rw-r-- 1 giuliano giuliano 70904 gen 1 21:43 uvcvideo.mod.o*
> *-rw-rw-r-- 1 giuliano giuliano 500384 gen 1 11:48 uvc_video.o*
> *-rw-rw-r-- 1 giuliano giuliano 4315312 gen 1 21:43 uvcvideo.o*
>
>
> *IF the new module file is created, may I load it with a simple modprobe in
> my running system ?*
>
> *Can it interfere with the Nvidia driver (many times it showed some
> problems…) =*
They shouldn't be related, no.
> Il giorno ven 30 dic 2022 alle ore 20:33 Laurent Pinchart ha scritto:
> > On Wed, Dec 21, 2022 at 09:09:37PM +0100, Ricardo Ribalda wrote:
> > > Hi Giuliano
> > >
> > > Usually it is better to ask at the linux-media mailing list
> > > https://www.linuxtv.org/lists.php. there is better chance to get an
> > > answer and your question will get better chances to get be answered.
> > >
> > > On Wed, 21 Dec 2022 at 15:14, Giuliano Lotta wrote:
> > > >
> > > > Hi Laurent,
> > > >
> > > > I'm using using an ubuntu Ubuntu 22.04.1 LTS on 5.15.0-56-generic
> > > >
> > > > with an Acer Nitro 5 AN517-55 with Quanta ACER HD User Facing', USB
> > > > 0408:4035.
> > > >
> > > > Currently the camera is not working under linux. The camera works
> > > > perfectly on Windows 11 dual boot.
> > > >
> > > > The camera is reported to have problems on other linux versions:
> > > > https://linux-hardware.org/?id=usb:0408-4035
> > > >
> > > > My console commands report similar info to other users:
> > > > https://unix.stackexchange.com/questions/723504/integrated-camera-not-detected-working-on-acer-nitro-5-an515-58
> > > >
> > > > I see also that there is a proposed fix at
> > > > https://patchwork.kernel.org/project/linux-media/patch/20220617235610.321917-9-ribalda@chromium.org/
> > >
> > > If your error in dmesg is simiar
> > >
> > > [ 4.629731] uvcvideo 3-6:1.1: Failed to query (129) UVC probe control: 26 (exp. 48).
> >
> > It looks like your device advertise UVC 1.5 support (as also hinted by
> > the availability of the Region of Interest control in the camera input
> > terminal) but implements the UVC 1.0a video control. I'm honestly
> > puzzled by how abysmal compliance testing seems to be among webcam
> > manufacturers. In older days this would have called for beheading with a
> > rusty tea spoon, or worse, cursing in them Finnish.
> >
> > > I am afraid that my patch won't help you much. My patch fixes the way
> > > a control can be configured.
> > >
> > > Can you copy your whole dmesg when you get an error.
> >
> > That would be useful.
> >
> > > Also the output of lsusb -v -d 0408:4035
> >
> > That seems to be available from https://pastebin.com/raw/GQVWC6i3.
> >
> > Giuliano, could you try the following patch ? You need to apply it to
> > the sources of the kernel you're running (available from your
> > distribution), and compile the uvcvideo module. Depending on the
> > distribution, it may sign kernel modules, in which case you may need to
> > recompile the whole kernel. That's a distribution-specific issue that
> > you should bring up with your distribution's support channel if you run
> > into issues.
> >
> > diff --git a/drivers/media/usb/uvc/uvc_driver.c
> > b/drivers/media/usb/uvc/uvc_driver.c
> > index 6abec7a51f47..52e7cae5c249 100644
> > --- a/drivers/media/usb/uvc/uvc_driver.c
> > +++ b/drivers/media/usb/uvc/uvc_driver.c
> > @@ -2447,6 +2447,17 @@ static const struct usb_device_id uvc_ids[] = {
> > .bInterfaceSubClass = 1,
> > .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
> > .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited },
> > + /* Quanta ACER HD User Facing */
> > + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> > + | USB_DEVICE_ID_MATCH_INT_INFO,
> > + .idVendor = 0x0408,
> > + .idProduct = 0x4035,
> > + .bInterfaceClass = USB_CLASS_VIDEO,
> > + .bInterfaceSubClass = 1,
> > + .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
> > + .driver_info = (kernel_ulong_t)&(const struct uvc_device_info) {
> > + .uvc_version = 0x010a,
> > + } },
> > /* LogiLink Wireless Webcam */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> > | USB_DEVICE_ID_MATCH_INT_INFO,
> >
> > This may cause side effects, for instance when it comes to handling of
> > the power line frequency control or other controls whose implementation
> > depend on the UVC version, but we'll worry about that later.
> >
> > > > Installed linux-source but uvc_driver.c I found in the directory tree
> > > > of Ubuntu is different from both :
> > > >
> > > > - https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c
> > > >
> > > > - https://patchwork.kernel.org/project/linux-media/patch/20220617235610.321917-9-ribalda@chromium.org/
> > > >
> > > >
> > > > I would like to test your patch and see if the solution can be
> > > > submitted to Ubuntu for the next fix release.
> > > >
> > > > - Could you give me some instructions on how to proceed ?
> > > >
> > > > - Should I compile a new whole kernel or just a mod?
> > > >
> > > > - Where can I find the source to which your fix applies (seems to
> > > > apply to something different from Ubuntu and torvald versions) ?
> > > > Will it be compatible with the current Ubuntu version?
> > > >
> > > > - May I ask for some instructions on how to proceed with testing
> > > > your fix ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ucv camera fix : tester offering :-)
[not found] ` <CA+Dpmqax3M5=a=uPEorx=o2_kaKt_Aj7iXaXHreyjWFLscr+Ng@mail.gmail.com>
@ 2023-01-02 13:25 ` Laurent Pinchart
[not found] ` <CA+DpmqYNK=zLPPRjsqWF-3TgdPHq97tFBGamizrdN1i3xHwAtQ@mail.gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2023-01-02 13:25 UTC (permalink / raw)
To: Giuliano Lotta; +Cc: Ricardo Ribalda, Linux Media Mailing List, mchehab
Hi Giuliano,
On Mon, Jan 02, 2023 at 02:18:21PM +0100, Giuliano Lotta wrote:
> Hi Laurent
>
> I manually copied the uvcvideo.ko in
>
> /lib/modules/5.15.0-56-generic/kernel/drivers/media/usb/uvc
>
> sudo cp…...
>
>
> then
>
> sudo rmmod uvcvideo && sudo modprobe uvcvideo
>
>
> BUT… IT FAILS
>
> giuliano@Astra2A:~$ sudo rmmod uvcvideo && sudo modprobe uvcvideo
>
> modprobe: ERROR: could not insert 'uvcvideo': Exec format error
>
>
> and dmesg shows
>
> [25961.151982] usbcore: registered new interface driver uvcvideo
>
> [26323.125534] usbcore: deregistering interface driver uvcvideo
>
> [26323.189294] uvcvideo: disagrees about version of symbol module_layout
>
>
>
>
> These are the TWO modinfo from the old and new uvcvideo modules
>
> https://pastebin.com/tSj8Exm6
>
> Basically
>
> OLD module: vermagic: 5.15.0-56-generic SMP mod_unload modversions
>
> NEW module: vermagic: 5.15.64 SMP mod_unload modversions
>
>
> btw…. to allow Eclipse to compile the kernel, I had to pass this commands
>
> scripts/config --disable CONFIG_SYSTEM_REVOCATION_KEYS
>
> scripts/config --disable SYSTEM_REVOCATION_KEYS
>
> scripts/config --disable SYSTEM_TRUSTED_KEYS
>
>
> hope that this does not affect the module layout & checking
>
>
> -kindly ASK
>
>
> HOW can FORCE the uvcdriver.c to match mi kernel version ?
>
> Have I got OTHER ways to make the kernel module I’m compiling, match my
> running system ?
This is getting distribution-specific, you will need to ask for support
from Ubuntu-related resources (there may be Ubuntu users on this mailing
list who could possibly help, but that's not guaranteed, Ubuntu forums,
mailing lists or IRC channels are likely better).
> Il giorno lun 2 gen 2023 alle ore 13:49 Laurent Pinchart ha scritto:
> > On Sun, Jan 01, 2023 at 10:26:00PM +0100, Giuliano Lotta wrote:
> > > *Hi Laurent *
> > >
> > > *Thanks a lot for your kind help… and thanks for finding time close to the
> > > new year holiday (btw… Happy new year !)*
> > >
> > > *I’m running **Ubuntu 22.04.1 LTS, with kernel **Ubuntu
> > > 5.15.0-56.62-generic 5.15.64*
> > >
> > >
> > > *I expanded the tar archive in my home directory, and created a new
> > Eclipse
> > > project with Eclispe main site config info.*
> >
> > You can use your favourite source code editor to work on the kernel, but
> > an Eclipse *project* may be overkill. I wouldn't recommend building the
> > kernel within Eclipse, running 'make' on the command line is preferable.
> >
> > > *- UVC_DRIVER.C REFERENCE VERSION*
> > >
> > > *Thanks for the diff your are submitting me… considering the line
> > numbers,
> > > your diff are NOT aligned with uvcdriver.c for my running ubuntu (kernel
> > > 5,15) :*
> > >
> > > *
> > https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/tree/drivers/media/usb/uvc/uvc_driver.c?h=v5.15
> > > <
> > https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/tree/drivers/media/usb/uvc/uvc_driver.c?h=v5.15
> > >*
> > >
> > >
> > >
> > > *I also checked the Linus Torsvald git, and the ubuntu kernel 6,1. I see
> > > that some “other” Quanta camera has been added in Ubuntu 6,1 mainline and
> > > Torvald one, (e,g, 0x0408:0x4034), but non yet mine camera
> > (0x0408:0x4035)
> > > !!*
> > >
> > > *
> > https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/tree/drivers/media/usb/uvc/uvc_driver.c?h=v6.1
> > > <
> > https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/tree/drivers/media/usb/uvc/uvc_driver.c?h=v6.1
> > >*
> > >
> > > *
> > https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c
> > > <
> > https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c
> > >*
> > >
> > >
> > > *The diff line number 2447, seems to match the Ubuntu 6,1 version, and
> > NOT
> > > the current Torvald version. Is that right ?*
> >
> > I don't recall which version I used as a base, but that doesn't matter
> > much here, you can apply the diff manually in the worst case by adding
> > the match entry to the array. The exact position doesn't matter much, as
> > long as it's before the last two items.
> >
> > > *-DEVICE**_**INFO FIELD MACRO*
> > >
> > >
> > > *comparing how suc field is created, your macro seems to be different
> > from
> > > the “ubuntu standard”. *
> > >
> > >
> > > *E.g. :*
> > > .driver_info = (kernel_ulong_t) &(const struct uvc_device_info ) {
> > .uvc_version = 0x010a, } },
> > > vs
> > > .driver_info = (kernel_ulong_t)&uvc_quirk_probe_minmax },
> > >
> > > *Can I reform the .device_info field to follow the ubuntu standard ? Are
> > > there any real differences or incompatibilities ?*
> >
> > The uvc_device_info structure should be in the v5.15 kernel already, so
> > the code I've sent should compile fine, I don't think there's a need to
> > change anything.
> >
> > > *- **NEW **COMPILED VERSION*
> > >
> > > *I modified the 5,15 uvc_driver.c version with your lines of code, and
> > > loaded it on github*
> > >
> > > *
> > https://github.com/Giuliano69/uvc_driver-for-Quanta-HD-User-Facing-0x0408-0x4035-/blob/main/uvc_driver.c
> > > <
> > https://github.com/Giuliano69/uvc_driver-for-Quanta-HD-User-Facing-0x0408-0x4035-/blob/main/uvc_driver.c
> > >*
> > >
> > > *Compiling the whole new kernel (“new” because the usb_driver.c is
> > > modified), shows NO ERROR:*
> >
> > Good :-)
> >
> > > > *21:42:38 **** Incremental Build of configuration Default for project
> > > > Linux 5.15 *****
> > > >
> > > make all
> > > >
> > > > CALL scripts/checksyscalls.sh
> > > > CALL scripts/atomic/check-atomics.sh
> > > > DESCEND objtool
> > > > DESCEND bpf/resolve_btfids
> > > > CHK include/generated/compile.h
> > > > CHK kernel/kheaders_data.tar.xz
> > > > CC [M] drivers/media/usb/uvc/uvc_driver.o
> > > > LD [M] drivers/media/usb/uvc/uvcvideo.o
> > > > Kernel: arch/x86/boot/bzImage is ready (#2)
> > > > MODPOST modules-only.symvers
> > > > GEN Module.symvers
> > > > CC [M] drivers/media/usb/uvc/uvcvideo.mod.o
> > > > LD [M] drivers/media/usb/uvc/uvcvideo.ko
> > > >
> > > > 21:43:52 Build Finished. 0 errors, 0 warnings. (took 1m:14s.207ms)
> > > >
> > > >
> > > *BUT **I’ve difficulties in finding WHERE is the new module after the
> > > building in my project directory tree!! *
> > >
> > > *Here is the ls -al*
> > >
> > > *giuliano@Astra2A:~/linux-source-5.15.0/drivers/media/usb/uvc$ ls -l*
> > >
> > > *totale 13288*
> > >
> > > *-rw-r--r-- 1 giuliano giuliano 623 ott 31 2021 Kconfig*
> > > *-rw-r--r-- 1 giuliano giuliano 290 ott 31 2021 Makefile*
> > > *-rw-rw-r-- 1 giuliano giuliano 34 gen 1 21:43 modules.order*
> > > *-rw-r--r-- 1 giuliano giuliano 61689 ott 31 2021 uvc_ctrl.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 530176 gen 1 11:48 uvc_ctrl.o*
> > > *-rw-r--r-- 1 giuliano giuliano 2520 ott 31 2021 uvc_debugfs.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 342808 gen 1 11:48 uvc_debugfs.o*
> > > *-rw-r--r-- 1 giuliano giuliano 87954 gen 1 21:42 uvc_driver.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 631208 gen 1 21:43 uvc_driver.o*
> > > *-rw-r--r-- 1 giuliano giuliano 87571 ott 31 2021 uvc_driver.old*
> > > *-rw-r--r-- 1 giuliano giuliano 3967 ott 31 2021 uvc_entity.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 344944 gen 1 11:48 uvc_entity.o*
> > > *-rw-r--r-- 1 giuliano giuliano 3779 ott 31 2021 uvc_isight.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 315816 gen 1 11:48 uvc_isight.o*
> > > *-rw-r--r-- 1 giuliano giuliano 4964 ott 31 2021 uvc_metadata.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 389056 gen 1 11:48 uvc_metadata.o*
> > > *-rw-r--r-- 1 giuliano giuliano 13448 ott 31 2021 uvc_queue.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 416680 gen 1 11:48 uvc_queue.o*
> > > *-rw-r--r-- 1 giuliano giuliano 7213 ott 31 2021 uvc_status.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 344240 gen 1 11:48 uvc_status.o*
> > > *-rw-r--r-- 1 giuliano giuliano 39618 nov 22 20:53 uvc_v4l2.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 534856 gen 1 11:48 uvc_v4l2.o*
> > > *-rw-r--r-- 1 giuliano giuliano 64532 nov 22 20:53 uvc_video.c*
> > > *-rw-r--r-- 1 giuliano giuliano 27398 nov 22 20:53 uvcvideo.h*
> > > *-rw-rw-r-- 1 giuliano giuliano 4384280 gen 1 21:43 uvcvideo.ko*
> >
> > This is the new module.
> >
> > Normally modules are installed in the system by running `make
> > modules_install`. This will however overwrite all the modules installed
> > by the Ubuntu kernel package, so I don't recommend it, many things could
> > go wrong. Instead, you can try to load the module manually. First unload
> > the exising uvcvideo module with `sudo rmmod uvcvideo`, and then load
> > the new one with `sudo insmod drivers/media/usb/uvc/uvcvideo.ko` (note
> > how insmod uses the module file path as an argument, while modprobe uses
> > the module name and looks it up in /lib/modules - you should ajust the
> > path according to where you run the command).
> >
> > If this fails, `dmesg` may give some useful information.
> >
> > > *-rw-rw-r-- 1 giuliano giuliano 348 gen 1 21:43 uvcvideo.mod*
> > > *-rw-rw-r-- 1 giuliano giuliano 10098 gen 1 21:43 uvcvideo.mod.c*
> > > *-rw-rw-r-- 1 giuliano giuliano 70904 gen 1 21:43 uvcvideo.mod.o*
> > > *-rw-rw-r-- 1 giuliano giuliano 500384 gen 1 11:48 uvc_video.o*
> > > *-rw-rw-r-- 1 giuliano giuliano 4315312 gen 1 21:43 uvcvideo.o*
> > >
> > >
> > > *IF the new module file is created, may I load it with a simple modprobe
> > in
> > > my running system ?*
> > >
> > > *Can it interfere with the Nvidia driver (many times it showed some
> > > problems…) =*
> >
> > They shouldn't be related, no.
> >
> > > Il giorno ven 30 dic 2022 alle ore 20:33 Laurent Pinchart ha scritto:
> > > > On Wed, Dec 21, 2022 at 09:09:37PM +0100, Ricardo Ribalda wrote:
> > > > > Hi Giuliano
> > > > >
> > > > > Usually it is better to ask at the linux-media mailing list
> > > > > https://www.linuxtv.org/lists.php. there is better chance to get an
> > > > > answer and your question will get better chances to get be answered.
> > > > >
> > > > > On Wed, 21 Dec 2022 at 15:14, Giuliano Lotta wrote:
> > > > > >
> > > > > > Hi Laurent,
> > > > > >
> > > > > > I'm using using an ubuntu Ubuntu 22.04.1 LTS on 5.15.0-56-generic
> > > > > >
> > > > > > with an Acer Nitro 5 AN517-55 with Quanta ACER HD User Facing', USB
> > > > > > 0408:4035.
> > > > > >
> > > > > > Currently the camera is not working under linux. The camera works
> > > > > > perfectly on Windows 11 dual boot.
> > > > > >
> > > > > > The camera is reported to have problems on other linux versions:
> > > > > > https://linux-hardware.org/?id=usb:0408-4035
> > > > > >
> > > > > > My console commands report similar info to other users:
> > > > > >
> > https://unix.stackexchange.com/questions/723504/integrated-camera-not-detected-working-on-acer-nitro-5-an515-58
> > > > > >
> > > > > > I see also that there is a proposed fix at
> > > > > >
> > https://patchwork.kernel.org/project/linux-media/patch/20220617235610.321917-9-ribalda@chromium.org/
> > > > >
> > > > > If your error in dmesg is simiar
> > > > >
> > > > > [ 4.629731] uvcvideo 3-6:1.1: Failed to query (129) UVC probe
> > control: 26 (exp. 48).
> > > >
> > > > It looks like your device advertise UVC 1.5 support (as also hinted by
> > > > the availability of the Region of Interest control in the camera input
> > > > terminal) but implements the UVC 1.0a video control. I'm honestly
> > > > puzzled by how abysmal compliance testing seems to be among webcam
> > > > manufacturers. In older days this would have called for beheading with
> > a
> > > > rusty tea spoon, or worse, cursing in them Finnish.
> > > >
> > > > > I am afraid that my patch won't help you much. My patch fixes the way
> > > > > a control can be configured.
> > > > >
> > > > > Can you copy your whole dmesg when you get an error.
> > > >
> > > > That would be useful.
> > > >
> > > > > Also the output of lsusb -v -d 0408:4035
> > > >
> > > > That seems to be available from https://pastebin.com/raw/GQVWC6i3.
> > > >
> > > > Giuliano, could you try the following patch ? You need to apply it to
> > > > the sources of the kernel you're running (available from your
> > > > distribution), and compile the uvcvideo module. Depending on the
> > > > distribution, it may sign kernel modules, in which case you may need to
> > > > recompile the whole kernel. That's a distribution-specific issue that
> > > > you should bring up with your distribution's support channel if you run
> > > > into issues.
> > > >
> > > > diff --git a/drivers/media/usb/uvc/uvc_driver.c
> > > > b/drivers/media/usb/uvc/uvc_driver.c
> > > > index 6abec7a51f47..52e7cae5c249 100644
> > > > --- a/drivers/media/usb/uvc/uvc_driver.c
> > > > +++ b/drivers/media/usb/uvc/uvc_driver.c
> > > > @@ -2447,6 +2447,17 @@ static const struct usb_device_id uvc_ids[] = {
> > > > .bInterfaceSubClass = 1,
> > > > .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
> > > > .driver_info =
> > (kernel_ulong_t)&uvc_ctrl_power_line_limited },
> > > > + /* Quanta ACER HD User Facing */
> > > > + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> > > > + | USB_DEVICE_ID_MATCH_INT_INFO,
> > > > + .idVendor = 0x0408,
> > > > + .idProduct = 0x4035,
> > > > + .bInterfaceClass = USB_CLASS_VIDEO,
> > > > + .bInterfaceSubClass = 1,
> > > > + .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
> > > > + .driver_info = (kernel_ulong_t)&(const struct
> > uvc_device_info) {
> > > > + .uvc_version = 0x010a,
> > > > + } },
> > > > /* LogiLink Wireless Webcam */
> > > > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> > > > | USB_DEVICE_ID_MATCH_INT_INFO,
> > > >
> > > > This may cause side effects, for instance when it comes to handling of
> > > > the power line frequency control or other controls whose implementation
> > > > depend on the UVC version, but we'll worry about that later.
> > > >
> > > > > > Installed linux-source but uvc_driver.c I found in the directory
> > tree
> > > > > > of Ubuntu is different from both :
> > > > > >
> > > > > > -
> > https://github.com/torvalds/linux/blob/master/drivers/media/usb/uvc/uvc_driver.c
> > > > > >
> > > > > > -
> > https://patchwork.kernel.org/project/linux-media/patch/20220617235610.321917-9-ribalda@chromium.org/
> > > > > >
> > > > > >
> > > > > > I would like to test your patch and see if the solution can be
> > > > > > submitted to Ubuntu for the next fix release.
> > > > > >
> > > > > > - Could you give me some instructions on how to proceed ?
> > > > > >
> > > > > > - Should I compile a new whole kernel or just a mod?
> > > > > >
> > > > > > - Where can I find the source to which your fix applies (seems to
> > > > > > apply to something different from Ubuntu and torvald versions) ?
> > > > > > Will it be compatible with the current Ubuntu version?
> > > > > >
> > > > > > - May I ask for some instructions on how to proceed with testing
> > > > > > your fix ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ucv camera fix : tester offering :-)
[not found] ` <CA+Dpmqba0Lo0wpEQYFbd9SUrBGspn44UDn_jqGyJTpf1oYhttg@mail.gmail.com>
@ 2023-01-15 20:47 ` Laurent Pinchart
2023-01-16 8:11 ` Ricardo Ribalda
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2023-01-15 20:47 UTC (permalink / raw)
To: Giuliano Lotta; +Cc: linux-media, Ricardo Ribalda
Hi Giuliano,
(CC'ing linux-media and Ricardo)
On Tue, Jan 10, 2023 at 02:11:54PM +0100, Giuliano Lotta wrote:
> UPDATE:
> after resuming the nobebook, the system crashed with the following message:
>
> usb 3-6: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4)
> uvcvideo 3-6:1.0: reset_resume error -5
>
> WHERE / HOW may I find other useful information to debug the problem ?
That doesn't seem like a crash, but it's not nice. Does the webcam stop
functioning after that ?
Ricardo, the device is a
Bus 003 Device 003: ID 0408:4035 Quanta Computer, Inc. ACER HD User Facing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.01
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0408 Quanta Computer, Inc.
idProduct 0x4035
bcdDevice 0.04
iManufacturer 1 Quanta
iProduct 2 ACER HD User Facing
iSerial 3 01.00.00
bNumConfigurations 1
Does it ring a bell ?
> Il giorno mar 10 gen 2023 alle ore 12:21 Laurent Pinchart ha scritto:
> > On Tue, Jan 10, 2023 at 07:57:21AM +0100, Giuliano Lotta wrote:
> > > Hi Laurent,
> > > I just realized that the VIDOE has NO AUDIO....
> > >
> > > Trying a webcam test site like : https://it.webcamtests.com/
> > > it says that the webcam does not have a microphone.
> > >
> > > Any idea on how to solve this problem ?
> >
> > Well, your webcam does not have a microphone :-) It's integrated in a
> > laptop, so audio is handled through your laptop audio device.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ucv camera fix : tester offering :-)
2023-01-15 20:47 ` Laurent Pinchart
@ 2023-01-16 8:11 ` Ricardo Ribalda
0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Ribalda @ 2023-01-16 8:11 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Giuliano Lotta, linux-media
Hi Laurent
On Sun, 15 Jan 2023 at 21:47, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Giuliano,
>
> (CC'ing linux-media and Ricardo)
>
> On Tue, Jan 10, 2023 at 02:11:54PM +0100, Giuliano Lotta wrote:
> > UPDATE:
> > after resuming the nobebook, the system crashed with the following message:
> >
> > usb 3-6: Failed to query (SET_CUR) UVC control 4 on unit 1: -32 (exp. 4)
> > uvcvideo 3-6:1.0: reset_resume error -5
> >
> > WHERE / HOW may I find other useful information to debug the problem ?
>
> That doesn't seem like a crash, but it's not nice. Does the webcam stop
> functioning after that ?
>
> Ricardo, the device is a
>
> Bus 003 Device 003: ID 0408:4035 Quanta Computer, Inc. ACER HD User Facing
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 2.01
> bDeviceClass 239 Miscellaneous Device
> bDeviceSubClass 2
> bDeviceProtocol 1 Interface Association
> bMaxPacketSize0 64
> idVendor 0x0408 Quanta Computer, Inc.
> idProduct 0x4035
> bcdDevice 0.04
> iManufacturer 1 Quanta
> iProduct 2 ACER HD User Facing
> iSerial 3 01.00.00
> bNumConfigurations 1
>
> Does it ring a bell ?
I could not find anything with 4035 on the ChromeOS componnet database.
Quanta uses different ISPs on their modules, so it is not
straightforward to figure out the ISP vendor :(
>
> > Il giorno mar 10 gen 2023 alle ore 12:21 Laurent Pinchart ha scritto:
> > > On Tue, Jan 10, 2023 at 07:57:21AM +0100, Giuliano Lotta wrote:
> > > > Hi Laurent,
> > > > I just realized that the VIDOE has NO AUDIO....
> > > >
> > > > Trying a webcam test site like : https://it.webcamtests.com/
> > > > it says that the webcam does not have a microphone.
> > > >
> > > > Any idea on how to solve this problem ?
> > >
> > > Well, your webcam does not have a microphone :-) It's integrated in a
> > > laptop, so audio is handled through your laptop audio device.
>
> --
> Regards,
>
> Laurent Pinchart
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-16 8:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CA+DpmqZ1fh=MqEn-G6wb_6yELuPWVTROG2ReUDPJGAAOn7FN9Q@mail.gmail.com>
2022-12-21 20:09 ` ucv camera fix : tester offering :-) Ricardo Ribalda
2022-12-30 19:33 ` Laurent Pinchart
[not found] ` <CA+DpmqZ=v1TwfhnjpaT6ip9L4UnVuE-Cx2cJo0hDNybNhKwu4g@mail.gmail.com>
2023-01-02 12:49 ` Laurent Pinchart
[not found] ` <CA+Dpmqax3M5=a=uPEorx=o2_kaKt_Aj7iXaXHreyjWFLscr+Ng@mail.gmail.com>
2023-01-02 13:25 ` Laurent Pinchart
[not found] ` <CA+DpmqYNK=zLPPRjsqWF-3TgdPHq97tFBGamizrdN1i3xHwAtQ@mail.gmail.com>
[not found] ` <CA+DpmqaVAh8SHhML+4t_MuV4fmZ1HeCaZ9i9B58TRUqpJ2k9VQ@mail.gmail.com>
[not found] ` <Y71KO4ZEwYVSYuvm@pendragon.ideasonboard.com>
[not found] ` <CA+Dpmqba0Lo0wpEQYFbd9SUrBGspn44UDn_jqGyJTpf1oYhttg@mail.gmail.com>
2023-01-15 20:47 ` Laurent Pinchart
2023-01-16 8:11 ` Ricardo Ribalda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox