I'm trying to change the value of /sys/bus/usb/devices/4-3/power/wakeup at every boot (4-3 according to my lsusb, it's the keyboard ID).
The default value is:
# cat /sys/bus/usb/devices/4-3/power/wakeup
enabled
The classic "online" editing works as expected:
# echo disabled > /sys/bus/usb/devices/4-3/power/wakeup
# cat /sys/bus/usb/devices/4-3/power/wakeup
disabled
I'm using a systemd distro so I'd like to use the systemd-way to edit "temp files"
I have created the following file:
# cat /etc/tmpfiles.d/disable-usb-wakeup.conf
w /sys/bus/usb/devices/4-3/power/wakeup - - - - disabled
but after every boot I still have the default value in this file (i.e. enabled)
Am I doing something wrong?
EDIT:
Here another test:
# cat /etc/tmpfiles.d/scheduler.conf
w /sys/block/sda/queue/scheduler - - - - deadline
and this one works fine! After booting I get:
# cat /sys/block/sda/queue/scheduler
noop [deadline] cfq
(the default one was the cfq scheduler)
So, why this one works and the other one doesn't?
- Because
/sys/bus/usb/devices/4-3/power/wakeupis a symlink to/sys/devices/pci0000:00/0000:00:12.1/usb4/4-3/? - Because
/sys/bus/usb/devices/4-3/power/wakeupcontains only one word? (i.e. no spaces)