It seems spontaneous Inotify CLOSE_WRITE events are generated periodically from simply mounting and browsing an AFP share. This leads tools like the Listen Rubygem to report file modifications, which then drains the battery because the test suite is ran way too often.
inotifywait . -m -r -e CLOSE_WRITE -e MODIFY/usr/local/etc/afp.conf:
[dev]
path = /home/user/my_share
$ cd ~/my_share/my_project
$ inotifywait . -m -r -e CLOSE_WRITE -e MODIFY
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
./ CLOSE_WRITE,CLOSE TODO~
./ CLOSE_WRITE,CLOSE Rakefile
./ CLOSE_WRITE,CLOSE TODO
./ CLOSE_WRITE,CLOSE README.md
./ CLOSE_WRITE,CLOSE LICENSE.txt
./ CLOSE_WRITE,CLOSE Gemfile.lock
./ CLOSE_WRITE,CLOSE Guardfile
./ CLOSE_WRITE,CLOSE Gemfile
Some of these seem to happen periodically/sporadically.
I expect to see no CLOSE_WRITE events from browsing.
Netatalk 3.1.12
Ubuntu 20.04
macOS 11.1
inotifywait 3.14
Linux 4.15.0-126-generic #129-Ubuntu SMP Mon Nov 23 18:53:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux