I use keyboard G913 in the lightspeed mode(a mode used to connect to pc wireless similar to bluetooth but muck quicker.)
But the mode will wake up the pc after suspend immediately ?
So is there a way to shut down the keyboard before run suspend command and wake up the pc by mouse click/moving, and then restart the keyboard too
I don’t know if there is another systemd cleaner way, but you could have (on startup) somewhere that executes: echo disabled | sudo tee /sys/bus/usb/devices/<KEYBOARD-ID>/power/wakeup
Do you have Wake-on-LAN enabled in the BIOS/(U)EFI settings? Not that this should be affected by WiFi unless the machine also supports keeping that awake, somehow. It’s just an idea.
All I can suggest is changing the mode before suspend, then change it back when resumed. I guess that might be fiddly though.
I have a keyboard which does the same thing. If I pull the plug immediately after pressing the Sleep key (on the keyboard) it stays off until I plug it in again.