mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI
@ 2026-10-02 10:18 Abduvaliy Abdulazizov
  2026-10-02 10:37 ` Andy Shevchenko
  2026-10-02 13:22 ` Andy Shevchenko
  0 siblings, 2 replies; 5+ messages in thread
From: Abduvaliy Abdulazizov @ 2026-10-02 10:18 UTC (permalink / raw)
  To: Mika Westerberg, Andy Shevchenko
  Cc: linux-gpio, linux-acpi, Linus Walleij, Bartosz Golaszewski,
	linux-kernel, Abduvaliy Abdulazizov

On the Acer Nitro V 16S AI (ANV16S-41) the internal USB camera
(0408:4035) works on Windows but never shows up on Linux.

The firmware drives GPIO 11 of AMDI0030 high to power the camera. The
same pin is listed in \_SB.GPIO._AEI as an edge-triggered, active-low
wake interrupt whose _EVT case only writes a debug code. gpiolib-acpi
requests _AEI pins as inputs, which clears the output enable bit, so
the camera loses power during boot.

After boot the pin register reads 0x00447a00 (output value 1, output
enable 0, line low). With the xHCI controller kept away from Linux
(pci-stub), the camera port shows CSC=1, CCS=0: the camera was
connected during boot and then dropped off.

Booting with gpiolib_acpi.ignore_interrupt=AMDI0030:00@11 keeps the
camera powered; it enumerates and works with uvcvideo. Add a DMI quirk
so this works out of the box, like the existing one for the Acer
Nitro V 14 on the same pin.

Closes: https://lore.kernel.org/linux-usb/CAPGafdkBb49YFV+d0rYjbi4QjifCUr1Wos6C5TZtDQzN6-pn+g@mail.gmail.com/
Assisted-by: LLM
Signed-off-by: Abduvaliy Abdulazizov <abduvaliy.hbai@gmail.com>
---
 drivers/gpio/gpiolib-acpi-quirks.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpio/gpiolib-acpi-quirks.c b/drivers/gpio/gpiolib-acpi-quirks.c
index a0116f0..5cb0d5f 100644
--- a/drivers/gpio/gpiolib-acpi-quirks.c
+++ b/drivers/gpio/gpiolib-acpi-quirks.c
@@ -343,6 +343,22 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
 			.ignore_interrupt = "AMDI0030:00@11",
 		},
 	},
+	{
+		/*
+		 * GPIO 11 is the power enable of the internal USB camera.
+		 * The firmware drives it high but also lists it in _AEI with
+		 * an empty handler. Requesting it as an input turns the camera
+		 * off, so it never enumerates.
+		 * Found in BIOS V1.14
+		 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_FAMILY, "Acer Nitro V 16S AI"),
+		},
+		.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
+			.ignore_interrupt = "AMDI0030:00@11",
+		},
+	},
 	{
 		/*
 		 * Wakeup only works when keyboard backlight is turned off
-- 
2.55.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI
  2026-10-02 10:18 [PATCH] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI Abduvaliy Abdulazizov
@ 2026-10-02 10:37 ` Andy Shevchenko
       [not found]   ` <CAPGafd=-SfJoVMXtjwpahEkZ8nB9gTjGm+C5WvP+F-AdjsGPjg@mail.gmail.com>
  2026-10-02 13:22 ` Andy Shevchenko
  1 sibling, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2026-10-02 10:37 UTC (permalink / raw)
  To: Abduvaliy Abdulazizov
  Cc: Mika Westerberg, linux-gpio, linux-acpi, Linus Walleij,
	Bartosz Golaszewski, linux-kernel

On Fri, Oct 02, 2026 at 03:18:00PM +0500, Abduvaliy Abdulazizov wrote:
> On the Acer Nitro V 16S AI (ANV16S-41) the internal USB camera
> (0408:4035) works on Windows but never shows up on Linux.
> 
> The firmware drives GPIO 11 of AMDI0030 high to power the camera. The
> same pin is listed in \_SB.GPIO._AEI as an edge-triggered, active-low
> wake interrupt whose _EVT case only writes a debug code. gpiolib-acpi
> requests _AEI pins as inputs, which clears the output enable bit, so
> the camera loses power during boot.
> 
> After boot the pin register reads 0x00447a00 (output value 1, output
> enable 0, line low). With the xHCI controller kept away from Linux
> (pci-stub), the camera port shows CSC=1, CCS=0: the camera was
> connected during boot and then dropped off.
> 
> Booting with gpiolib_acpi.ignore_interrupt=AMDI0030:00@11 keeps the
> camera powered; it enumerates and works with uvcvideo. Add a DMI quirk
> so this works out of the box, like the existing one for the Acer
> Nitro V 14 on the same pin.

While this all sounds legit, I'm worrying that the pin can be used for
something more. For the record, can you share the DSDT table (or entire
`acpidump -o NitroV16S.dat` file) via some file exchanger so we may see
that?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI
       [not found]   ` <CAPGafd=-SfJoVMXtjwpahEkZ8nB9gTjGm+C5WvP+F-AdjsGPjg@mail.gmail.com>
@ 2026-10-02 12:58     ` Andy Shevchenko
  2026-10-02 13:04       ` Mika Westerberg
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2026-10-02 12:58 UTC (permalink / raw)
  To: Abduvaliy Abdulazizov
  Cc: Mika Westerberg, linux-gpio, linux-acpi, Linus Walleij,
	Bartosz Golaszewski, linux-kernel

On Fri, Oct 02, 2026 at 05:17:02PM +0500, Abduvaliy Abdulazizov wrote:
> On Fri, Oct 02, 2026, Andy Shevchenko wrote:
> > On Fri, Oct 02, 2026 at 03:18:00PM +0500, Abduvaliy Abdulazizov wrote:
> > > On the Acer Nitro V 16S AI (ANV16S-41) the internal USB camera
> > > (0408:4035) works on Windows but never shows up on Linux.
> >
> > While this all sounds legit, I'm worrying that the pin can be used for
> > something more. For the record, can you share the DSDT table (or entire
> > `acpidump -o NitroV16S.dat` file) via some file exchanger so we may see
> > that?
> 
> Sure, here is the full acpidump (BIOS V1.14):
> https://github.com/abduvaliy-engineer/acer-nitro-anv16s-camera-fix/releases/download/acpidump-v1.14/NitroV16S.dat
> 
> What I found when going through it:
> 
> - Pin 0x0B shows up only once, in \_SB.GPIO._AEI, as
>   GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone). Its _EVT case
>   only does M000 (0x390B), with no Notify.
> 
> - There is no GpioIo for it, and none of the M009/M010/M011 GPIO helpers
>   are called with 0x0B. The only static mapping of the GPIO bank in the
>   DSDT (OperationRegion GSMG at 0xFED81500) has fields for pins 23 and
>   40 only.
> 
> - The PCIe reset pins in the NVMe SSDTs (RSTM) are computed at runtime
>   from a platform table. Pin 11 is not one of them on this machine: it
>   reads low after Linux takes it, and both NVMe drives keep working.
> 
> So as far as I can see, the firmware drives the pin as an output for the
> camera and lists it in _AEI without a real handler.

Thanks for sharing. I will wait for Mika's tag and apply if he has no
objections.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI
  2026-10-02 12:58     ` Andy Shevchenko
@ 2026-10-02 13:04       ` Mika Westerberg
  0 siblings, 0 replies; 5+ messages in thread
From: Mika Westerberg @ 2026-10-02 13:04 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Abduvaliy Abdulazizov, Mika Westerberg, linux-gpio, linux-acpi,
	Linus Walleij, Bartosz Golaszewski, linux-kernel

On Fri, Oct 02, 2026 at 03:58:22PM +0300, Andy Shevchenko wrote:
> On Fri, Oct 02, 2026 at 05:17:02PM +0500, Abduvaliy Abdulazizov wrote:
> > On Fri, Oct 02, 2026, Andy Shevchenko wrote:
> > > On Fri, Oct 02, 2026 at 03:18:00PM +0500, Abduvaliy Abdulazizov wrote:
> > > > On the Acer Nitro V 16S AI (ANV16S-41) the internal USB camera
> > > > (0408:4035) works on Windows but never shows up on Linux.
> > >
> > > While this all sounds legit, I'm worrying that the pin can be used for
> > > something more. For the record, can you share the DSDT table (or entire
> > > `acpidump -o NitroV16S.dat` file) via some file exchanger so we may see
> > > that?
> > 
> > Sure, here is the full acpidump (BIOS V1.14):
> > https://github.com/abduvaliy-engineer/acer-nitro-anv16s-camera-fix/releases/download/acpidump-v1.14/NitroV16S.dat
> > 
> > What I found when going through it:
> > 
> > - Pin 0x0B shows up only once, in \_SB.GPIO._AEI, as
> >   GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone). Its _EVT case
> >   only does M000 (0x390B), with no Notify.
> > 
> > - There is no GpioIo for it, and none of the M009/M010/M011 GPIO helpers
> >   are called with 0x0B. The only static mapping of the GPIO bank in the
> >   DSDT (OperationRegion GSMG at 0xFED81500) has fields for pins 23 and
> >   40 only.
> > 
> > - The PCIe reset pins in the NVMe SSDTs (RSTM) are computed at runtime
> >   from a platform table. Pin 11 is not one of them on this machine: it
> >   reads low after Linux takes it, and both NVMe drives keep working.
> > 
> > So as far as I can see, the firmware drives the pin as an output for the
> > camera and lists it in _AEI without a real handler.
> 
> Thanks for sharing. I will wait for Mika's tag and apply if he has no
> objections.

No objections,

Acked-by: Mika Westerberg <westeri@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI
  2026-10-02 10:18 [PATCH] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI Abduvaliy Abdulazizov
  2026-10-02 10:37 ` Andy Shevchenko
@ 2026-10-02 13:22 ` Andy Shevchenko
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-10-02 13:22 UTC (permalink / raw)
  To: Mika Westerberg, Abduvaliy Abdulazizov
  Cc: linux-gpio, linux-acpi, Linus Walleij, Bartosz Golaszewski, linux-kernel


On Fri, 02 Oct 2026 15:18:00 +0500, Abduvaliy Abdulazizov wrote:
> On the Acer Nitro V 16S AI (ANV16S-41) the internal USB camera
> (0408:4035) works on Windows but never shows up on Linux.
> 
> The firmware drives GPIO 11 of AMDI0030 high to power the camera. The
> same pin is listed in \_SB.GPIO._AEI as an edge-triggered, active-low
> wake interrupt whose _EVT case only writes a debug code. gpiolib-acpi
> requests _AEI pins as inputs, which clears the output enable bit, so
> the camera loses power during boot.
> 
> [...]

Applied, thanks!

[1/1] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI
      commit: 6da1f3437435c82eaa15b121022474bb358ffe20

Best regards,
-- 
With Best Regards,
Andy Shevchenko





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-02 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 10:18 [PATCH] gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI Abduvaliy Abdulazizov
2026-10-02 10:37 ` Andy Shevchenko
     [not found]   ` <CAPGafd=-SfJoVMXtjwpahEkZ8nB9gTjGm+C5WvP+F-AdjsGPjg@mail.gmail.com>
2026-10-02 12:58     ` Andy Shevchenko
2026-10-02 13:04       ` Mika Westerberg
2026-10-02 13:22 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®