The udev rule added in apt MR !547 (https://salsa.debian.org/apt-
team/apt/-/merge_requests/547, debian/61-apt.rules, shipped in apt
3.2.0) never fires on laptops whose AC adapter isn't named "AC". The
name comes from the ACPI firmware. Mine is ADP1, and others use names
like ACAD or ADP0.
Matching on the type instead of the name fixes that:
-ACTION=="change", SUBSYSTEM=="power_supply", KERNEL=="AC", ATTR{online}=="1",
TAG+="systemd", ENV{SYSTEMD_WANTS}+="apt-daily.service"
+ACTION=="change", SUBSYSTEM=="power_supply", ATTR{type}=="Mains",
ATTR{online}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}+="apt-daily.service"
Tested with the charger plugged in: "udevadm test --action=change
/sys/class/power_supply/ADP1" sets SYSTEMD_WANTS=apt-daily.service with
the new rule, and nothing with the current one.
I've applied for a Salsa account and will open a merge request once it's
approved, unless someone beats me to it.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2089151
Title:
apt-daily and apt-daily-upgrade may never actually run
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2089151/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs