Bug 2411715

Summary: Power off action (including PackageKit offline updates) is broken when system inhibitor is active?
Product: [Fedora] Fedora Reporter: Joran Martinière <flatline>
Component: gnome-sessionAssignee: Debarshi Ray <debarshir>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 43CC: adscvr, ales.astone, andreas.gruber, avovk, debarshir, fmuellner, gnome-sig, jadahl, kde-sig, mcatanza, mclasen, mcrha, ngompa13, otaylor, philip.wyett, rhughes, rstrode, tpopela
Target Milestone: ---Keywords: AutomationTriaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gnome-session-49.2-1.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-11-29 16:48:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch none

Description Joran Martinière 2025-11-01 11:04:48 UTC
After upgrading to Fedora 43, updating software on power off is not working properly.

Reproducible: Always

Steps to Reproduce:
1. Downgrade a random package using dnf on the commandline
2. Download the update again using gnome-software
3. Use the gnome-shell menu to click on Power Off...
4. Leave the box asking to update the system ticked and confirm
Actual Results:
The system does nothing, and when I click on the Power Off... option again, the system shuts without updating.
When trying to boot up again, the system updates and then shuts down again.

Expected Results:
The system should shut down, boot up again for the offline update, and then power off again.

Comment 1 Milan Crha 2025-11-03 12:55:07 UTC
Thanks for a bug report. These things are done partly on the gnome-shell side, and mostly on the PackageKit side, thus I move this to the PackageKit for further investigation.

For the record, what is your PackageKit, gnome-shell and gnome-software version, please?

Comment 2 Joran Martinière 2025-11-04 17:44:58 UTC
Thanks,

PackageKit is 1.3.1
gnome-shell is 49.1
gnome-software is 49.1

Comment 3 Milan Crha 2025-11-10 15:07:12 UTC
Tested with older PackageKit (1.2.8-14) and no dice, thus moving to gnome-shell. Restart works fine, Power Off not.

Comment 4 Fedora Admin user for bugzilla script actions 2025-11-10 15:07:21 UTC
Bug reports for this component on Red Hat Bugzilla are not actively monitored. Please consider reporting your issue directly to GNOME at https://gitlab.gnome.org/GNOME/ to improve the chances that your issue will be resolved. This issue should only be kept open if it:

1. Relates to Fedora packaging or integration with other Fedora components
2. Is required for Fedora release processes, such as blocker bugs and freeze exceptions

If this issue isn't needed for either of these two reasons, please:

 * create an issue with GNOME
 * add a link to the GNOME issue here
 * close this issue as CLOSED/UPSTREAM

Thank you!

Comment 5 Michael Catanzaro 2025-11-10 15:31:19 UTC
In https://discussion.fedoraproject.org/t/fedora-43-workstation-wont-shut-down-if-apply-pending-updates-is-selected/171023/16 we have more or less confirmed that this regression is related to systemd inhibitors. The power off action breaks when an inhibitor is present. Something regressed in either systemd or gnome-session -- not sure which -- between F42 and F43. We need to identify which component regressed, bisect if needed, and revert the offending commit.

Power off can break even when there is no prepared update at all. It's not related to PackageKit.

Comment 6 Milan Crha 2025-11-10 16:22:43 UTC
The gnome-session received a loooot of changes.

Comment 7 Milan Crha 2025-11-10 16:32:03 UTC
From the discussion link:

> GsmManager: Shell confirmed unexpected logout type

The gnome-shell changes "ConfirmedShutdown" to "ConfirmedReboot" when the checkbox to install pending updates is checked and the user confirms the power off [1]. The above quoted error message might mean the gnome-session expected a confirmation for "shutdown", but received "reboot". The machine does shutdown after the reboot, the shutdown is done by the PackageKit (or dnf5) after it installs the updates.

I do not know how these things work in the gnome-shell, the less in the gnome-session, I do not even see how they are interconnected (JavaScript is not my language). Adrian may hopefully know.

[1] https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/53bf921bd398d824116441ebd3fa12129cb1eb9b/js/ui/endSessionDialog.js#L504

Comment 8 Milan Crha 2025-11-10 17:03:55 UTC
Created attachment 2113719 [details]
proposed patch

The error message appeared at commit [2], basically forcing expected logout type, where the previous code used the logout type which was passed to it. The attached change restores the previous behaviour in the gnome-session code, but please note that I do not know what I'm doing here, I do not know the consequences of the change, it really only restores the previous behaviour.

[2] https://gitlab.gnome.org/GNOME/gnome-session/-/commit/2ef8d6d232c2e32bc4fbe27dd8a7900a94dcc4a2

Comment 10 Milan Crha 2025-11-25 08:02:03 UTC
*** Bug 2416832 has been marked as a duplicate of this bug. ***

Comment 11 Fedora Update System 2025-11-25 16:14:39 UTC
FEDORA-2025-bafaf4af3a (gnome-session-49.2-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-bafaf4af3a

Comment 12 Fedora Update System 2025-11-26 01:42:56 UTC
FEDORA-2025-bafaf4af3a has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-bafaf4af3a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-bafaf4af3a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2025-11-29 16:48:17 UTC
FEDORA-2025-bafaf4af3a (gnome-session-49.2-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.