понедельник

[Bug 2171468] [NEW] Power button does not generate KEY_POWER on HP ZBook Power 16 G11 A (AMD GPIO0 / ACPI0011 gpio-keys)

Public bug reported: # Power button does not generate KEY_POWER on HP ZBook Power 16 G11 A (AMD GPIO0 / ACPI0011 gpio-keys) ## Summary On the HP ZBook Power 16 inch G11 A (AMD Ryzen 7 8845HS), pressing the power button while the system is running does nothing under Linux. The GPIO interrupt fires on every press/release, but the `gpio-keys` input device created by `soc_button_array` for `ACPI0011` never emits any `EV_KEY` event, so neither systemd-logind nor GNOME ever see `KEY_POWER`. The same behaviour is observed on Ubuntu 24.04, Ubuntu 26.04 and Fedora. Under Windows on the same machine the power button works normally. ## Hardware / software | Item | Value | |---|---| | Vendor / Product | HP ZBook Power 16 inch G11 A Mobile Workstation PC | | Board | 8C95 | | SKU | A25C8PC#AB2 | | CPU | AMD Ryzen 7 8845HS w/ Radeon 780M Graphics (Hawk Point) | | BIOS | HP W85 Ver. 01.11.01 (07/06/2026) | | Distro | Ubuntu 26.04.1 LTS (also reproduced on Ubuntu 24.04 and Fedora) | | Kernel | 7.0.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC | | systemd | 259 (259.5-0ubuntu3.4) | | Desktop | GNOME Shell 50.1, Wayland | ## ACPI topology - `\_SB_.PWRB` (PNP0C0C, standard ACPI power button): `_STA = 0` (disabled by firmware), so no "Power Button" input device is created by the ACPI button driver. There is no `LNXPWRBN` fixed power button either. - `\_SB_.BTNS` (ACPI0011, Generic Buttons Device): `_STA = 0x0B`. `soc_button_array` binds it and creates: ``` input: gpio-keys as /devices/platform/ACPI0011:00/gpio-keys.1.auto/input/input7 N: Name="gpio-keys" H: Handlers=kbd event5 B: EV=3 B: KEY=10000000000000 0 # only KEY_POWER (116) ``` - The button is wired to AMD GPIO pin 0 (`pinctrl_amd`, AMDI0030): ``` 50: ... amd_gpio 0 power ``` - udev tags `event5` with `power-switch`, and systemd-logind logs `Watching system buttons on /dev/input/event5 (gpio-keys)`. ## Observations 1. Every press of the power button increments IRQ 50 by exactly 2 (press + release edge). No interrupt storm; the counter is stable when idle. | Test | IRQ 50 count | EV_KEY events on /dev/input/event5 | |---|---|---| | 3 short presses | 58 -> 64 | 0 | | 2 short presses | 64 -> 68 | 0 | | 2 presses held ~1 s | 68 -> 72 | 0 | Events were read directly from `/dev/input/event5` as root (raw `struct input_event`), so this is independent of logind/GNOME. 2. `/sys/kernel/debug/gpio` for pin #0, identical before and after the presses: ``` GPIO bank0 #0 😛| b| edge| | | |⏰| | ↑ |input ↑| |0x8151c00 ``` Decoding 0x08151c00 (pinctrl-amd layout): - ACTIVE_LEVEL = both edges, LEVEL_TRIG = edge - INTERRUPT_ENABLE = 1, INTERRUPT_MASK = 1 (unmasked) - WAKECNTRL_Z set - PIN_STS = 1 (high), PULL_UP = 1 - **Debounce: none programmed** The pin status reads high (released) in every sample. It appears that the level that `gpio_keys` samples (via `gpiod_get_value_cansleep()` in the debounce work) never reflects the pressed state, so `gpio_keys_gpio_report_event()` always reports the same value and the input core drops it as a duplicate. 3. `key 116` is not listed in `disabled_keys` of `gpio-keys.1.auto`. 4. Workaround proof: a userspace loop polling `/proc/interrupts` for IRQ 50 and calling `gnome-session-quit --power-off` on increment works reliably, which confirms the interrupt itself is delivered correctly on every press. ## Expected behaviour Pressing the power button emits `KEY_POWER` press/release on the gpio-keys input device, as it does on Windows (where the button opens the shutdown/sleep action configured by the user). ## Possibly related upstream discussion - "[PATCH 0/3] pinctrl-amd powerbtn handling regression" (Aug 2023) – AMD GPIO0 power button debounce / Windows-certification bit: https://lists.openwall.net/linux-kernel/2023/08/29/1216 - "Revert 'Input: soc_button_array - debounce the buttons'" (Jun 2025) – ACPI0011 power button on AMD, debounce handling in gpio_keys vs pinctrl-amd: https://lkml.iu.edu/2506.3/03268.html Possible directions (for maintainers to judge): for GPIO0 on AMD the hardware power-button logic may own the pin state, so gpio_keys might need to treat this button as IRQ-only (report press on interrupt and synthesize release), or soc_button_array / pinctrl-amd may need a DMI quirk for this platform. ## Additional data available on request - `sudo acpidump > acpidump.txt` (full ACPI tables incl. DSDT / `\_SB_.BTNS`) - full `dmesg`, `/sys/kernel/debug/gpio`, `/proc/interrupts` - testing of patched kernels ProblemType: Bug DistroRelease: Ubuntu 26.04 Package: linux-image-7.0.0-38-generic 7.0.0-38.38 ProcVersionSignature: Ubuntu 7.0.0-38.38-generic 7.0.14 Uname: Linux 7.0.0-38-generic x86_64 ApportVersion: 2.34.1-0ubuntu0.1 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC1: machao 4397 F.... wireplumber /dev/snd/controlC0: machao 4397 F.... wireplumber /dev/snd/seq: machao 4377 F.... pipewire CasperMD5CheckMismatches: ./boot/grub/i386-pc/boot.mod ./boot/grub/i386-pc/bufio.mod ./boot/grub/i386-pc/crypto.mod ./boot/grub/i386-pc/extcmd.mod ./boot/grub/i386-pc/gettext.mod ./boot/grub/i386-pc/normal.mod ./boot/grub/i386-pc/terminal.mod CasperMD5CheckResult: fail CurrentDesktop: ubuntu:GNOME Date: Tue Oct 20 14:45:24 2026 InstallationDate: Installed on 2026-10-20 (0 days ago) InstallationMedia: Ubuntu 26.04.1 LTS "Resolute Raccoon" - Release amd64 (20260826) MachineType: HP HP ZBook Power 16 inch G11 A Mobile Workstation PC ProcEnviron: LANG=zh_CN.UTF-8 PATH=(custom, no user) SHELL=/bin/bash TERM=xterm-256color XDG_RUNTIME_DIR=<set> ProcFB: 0 amdgpudrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-38-generic root=UUID=805fbf1c-db3d-4300-b6c8-f57590f9239b ro quiet splash crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 07/06/2026 dmi.bios.release: 11.1 dmi.bios.vendor: HP dmi.bios.version: W85 Ver. 01.11.01 dmi.board.name: 8C95 dmi.board.vendor: HP dmi.board.version: KBC Version 08.53.00 dmi.chassis.type: 10 dmi.chassis.vendor: HP dmi.ec.firmware.release: 8.83 dmi.modalias: dmi:bvnHP:bvrW85Ver.01.11.01:bd07/06/2026:br11.1:efr8.83:svnHP:pnHPZBookPower16inchG11AMobileWorkstationPC:pvrSBKPFV3:rvnHP:rn8C95:rvrKBCVersion08.53.00:cvnHP:ct10:cvr:skuA25C8PC#AB2:pfa103C_5336ANHPZBook: dmi.product.family: 103C_5336AN HP ZBook dmi.product.name: HP ZBook Power 16 inch G11 A Mobile Workstation PC dmi.product.sku: A25C8PC#AB2 dmi.product.version: SBKPFV3 dmi.sys.vendor: HP ** Affects: linux (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug resolute wayland-session -- You received this bug notification because you are subscribed to linux in Ubuntu. Matching subscriptions: Bgg, Bmail, Nb https://bugs.launchpad.net/bugs/2171468 Title: Power button does not generate KEY_POWER on HP ZBook Power 16 G11 A (AMD GPIO0 / ACPI0011 gpio-keys) Status in linux package in Ubuntu: New Bug description: # Power button does not generate KEY_POWER on HP ZBook Power 16 G11 A (AMD GPIO0 / ACPI0011 gpio-keys) ## Summary On the HP ZBook Power 16 inch G11 A (AMD Ryzen 7 8845HS), pressing the power button while the system is running does nothing under Linux. The GPIO interrupt fires on every press/release, but the `gpio-keys` input device created by `soc_button_array` for `ACPI0011` never emits any `EV_KEY` event, so neither systemd-logind nor GNOME ever see `KEY_POWER`. The same behaviour is observed on Ubuntu 24.04, Ubuntu 26.04 and Fedora. Under Windows on the same machine the power button works normally. ## Hardware / software | Item | Value | |---|---| | Vendor / Product | HP ZBook Power 16 inch G11 A Mobile Workstation PC | | Board | 8C95 | | SKU | A25C8PC#AB2 | | CPU | AMD Ryzen 7 8845HS w/ Radeon 780M Graphics (Hawk Point) | | BIOS | HP W85 Ver. 01.11.01 (07/06/2026) | | Distro | Ubuntu 26.04.1 LTS (also reproduced on Ubuntu 24.04 and Fedora) | | Kernel | 7.0.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC | | systemd | 259 (259.5-0ubuntu3.4) | | Desktop | GNOME Shell 50.1, Wayland | ## ACPI topology - `\_SB_.PWRB` (PNP0C0C, standard ACPI power button): `_STA = 0` (disabled by firmware), so no "Power Button" input device is created by the ACPI button driver. There is no `LNXPWRBN` fixed power button either. - `\_SB_.BTNS` (ACPI0011, Generic Buttons Device): `_STA = 0x0B`. `soc_button_array` binds it and creates: ``` input: gpio-keys as /devices/platform/ACPI0011:00/gpio-keys.1.auto/input/input7 N: Name="gpio-keys" H: Handlers=kbd event5 B: EV=3 B: KEY=10000000000000 0 # only KEY_POWER (116) ``` - The button is wired to AMD GPIO pin 0 (`pinctrl_amd`, AMDI0030): ``` 50: ... amd_gpio 0 power ``` - udev tags `event5` with `power-switch`, and systemd-logind logs `Watching system buttons on /dev/input/event5 (gpio-keys)`. ## Observations 1. Every press of the power button increments IRQ 50 by exactly 2 (press + release edge). No interrupt storm; the counter is stable when idle. | Test | IRQ 50 count | EV_KEY events on /dev/input/event5 | |---|---|---| | 3 short presses | 58 -> 64 | 0 | | 2 short presses | 64 -> 68 | 0 | | 2 presses held ~1 s | 68 -> 72 | 0 | Events were read directly from `/dev/input/event5` as root (raw `struct input_event`), so this is independent of logind/GNOME. 2. `/sys/kernel/debug/gpio` for pin #0, identical before and after the presses: ``` GPIO bank0 #0 😛| b| edge| | | |⏰| | ↑ |input ↑| |0x8151c00 ``` Decoding 0x08151c00 (pinctrl-amd layout): - ACTIVE_LEVEL = both edges, LEVEL_TRIG = edge - INTERRUPT_ENABLE = 1, INTERRUPT_MASK = 1 (unmasked) - WAKECNTRL_Z set - PIN_STS = 1 (high), PULL_UP = 1 - **Debounce: none programmed** The pin status reads high (released) in every sample. It appears that the level that `gpio_keys` samples (via `gpiod_get_value_cansleep()` in the debounce work) never reflects the pressed state, so `gpio_keys_gpio_report_event()` always reports the same value and the input core drops it as a duplicate. 3. `key 116` is not listed in `disabled_keys` of `gpio-keys.1.auto`. 4. Workaround proof: a userspace loop polling `/proc/interrupts` for IRQ 50 and calling `gnome-session-quit --power-off` on increment works reliably, which confirms the interrupt itself is delivered correctly on every press. ## Expected behaviour Pressing the power button emits `KEY_POWER` press/release on the gpio-keys input device, as it does on Windows (where the button opens the shutdown/sleep action configured by the user). ## Possibly related upstream discussion - "[PATCH 0/3] pinctrl-amd powerbtn handling regression" (Aug 2023) – AMD GPIO0 power button debounce / Windows-certification bit: https://lists.openwall.net/linux-kernel/2023/08/29/1216 - "Revert 'Input: soc_button_array - debounce the buttons'" (Jun 2025) – ACPI0011 power button on AMD, debounce handling in gpio_keys vs pinctrl-amd: https://lkml.iu.edu/2506.3/03268.html Possible directions (for maintainers to judge): for GPIO0 on AMD the hardware power-button logic may own the pin state, so gpio_keys might need to treat this button as IRQ-only (report press on interrupt and synthesize release), or soc_button_array / pinctrl-amd may need a DMI quirk for this platform. ## Additional data available on request - `sudo acpidump > acpidump.txt` (full ACPI tables incl. DSDT / `\_SB_.BTNS`) - full `dmesg`, `/sys/kernel/debug/gpio`, `/proc/interrupts` - testing of patched kernels ProblemType: Bug DistroRelease: Ubuntu 26.04 Package: linux-image-7.0.0-38-generic 7.0.0-38.38 ProcVersionSignature: Ubuntu 7.0.0-38.38-generic 7.0.14 Uname: Linux 7.0.0-38-generic x86_64 ApportVersion: 2.34.1-0ubuntu0.1 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC1: machao 4397 F.... wireplumber /dev/snd/controlC0: machao 4397 F.... wireplumber /dev/snd/seq: machao 4377 F.... pipewire CasperMD5CheckMismatches: ./boot/grub/i386-pc/boot.mod ./boot/grub/i386-pc/bufio.mod ./boot/grub/i386-pc/crypto.mod ./boot/grub/i386-pc/extcmd.mod ./boot/grub/i386-pc/gettext.mod ./boot/grub/i386-pc/normal.mod ./boot/grub/i386-pc/terminal.mod CasperMD5CheckResult: fail CurrentDesktop: ubuntu:GNOME Date: Tue Oct 20 14:45:24 2026 InstallationDate: Installed on 2026-10-20 (0 days ago) InstallationMedia: Ubuntu 26.04.1 LTS "Resolute Raccoon" - Release amd64 (20260826) MachineType: HP HP ZBook Power 16 inch G11 A Mobile Workstation PC ProcEnviron: LANG=zh_CN.UTF-8 PATH=(custom, no user) SHELL=/bin/bash TERM=xterm-256color XDG_RUNTIME_DIR=<set> ProcFB: 0 amdgpudrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-38-generic root=UUID=805fbf1c-db3d-4300-b6c8-f57590f9239b ro quiet splash crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 07/06/2026 dmi.bios.release: 11.1 dmi.bios.vendor: HP dmi.bios.version: W85 Ver. 01.11.01 dmi.board.name: 8C95 dmi.board.vendor: HP dmi.board.version: KBC Version 08.53.00 dmi.chassis.type: 10 dmi.chassis.vendor: HP dmi.ec.firmware.release: 8.83 dmi.modalias: dmi:bvnHP:bvrW85Ver.01.11.01:bd07/06/2026:br11.1:efr8.83:svnHP:pnHPZBookPower16inchG11AMobileWorkstationPC:pvrSBKPFV3:rvnHP:rn8C95:rvrKBCVersion08.53.00:cvnHP:ct10:cvr:skuA25C8PC#AB2:pfa103C_5336ANHPZBook: dmi.product.family: 103C_5336AN HP ZBook dmi.product.name: HP ZBook Power 16 inch G11 A Mobile Workstation PC dmi.product.sku: A25C8PC#AB2 dmi.product.version: SBKPFV3 dmi.sys.vendor: HP To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2171468/+subscriptions

Комментариев нет:

Отправить комментарий