You are not logged in.

#1 2015-08-22 22:54:23

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

udev will only trigger after suspend or resume

Has anyone seen this before?

I'm trying to set up a battery discharge trigger with udev.

udev won't update normally but will only update after a resume from suspend.

Offline

#2 2015-08-23 18:43:18

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: udev will only trigger after suspend or resume

The kernel is not sending power_supply/BAT0/uevent on a frequent basis to report battery level but will only send it where there's a significant change in some state.

Is there any way to get the kernel to report the battery level a little more regularly through uevents?

Offline

#3 2015-08-26 15:37:07

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: udev will only trigger after suspend or resume

Does anyone have any suggestions?

Offline

#4 2015-08-26 15:39:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,659

Re: udev will only trigger after suspend or resume

Which kernel are you using and what are the make and model of the computer?  (Just a WAG, but I am thinking HP)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2015-08-26 15:44:49

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: udev will only trigger after suspend or resume

I've tried the kernels 4.1.0, 4.1.6 (Liquorix) and 4.2.0-rc8.

I have tried this on several different HP machines and under all these system the kernel is reporting changes in power percentages through uevents.

On another similar system I am using now (quite similar to HP), the battery level is updated on a frequent basis which can be seen through acpi or upower but the kernel isn't sending a uevent on a frequent basis for some reason.

Offline

#6 2015-08-26 15:53:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,659

Re: udev will only trigger after suspend or resume

Darn,  I had nothing but trouble with my HP with ACPI system in general.  Everything power related would block when the system was running under load.  Reads from /sys related to power would not return until the system returned to lower loads/temperatures.   I thought your issue might be related.  I found that the 4.2.0 rc4 improved the situation dramatically.  But, you've tried rc8.     Have you considered trying the lts kernel?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2015-08-26 16:02:59

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: udev will only trigger after suspend or resume

I haven't tried any LTS kernel. I consider 4.1.0 to support legacy hardware quite well.

Generally I have found HP to be quite well supported in terms of power management and most other components. I have a habit of using my own pm schemes together with maintaining oversight of the precise modules in use. None of those ready made pm daemons or utilities.

On this occasion however, I wish to understand a little more about the mechanics under which the kernel sends uevents and why that sometimes it doesn't.

I sent an email to the linux-pm list but haven't heard anything back.

Offline

#8 2015-08-26 21:59:33

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: udev will only trigger after suspend or resume

If I do:

echo change | sudo tee /sys/class/power_supply/*/uevent

or even:

sudo udevadm trigger --verbose --subsystem-match=power_supply

then this will trigger the correct event. I'm not understanding why this can't (or won't) be done automatically by the kernel or upower?

Is upower the culprit?

Offline

Board footer

Powered by FluxBB