Stop an AMD Ryzen laptop waking when the charger is plugged in or the lid closes
Re-checked the earlier correction against the Power management/Wakeup triggers wiki (section Ryzen 7000 Series) and the kernel source. AMDI0030:00, the pm_debug_messages method, the GPIO 3 is active: 0x30047ce0 line, pins 2 to 4, the debugfs S0i3/S3 columns and the comma-separated form all hold. drivers/gpio/Makefile builds gpiolib-acpi.o from gpiolib-acpi-core.o and gpiolib-acpi-quirks.o, so the parameter prefix is still gpiolib_acpi, and gpiolib-acpi-quirks.c declares ignore_interrupt as a single charp described as controller@pin[,controller@pin[,...]], which confirms one parameter with commas. The Omarchy 4 branch is right: /usr/lib/limine/limine-common-functions loads /etc/limine-entry-tool.d/*.conf and limine-mkinitcpio rebuilds the UKI. One defect remained in the plain Arch branch: it said a UKI setup only needs mkinitcpio -P, but on plain Arch a UKI takes its command line from /etc/kernel/cmdline (or the preset's options), so the parameter must go there before the rebuild. The fix below changes only that paragraph. This would ideally be a recheck verdict to keep the earlier audit note, but the output schema offers only ok, corrected and reject, so the merge should append rather than replace the note if possible. Not exercised: no affected hardware and no cmdline change here.
Ignoring the wrong GPIO pin can disable a real function wired to it, such as the lid switch or a button. Ignore only the pin the debug log names, and check that lid close and the power button still work afterwards.
Symptom
My AMD Ryzen 7000-series laptop wakes straight back up after suspend, or wakes from s2idle when I plug in the charger or close the lid. Disabling USB wakeups in /proc/acpi/wakeup changes nothing. With PM debug messages on, dmesg shows a line like GPIO 3 is active: 0x30047ce0.
Cause
On some Ryzen 7000-series systems the GPIO controller AMDI0030:00 raises a redundant interrupt on certain pins during suspend, which the kernel treats as a wake event. Which pins depends on the model, usually 2, 3 or 4. The workaround is to have the kernel ignore those pins' interrupts with gpiolib_acpi.ignore_interrupt.
Fix
**1. Find the pin** responsible:
echo 1 | sudo tee /sys/power/pm_debug_messages
systemctl suspend
# after it wakes:
sudo dmesg | grep -E 'GPIO [0-9]+ is active'
For more detail, mount debugfs and look for pins with entries in the S0i3 and S3 columns:
sudo mount -t debugfs none /sys/kernel/debug 2>/dev/null
sudo cat /sys/kernel/debug/gpio
**2. Ignore those pins** on the kernel command line. Use one gpiolib_acpi.ignore_interrupt= parameter and list the pins in it separated by commas, for example gpiolib_acpi.ignore_interrupt=AMDI0030:00@2,AMDI0030:00@3. Do not repeat the parameter once per pin.
Omarchy 4 (Limine and UKI, the command line is built into the UKI), for pin 3:
printf '%s\n' 'KERNEL_CMDLINE[default]+=" gpiolib_acpi.ignore_interrupt=AMDI0030:00@3"' \
| sudo tee /etc/limine-entry-tool.d/gpio-wake.conf
sudo limine-mkinitcpio
Plain Arch with GRUB: add gpiolib_acpi.ignore_interrupt=AMDI0030:00@3 to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, then run sudo grub-mkconfig -o /boot/grub/grub.cfg. Plain Arch with a UKI built by mkinitcpio: append the parameter to the single line in /etc/kernel/cmdline (or to the file your preset's default_options names), then run sudo mkinitcpio -P. Other bootloaders: add it to the entry's options line.
Reboot, then turn the debug messages back off:
echo 0 | sudo tee /sys/power/pm_debug_messages
Verify
cat /proc/cmdline contains gpiolib_acpi.ignore_interrupt=. A suspend stays suspended, and plugging in the charger no longer wakes it.