Fix a desktop that wakes 1-2 seconds after suspending (GPP/NVMe PCIe bridge)
Real problem, and the udev rule is right. Two defects in the systemd unit: (a) /proc/acpi/wakeup is a toggle, so a unit that unconditionally echoes GPP0 at every boot will re-ARM the wake source on any boot where firmware already left it disabled, which is the exact bug it is meant to fix, intermittently, and (b) the unit has no Type=oneshot/RemainAfterExit=yes, so systemd treats it as a simple service that exits immediately and systemctl status will show it as dead/failed-looking. Description="..." also keeps the literal quotes in systemd unit syntax. The udev rule already does this idempotently and correctly, so the unit is redundant. If kept, it must be made conditional.
A blanket rule such as SUBSYSTEM=="pci", DRIVER=="pcieport", ATTR{power/wakeup}="disabled" disables wakeup on every PCIe port, which breaks Wake-on-LAN and wake-from-dock.
Symptom
Desktop suspends (monitor goes off, case RGB stays lit), then it wakes again after a second or two, or it never comes back and needs a hard power off. Common on Gigabyte B550/A520, ASRock B850 AM5 and MSI X870 boards.
Cause
The PCIe root port bridging the NVMe drive (GPP0, GPP1) or the xHCI controller (XH00) has ACPI wakeup armed and generates a spurious wake event immediately after entering the sleep state.
Fix
Diagnose the same way:
cat /proc/acpi/wakeup
Toggle it for the current session, but only for a device whose Status column currently reads *enabled, and verify, since the write flips rather than sets:
sudo sh -c 'echo GPP0 > /proc/acpi/wakeup'
grep '^GPP0' /proc/acpi/wakeup # must now read *disabled
systemctl suspend
For persistence prefer the udev rule (idempotent, no toggle hazard). Get KERNEL from the Sysfs node column with the pci: prefix removed:
# /etc/udev/rules.d/90-fix-wakeup.rules
ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:00:01.1", ATTR{power/wakeup}="disabled"
sudo udevadm control --reload-rules && sudo udevadm trigger --subsystem-match=pci
If you really want a unit instead, it must be oneshot and must check the current state before toggling:
# /etc/systemd/system/disable-gpp0-wakeup.service
[Unit]
Description=Disable GPP0 ACPI wakeup to fix instant resume
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c 'grep -q "^GPP0.*\\*enabled" /proc/acpi/wakeup && echo GPP0 > /proc/acpi/wakeup; exit 0'
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now disable-gpp0-wakeup.service
Do not install both the udev rule and an unconditional unit, because the second one can toggle the first one's fix back on.
Verify
cat /proc/acpi/wakeup | grep GPP0 shows *disabled, and systemctl suspend keeps the machine asleep for more than a minute.