GNOME Bugzilla – Bug 689721
power off / log out fixes
Last modified: 2012-12-05 19:59:29 UTC
Ryan noticed his log out was powering off and his power off was logging out. The former is caused by a power off getting called unconditinally in the wrong place, and the latter is caused by a infinite recursion crasher before power off has a chance to get called. A side effect of these patches is a fix for a 5 second timeout in the systemd power off code path.
Created attachment 230798 [details] [review] manager: when system prepared, start next phase, don't re-end current phase We currently end_phase the QUERY_END_SESSION phase multiple times. The apparent intent of the code is to start the END_SESSION phase, not re-end the QUERY_END_SESSSION phase so this commit fixes that. The bug manifests as an infinite loop.
Created attachment 230799 [details] [review] manager: call complete_shutdown in better place The code currently unconditionally calls complete_shutdown at the bottom of the END_SESSION phase. This means it gets called at logout time, and ConsoleKit users will get power off at logout time. This commit moves it to be called in place of the superfluous calls to attempt_stop/attempt_restart in gsm_manager_quit (which runs at the proper time, during the EXIT phase, and has checks to exclude the LOGOUT case)
Review of attachment 230798 [details] [review]: fine with me
Review of attachment 230799 [details] [review]: sure
Attachment 230798 [details] pushed as 962df1a - manager: when system prepared, start next phase, don't re-end current phase Attachment 230799 [details] pushed as 8b187ec - manager: call complete_shutdown in better place