Noble verification:

Installed package from proposed:
root@build-noble:~# apt list powermgmt-base
Listing... Done
powermgmt-base/noble-proposed,now 1.37ubuntu0.1 all [installed,automatic]

Running on_ac_power and unattended upgrades while connected to power:
root@build-noble:~# cat /sys/class/power_supply/AC/online 
1

root@build-noble:~# on_ac_power

root@build-noble:~# echo $?
0

root@build-noble:~# unattended-upgrade --dry-run -v
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=noble, o=Ubuntu,a=noble-security, 
o=UbuntuESMApps,a=noble-apps-security, o=UbuntuESM,a=noble-infra-security
Initial blacklist: 
Initial whitelist (not strict): 
No packages found that can be upgraded unattended and no pending auto-removals
The list of kept packages can't be calculated in dry-run mode.

We can see that the power state is correctly detected and that
unattended upgrades does run.

Testing while on battery:
root@build-noble:~# cat /sys/class/power_supply/AC/online 
0

root@build-noble:~# on_ac_power

root@build-noble:~# echo $?
1

root@build-noble:~# unattended-upgrade --dry-run -v
System is on battery power, stopping


The system correctly detects that it is running on battery and avoids running 
unattended-upgrades

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1980991

Title:
  /usr/sbin/on_ac_power incorrectly reporting ac power status

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/powermgmt-base/+bug/1980991/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to