Intel NUC unattended-upgrades battery power error

Solution 1:

I don't know why your system believes it is on battery, but it looks like unattended-upgrades calls the external command on_ac_power to determine if on battery.

The command on_ac_power is just a fairly basic shell script, so you might be able to walk through it and figure out why it is returning the wrong value.

As a workaround, you can add to your apt configuration this setting that will tell unattended-upgrades to continue when on battery.

Unattended-Upgrade::OnlyOnACPower "false";