New comment by ahesford on void-packages repository https://github.com/void-linux/void-packages/issues/13024#issuecomment-772626257 Comment: Herewith, a couple of observations: - The write error is not from `stat`, `tr` or anything like that. It's the kernel rejecting the values you're trying to write to `/sys/power/resume`. - The output of the `ls` scrape is *not* the same as that from `stat`. `ls` prints device types in decimal, but `stat` prints hex values: ``` % ls -lH /dev/watchdog crw------- 1 root root 10, 130 Jan 25 23:43 /dev/watchdog % stat /dev/watchdog -c '%t:%T' a:82 ``` - Sometimes these sysfs writes are finicky, and a terminating newline can cause a problem. In the original `ls` scrape, you can try `echo -n` to suppress the new line. In the `stat` version, you can use `tr -d '\n'`.