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

lm_battery.sh executes for too long #138

Open
l29ah opened this issue Feb 3, 2019 · 4 comments
Open

lm_battery.sh executes for too long #138

l29ah opened this issue Feb 3, 2019 · 4 comments

Comments

@l29ah
Copy link

l29ah commented Feb 3, 2019

ACPI produces battery events every 2s or so, while /etc/acpi/actions/lm_battery.sh can execute for about ten seconds, causing the other ACPI events to pile up and causing huge delays for things like udev permission setup for USB devices. Occurred to me on Thinkpad X201, X230 and X210 on Gentoo.

@rickysarraf
Copy link
Owner

This seriously is a problem with your machine. The events shouldn't generate that often.

As for laptop-mode-tools, yes, your run time could be a couple of seconds. On reasonable hardware, I have profiled it to the average of 5 seconds. But with low end hardware with slow disk drives, this could spike.

But, laptop-mode-tools does have locking in place which lets it honor only 1 additional event in its queue during its runtime. All other events are ignored/dropped. But as is your case (or 2 second events), it would still be like a stream of events.

This is still a problem with your hardware. A sane machine does not generate events that often. Can you share what class of events are generated ?

@rickysarraf
Copy link
Owner

Your best option is to purge acpi and rely on udev instead.

@l29ah
Copy link
Author

l29ah commented Feb 5, 2019

battery PNP0C0A:03 00000080 00000001

@l29ah
Copy link
Author

l29ah commented Feb 5, 2019

Now i'm on X210, i'm not really sure about the others as i can't test them now with enabled event logging.

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

No branches or pull requests

2 participants