Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

battery: remove inotify since it doesn't serve much purpose #2704

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

czadowanie
Copy link
Contributor

Inotify reports only events that a user-space program triggers through the filesystem API. As a result, it does not
catch remote events that occur on network filesystems. (Applications must fall back to polling the filesystem to catch
such events.) Furthermore, various pseudo-filesystems such as /proc, /sys, and /dev/pts are not monitorable with inotify.
-- inotify(7) manpage

Relevant issue: #2662

This pull request removes inotify integration for the battery module because inotify can't observe changes to the /sys filesystem when made from the kernel-side. This leads to behaviour where the widget only updates on interval or when something else accesses one of the files (eg. cat /sys/class/power_supply/BAT0/uevent). Now this also means that removing/adding new batteries isn't handled properly.

So maybe the actual solution is to copy whatever upower does or just deprecate the battery module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant