Freedombox does not update due to wrongly thinking it is on battery power

I installed freedombox on a debian trixie install on Rockpro64.

I notice that freedombox is not getting updates, unless I run them manually in a terminal with sudo apt upgrade. I tried running updates from the GUI, but the system did not get updated.

From the GUI, when I check to see the journal, I see:

==> unattended-upgrades.log
2025-09-01 06:57:13,998 WARNING System is on battery power, stopping
2025-09-01 16:02:38,380 WARNING System is on battery power, stopping
2025-09-02 02:00:12,779 WARNING System is on battery power, stopping
2025-09-02 06:27:04,981 WARNING System is on battery power, stopping
2025-09-02 07:51:18,277 WARNING System is on battery power, stopping
2025-09-03 03:05:28,265 WARNING System is on battery power, stopping
2025-09-03 06:57:29,624 WARNING System is on battery power, stopping
2025-09-03 16:31:48,954 WARNING System is on battery power, stopping
2025-09-03 23:31:23,061 WARNING System is on battery power, stopping
2025-09-04 06:59:10,978 WARNING System is on battery power, stopping
2025-09-04 09:36:34,796 WARNING System is on battery power, stopping
2025-09-04 22:38:39,123 WARNING System is on battery power, stopping
2025-09-05 06:03:41,933 WARNING System is on battery power, stopping
2025-09-05 14:41:06,220 WARNING System is on battery power, stopping
2025-09-05 20:06:39,310 WARNING System is on battery power, stopping
2025-09-06 06:26:13,429 WARNING System is on battery power, stopping
2025-09-06 16:13:19,612 WARNING System is on battery power, stopping
2025-09-07 01:49:27,500 WARNING System is on battery power, stopping
2025-09-07 06:56:34,930 WARNING System is on battery power, stopping
2025-09-07 07:51:36,086 WARNING System is on battery power, stopping
2025-09-08 03:31:15,423 WARNING System is on battery power, stopping
2025-09-08 06:35:46,913 WARNING System is on battery power, stopping
2025-09-08 12:48:58,857 WARNING System is on battery power, stopping

==> unattended-upgrades-dpkg.log

I found Bug #1980991 “/usr/sbin/on_ac_power incorrectly reporting ac pow...” : Bugs : powermgmt-base package : Ubuntu which made me try:

$ on_ac_power
$ $ echo $?
1

From the man page on a computer running Trisquel (based on Ubuntu, without non-free software):

EXIT STATUS
       0 (true)  System is on mains power
       1 (false) System is not on mains power
       255 (false)    Power status could not be determined

Also

$ sudo unattended-upgrade --dry-run -v
System is on battery power, stopping

So it seems the system belives it is not on mains power, hence why unattended-upgrade does not make update.

Is it a known Debian bug? (I could not find anything). Is there a workaround?

You could uninstall the powermgmt-base package. Because it is a “recommends” but not a strict dependency, you should be able to remove this package without any issue.

Thanks for the advice. I did that and started an update from the GUI.

After more than 12h, the GUI says the freedombox package was updgraded from 25.9 to 25.10, but it also says that an upgrade is ongoing. I hope everything will be eventually ok.

EDIT: Here is some extracts of the journal right now:

sept. 09 10:23:37 debian /usr/bin/plinth[498829]: Running regular setup.
sept. 09 10:23:37 debian /usr/bin/plinth[498829]: Running setup for apps, essential - False, selected apps - ['config', 'email']
sept. 09 10:23:37 debian /usr/bin/plinth[498829]: Operation: config: Updating app: added
sept. 09 10:23:37 debian /usr/bin/plinth[498829]: Operation: config: Updating app: running
sept. 09 10:23:37 debian /usr/bin/plinth[498829]: Setup run: config
sept. 09 10:23:37 debian /usr/bin/plinth[498829]: » plinth..update() 
sept. 09 10:23:37 debian freedombox-privileged[498879]: Received request for plinth..update(..)
sept. 09 10:23:37 debian /usr/bin/freedombox-privileged[498879]: Received request for plinth..update(..)
sept. 09 10:23:45 debian /usr/bin/plinth[498829]: » plinth..is_package_manager_busy() 
sept. 09 10:23:45 debian freedombox-privileged[498879]: Received request for plinth..is_package_manager_busy(..)
sept. 09 10:23:45 debian /usr/bin/freedombox-privileged[498879]: Received request for plinth..is_package_manager_busy(..)
sept. 09 10:23:45 debian /usr/bin/plinth[498829]: Setup completed: config: Error updating app: {exception} Package manager is busy
sept. 09 10:23:45 debian /usr/bin/plinth[498829]: Error running setup - Package manager is busy
sept. 09 10:23:45 debian /usr/bin/plinth[498829]: Unable to complete setup: Package manager is busy
sept. 09 10:23:45 debian /usr/bin/plinth[498829]: Will try again in 10 seconds
sept. 09 10:23:55 debian /usr/bin/plinth[498829]: Running regular setup.
sept. 09 10:23:55 debian /usr/bin/plinth[498829]: Running setup for apps, essential - False, selected apps - ['config', 'email']
sept. 09 10:23:55 debian /usr/bin/plinth[498829]: Operation: config: Updating app: added
sept. 09 10:23:55 debian /usr/bin/plinth[498829]: Operation: config: Updating app: running
sept. 09 10:23:55 debian /usr/bin/plinth[498829]: Setup run: config
sept. 09 10:23:55 debian /usr/bin/plinth[498829]: » plinth..update() 
sept. 09 10:23:55 debian freedombox-privileged[498879]: Received request for plinth..update(..)
sept. 09 10:23:55 debian /usr/bin/freedombox-privileged[498879]: Received request for plinth..update(..)
sept. 09 10:24:03 debian /usr/bin/plinth[498829]: » plinth..is_package_manager_busy() 
sept. 09 10:24:03 debian freedombox-privileged[498879]: Received request for plinth..is_package_manager_busy(..)
sept. 09 10:24:03 debian /usr/bin/freedombox-privileged[498879]: Received request for plinth..is_package_manager_busy(..)
sept. 09 10:24:04 debian /usr/bin/plinth[498829]: Setup completed: config: Error updating app: {exception} Package manager is busy
sept. 09 10:24:04 debian /usr/bin/plinth[498829]: Error running setup - Package manager is busy
sept. 09 10:24:04 debian /usr/bin/plinth[498829]: Unable to complete setup: Package manager is busy
sept. 09 10:24:04 debian /usr/bin/plinth[498829]: Will try again in 10 seconds
sept. 09 10:24:14 debian /usr/bin/plinth[498829]: Running regular setup.
sept. 09 10:24:14 debian /usr/bin/plinth[498829]: Running setup for apps, essential - False, selected apps - ['config', 'email']
sept. 09 10:24:14 debian /usr/bin/plinth[498829]: Operation: config: Updating app: added
sept. 09 10:24:14 debian /usr/bin/plinth[498829]: Operation: config: Updating app: running
sept. 09 10:24:14 debian /usr/bin/plinth[498829]: Setup run: config
sept. 09 10:24:14 debian /usr/bin/plinth[498829]: » plinth..update() 
sept. 09 10:24:14 debian freedombox-privileged[498879]: Received request for plinth..update(..)
sept. 09 10:24:14 debian /usr/bin/freedombox-privileged[498879]: Received request for plinth..update(..)
sept. 09 10:24:22 debian /usr/bin/plinth[498829]: » plinth..is_package_manager_busy() 
sept. 09 10:24:22 debian freedombox-privileged[498879]: Received request for plinth..is_package_manager_busy(..)
sept. 09 10:24:22 debian /usr/bin/freedombox-privileged[498879]: Received request for plinth..is_package_manager_busy(..)
sept. 09 10:24:22 debian /usr/bin/plinth[498829]: Setup completed: config: Error updating app: {exception} Package manager is busy
sept. 09 10:24:22 debian /usr/bin/plinth[498829]: Error running setup - Package manager is busy
sept. 09 10:24:22 debian /usr/bin/plinth[498829]: Unable to complete setup: Package manager is busy
sept. 09 10:24:22 debian /usr/bin/plinth[498829]: Will try again in 10 seconds
sept. 09 10:24:32 debian /usr/bin/plinth[498829]: Running regular setup.
sept. 09 10:24:32 debian /usr/bin/plinth[498829]: Running setup for apps, essential - False, selected apps - ['config', 'email']
sept. 09 10:24:32 debian /usr/bin/plinth[498829]: Operation: config: Updating app: added
sept. 09 10:24:32 debian /usr/bin/plinth[498829]: Operation: config: Updating app: running
sept. 09 10:24:32 debian /usr/bin/plinth[498829]: Setup run: config
sept. 09 10:24:32 debian /usr/bin/plinth[498829]: » plinth..update() 
sept. 09 10:24:32 debian freedombox-privileged[498879]: Received request for plinth..update(..)
sept. 09 10:24:32 debian /usr/bin/freedombox-privileged[498879]: Received request for plinth..update(..)
sept. 09 10:24:41 debian /usr/bin/plinth[498829]: » plinth..is_package_manager_busy() 
sept. 09 10:24:41 debian freedombox-privileged[498879]: Received request for plinth..is_package_manager_busy(..)
sept. 09 10:24:41 debian /usr/bin/freedombox-privileged[498879]: Received request for plinth..is_package_manager_busy(..)
sept. 09 10:24:41 debian /usr/bin/plinth[498829]: Setup completed: config: Error updating app: {exception} Package manager is busy
sept. 09 10:24:41 debian /usr/bin/plinth[498829]: Error running setup - Package manager is busy
sept. 09 10:24:41 debian /usr/bin/plinth[498829]: Unable to complete setup: Package manager is busy
sept. 09 10:24:41 debian /usr/bin/plinth[498829]: Will try again in 10 seconds
sept. 09 10:24:51 debian /usr/bin/plinth[498829]: Running regular setup.
sept. 09 10:24:51 debian /usr/bin/plinth[498829]: Running setup for apps, essential - False, selected apps - ['config', 'email']
sept. 09 10:24:51 debian /usr/bin/plinth[498829]: Operation: config: Updating app: added
sept. 09 10:24:51 debian /usr/bin/plinth[498829]: Operation: config: Updating app: running
sept. 09 10:24:51 debian /usr/bin/plinth[498829]: Setup run: config
sept. 09 10:24:51 debian /usr/bin/plinth[498829]: » plinth..update() 
sept. 09 10:24:51 debian freedombox-privileged[498879]: Received request for plinth..update(..)

When I look for apt processes, sometimes there is none, sometimes there is one whose PPID is 498829, sometimes there are two, one with 498829 as PPID and the other with the first apt process as PPID. The command listed is apt-get --assume-yes --quiet=2 update.

That gives me the impression that plinth is repeteadly trying something that does not work, som there might be some issue.

EDIT 2: I rebooted, killed some process, then the installation of postfix completed and I did a bit of cleanup manually. Apparently, I had a full desktop environment on that machine, I had run tasksel and unselected it, but it had not removed it. After I removed desktop-base and ran autoremove, it seems to be removed now.