Automatic update precondition check bug?

Hello,

I have been using bazzite with satisfaction since the beginning of the year, but I have noticed that my system never updates automatically as it should.

I have always had to use ujust update for updates. Not a big deal since I previously used tumbleweed for years.

Today, however, I decided to investigate since I had some free time and digging into the update service logs I noticed that it fails pre-update checks.

this is the log from yesterday and today

journalctl -u ublue-update.service --since yesterday
mar 18 19:18:47 theone systemd[1]: Starting ublue-update.service - Universal Blue Update Oneshot Service...
mar 18 19:18:49 theone ublue-update[6642]: [2025-03-18 19:18:49,998] ublue_update.update_checks.system:INFO | System update availabl>
mar 18 19:18:49 theone ublue-update[6642]: [2025-03-18 19:18:49,999] ublue_update.update_inhibitors.custom:INFO | System passed cust>
mar 18 19:18:49 theone ublue-update[6642]: [2025-03-18 19:18:49,999] ublue_update.cli:INFO | Precondition checks failed, but update >
mar 18 19:18:50 theone ublue-update[6642]: Traceback (most recent call last):
mar 18 19:18:50 theone ublue-update[6642]:   File "/usr/bin/ublue-update", line 8, in <module>
mar 18 19:18:50 theone ublue-update[6642]:     sys.exit(main())
mar 18 19:18:50 theone ublue-update[6642]:              ~~~~^^
mar 18 19:18:50 theone ublue-update[6642]:   File "/usr/lib/python3.13/site-packages/ublue_update/cli.py", line 229, in main
mar 18 19:18:50 theone ublue-update[6642]:     inhibitor_checks_failed(
mar 18 19:18:50 theone ublue-update[6642]:     ~~~~~~~~~~~~~~~~~~~~~~~^
mar 18 19:18:50 theone ublue-update[6642]:         failures,
mar 18 19:18:50 theone ublue-update[6642]:         ^^^^^^^^^
mar 18 19:18:50 theone ublue-update[6642]:     ...<2 lines>...
mar 18 19:18:50 theone ublue-update[6642]:         cli_args.system,
mar 18 19:18:50 theone ublue-update[6642]:         ^^^^^^^^^^^^^^^^
mar 18 19:18:50 theone ublue-update[6642]:     )
mar 18 19:18:50 theone ublue-update[6642]:     ^
mar 18 19:18:50 theone ublue-update[6642]:   File "/usr/lib/python3.13/site-packages/ublue_update/cli.py", line 83, in inhibitor_che>
mar 18 19:18:50 theone ublue-update[6642]:     raise Exception(f"update failed to pass checks: \n - {exception_log}")
mar 18 19:18:50 theone ublue-update[6642]: Exception: update failed to pass checks:
mar 18 19:18:50 theone ublue-update[6642]:  - Battery less than 20.0%
mar 18 19:18:50 theone systemd[1]: ublue-update.service: Main process exited, code=exited, status=1/FAILURE
mar 18 19:18:50 theone systemd[1]: ublue-update.service: Failed with result 'exit-code'.
mar 18 19:18:50 theone systemd[1]: Failed to start ublue-update.service - Universal Blue Update Oneshot Service.

journalctl -u ublue-update.service --since today
mar 19 05:36:10 theone systemd[1]: Starting ublue-update.service - Universal Blue Update Oneshot Service...
mar 19 05:36:12 theone ublue-update[8849]: [2025-03-19 05:36:12,924] ublue_update.update_checks.system:INFO | No system update avail>
mar 19 05:36:12 theone ublue-update[8849]: [2025-03-19 05:36:12,925] ublue_update.update_inhibitors.custom:INFO | System passed cust>
mar 19 05:36:12 theone ublue-update[8849]: Traceback (most recent call last):
mar 19 05:36:12 theone ublue-update[8849]:   File "/usr/bin/ublue-update", line 8, in <module>
mar 19 05:36:12 theone ublue-update[8849]:     sys.exit(main())
mar 19 05:36:12 theone ublue-update[8849]:              ~~~~^^
mar 19 05:36:12 theone ublue-update[8849]:   File "/usr/lib/python3.13/site-packages/ublue_update/cli.py", line 229, in main
mar 19 05:36:12 theone ublue-update[8849]:     inhibitor_checks_failed(
mar 19 05:36:12 theone ublue-update[8849]:     ~~~~~~~~~~~~~~~~~~~~~~~^
mar 19 05:36:12 theone ublue-update[8849]:         failures,
mar 19 05:36:12 theone ublue-update[8849]:         ^^^^^^^^^
mar 19 05:36:12 theone ublue-update[8849]:     ...<2 lines>...
mar 19 05:36:12 theone ublue-update[8849]:         cli_args.system,
mar 19 05:36:12 theone ublue-update[8849]:         ^^^^^^^^^^^^^^^^
mar 19 05:36:12 theone ublue-update[8849]:     )
mar 19 05:36:12 theone ublue-update[8849]:     ^
mar 19 05:36:12 theone ublue-update[8849]:   File "/usr/lib/python3.13/site-packages/ublue_update/cli.py", line 83, in inhibitor_che>
mar 19 05:36:12 theone ublue-update[8849]:     raise Exception(f"update failed to pass checks: \n - {exception_log}")
mar 19 05:36:12 theone ublue-update[8849]: Exception: update failed to pass checks:
mar 19 05:36:12 theone ublue-update[8849]:  - Battery less than 20.0%
mar 19 05:36:12 theone systemd[1]: ublue-update.service: Main process exited, code=exited, status=1/FAILURE
mar 19 05:36:12 theone systemd[1]: ublue-update.service: Failed with result 'exit-code'.
mar 19 05:36:12 theone systemd[1]: Failed to start ublue-update.service - Universal Blue Update Oneshot Service.

you can see in yesterday’s log the available update which I then did manually.

But both condition checks fail reporting that the battery is below 20%.
The fact is that I don’t have a battery ^^. The pc is a mid tower desktop.

Has this happened to anyone else ?
Is there anything I can intervene on manually to remedy the battery check (which doesn’t exist) ?

The bazzite version is the stable desktop with kde without the steam gamemode.

Thanks in advance to those who will intervene in the thread.

I dug a little more…

I don’t want to sound arrogant but I think the problem is in the battery control python script.

for some reson doesn’t return null on the function check.
debugged the code with vscode and this is what happens:

Questions is … Can i safely remove the battery check in the python script ?


def check_hardware_inhibitors() -> bool:
    hardware_inhibitors = [
        check_network_status(),
        check_network_not_metered(),
        #check_battery_status(),
        check_cpu_load(),
        check_mem_percentage(),
    ]

    failures = []
    hardware_checks_failed = False
    for inhibitor_result in hardware_inhibitors:
        if not inhibitor_result["passed"]:
            hardware_checks_failed = True
            failures.append(inhibitor_result["message"])
    if not hardware_checks_failed:
        log.info("System passed hardware checks")
    return hardware_checks_failed, failures

or does this file get overwritten with updates ?

I think I have unraveled the mystery.
The check detects the headset battery.


now i have turned them on the update service looks fine.

Starting ublue-update.service - Universal Blue Update Oneshot Service...
mar 19 17:38:13 theone ublue-update[114303]: [2025-03-19 17:38:13,482] ublue_update.update_checks.system:INFO | No system update available.
mar 19 17:38:13 theone ublue-update[114303]: [2025-03-19 17:38:13,483] ublue_update.update_inhibitors.hardware:INFO | System passed hardware checks
mar 19 17:38:13 theone ublue-update[114303]: [2025-03-19 17:38:13,483] ublue_update.update_inhibitors.custom:INFO | System passed custom checks
mar 19 17:38:13 theone ublue-update[114303]: [2025-03-19 17:38:13,483] ublue_update.cli:INFO | System passed all update checks
mar 19 17:38:16 theone flatpak[114391]: libostree pull from 'flathub' for app/org.signal.Signal/x86_64/stable complete
                                        security: GPG: summary+commit 
                                        security: SIGN: disabled http: TLS
                                        delta: parts: 1 loose: 3
                                        transfer: secs: 0 size: 5,0 kB
mar 19 17:38:16 theone flatpak[114391]: system: Pulled app/org.signal.Signal/x86_64/stable from flathub
mar 19 17:38:16 theone flatpak[114391]: system: Updated app/org.signal.Signal/x86_64/stable from flathub
mar 19 17:38:20 theone ublue-update[114303]: [2025-03-19 17:38:20,051] ublue_update.cli:INFO | Running update for user: 'matteo'
mar 19 17:38:20 theone ublue-update[114303]: [2025-03-19 17:38:20,060] ublue_update.cli:INFO | System update complete
mar 19 17:38:20 theone systemd[1]: ublue-update.service: Deactivated successfully.
mar 19 17:38:20 theone systemd[1]: Finished ublue-update.service - Universal Blue Update Oneshot Service.

However, the fact remains that with headset off, the auto update stops working.
And I tried editing the python script but of course the file system is read-only and it won’t let me do it.

Is there any way to isolate/remove the check ?

Can you file an issue on this so someone can take a look?

All right :slight_smile: