Ref.: Reddit
Tested with Gygabyte B550M AORUS ELITE BIOS Version: F20d
First of all, create a file called disable-wakeup.service at /etc/systemd/system/
with the content below:
[Unit]
Description=Desabilita dispositivos que acordam o sistema
After=suspend.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo GPP0 > /proc/acpi/wakeup'
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
After creating the file, you should enable the service:
sudo systemctl daemon-reexec
sudo systemctl enable disable-wakeup.service