https://bugzilla.kernel.org/show_bug.cgi?id=201607

            Bug ID: 201607
           Summary: Lenovo ThinkPad X1 Yoga 2nd: No uevent for AC
                    plug/unplug
           Product: ACPI
           Version: 2.5
    Kernel Version: 4.18.10
          Hardware: x86-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Power-Battery
          Assignee: acpi_power-batt...@kernel-bugs.osdl.org
          Reporter: cfswo...@gmail.com
        Regression: No

Created attachment 279299
  --> https://bugzilla.kernel.org/attachment.cgi?id=279299&action=edit
udevadm monitor for disconnecting/reconnecting AC

Hello!

I'm not getting any uevent for disconnecting/reconnecting the power cable on my
laptop. However, `/sys/class/power_supply/AC/online` is always correctly
reflecting the current state, so I believe this is only a uevent issue.

The main symptom of having a missing uevent is that upower never refreshes the
AC supply status, therefore it continues to believe the AC status is the same
as at power-on, and if I powered on my laptop with the AC power connected, it
will fail to notify me of/take action for a low battery.

The battery sends uevents properly; so, I have worked around this issue for the
time being with the following udev rule:

`SUBSYSTEM=="power_supply", ACTION=="change", RUN+="/usr/bin/dbus-send
--print-reply --system --dest=org.freedesktop.UPower
/org/freedesktop/UPower/devices/line_power_AC
org.freedesktop.UPower.Device.Refresh"`

I have attached the output of `udevadm monitor` to demonstrate the missing
uevent.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to