You have two issues:
1. issue:
The problem is USB number e.g. “3-2.1” that can be randomly changed after many reboots.
How to fix 1. issue:
You need to get idVendor and idProduct, they are the identity of your device.
Run $ lsusb to display idVendor and idProduct of your device.
2. issue:
Your script of systemd service is run once after reboot and works. But it does not work when you disconnect and reconnect your mouse without rebooting, because the USB setting of the mouse is reset after reconnecting the USB port.
How to fix 2. issue:
Create a udev-rule script /etc/udev/rules.d/90-disable-mouse.rules
:
XXXX is idVendor.
YYYY is idProduct.
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", ATTR{../power/wakeup}="disabled"
or
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", RUN+="/bin/sh -c 'echo disabled > /sys/$env{DEVPATH}/../power/wakeup'"
Run $ sudo mkinitcpio -P and reboot.
That works after reconnecting the USB port of your device to disable wakeup.
Attention: The solution works for mkinitcpio.