You are not logged in.

#1 2016-10-02 04:23:34

Sergei82
Member
Registered: 2015-03-15
Posts: 5

incorrect info from /sys/class/power_supply/*/uevent

Every time i do "cat /sys/class/power_supply/*/uevent" it shows same info regardless of ac connector plugged in or out.
My system is hp 4530s (notebook), output from "uname -r":4.4.22-1-lts (pacman's standard).
What may be the problem?

Offline

#2 2016-10-02 05:02:48

onslow77
Member
Registered: 2014-09-21
Posts: 283

Re: incorrect info from /sys/class/power_supply/*/uevent

Hello!

You need to write your own udev rule.

Here are two resources I recomend you start with:
- Arch udev wiki
- Writing udevs rules A guide by "Daniel Drake" with good examples of udevs rules.

Regards
Martin

Last edited by onslow77 (2016-10-02 05:12:04)

Offline

#3 2016-10-02 07:03:03

Sergei82
Member
Registered: 2015-03-15
Posts: 5

Re: incorrect info from /sys/class/power_supply/*/uevent

How udev rule may help if the information from system files remain unchanged? The answer is irrelevant to the question.

Last edited by Sergei82 (2016-10-02 07:15:39)

Offline

#4 2016-10-02 11:22:23

ayekat
Member
Registered: 2011-01-17
Posts: 1,626

Re: incorrect info from /sys/class/power_supply/*/uevent

Could you elaborate on what your uevent files looks like? Is the information wrong when the power supply is plugged, or when it's unplugged?


pkgshackscfgblag

Offline

#5 2016-10-02 18:06:42

Sergei82
Member
Registered: 2015-03-15
Posts: 5

Re: incorrect info from /sys/class/power_supply/*/uevent

Starting "sudo udevadm monitor" with plugged in connector shows this:
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

while it is running i unplug connector and the console reads as this:
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

This is what i am talking about, the info feed remain unchanged.

Last edited by Sergei82 (2016-10-02 18:09:03)

Offline

#6 2016-10-06 09:19:10

Sergei82
Member
Registered: 2015-03-15
Posts: 5

Re: incorrect info from /sys/class/power_supply/*/uevent

Silence is the answer...

Offline

#7 2016-10-06 15:25:01

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,038

Re: incorrect info from /sys/class/power_supply/*/uevent

That that probably counts for a "bump", check dmesg (notably grep for ACPI and tail it when plugging around)
Also, is this a regression?
Check for the loaded acpi module and google for errata.
And post the contents of the uevent file, ayekat probably wanted to know whether it's locked ever or with system start (ie. does it differ when booting w/ and w/o plugged AC)

To rule out the obvious: the system runs fine on AC and battery and the battery is loaded, yesno?

Offline

#8 2016-10-07 06:41:08

ayekat
Member
Registered: 2011-01-17
Posts: 1,626

Re: incorrect info from /sys/class/power_supply/*/uevent

Sergei82 wrote:

Silence is the answer...

I'm sorry, I could've replied at least - I just don't really have any idea.

I was wondering whether it fails to simply detect one state or the other (given that the file's content doesn't change).
Otherwise seth might be right: perhaps it gets stuck in whatever state it is during bootup.

For `udevadm monitor`, do at least other udev events (e.g. backlight brightness changes, ...) get printed?

Last edited by ayekat (2016-10-07 06:41:33)


pkgshackscfgblag

Offline

Board footer

Powered by FluxBB