power-button action inconsistent between user session and greeter

Bug #1902898 reported by dann frazier
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-settings (Ubuntu)
Fix Released
Low
Didier Roche-Tolomelli
Focal
Fix Released
Low
Didier Roche-Tolomelli
Hirsute
Fix Released
Low
Didier Roche-Tolomelli

Bug Description

[Impact]
When a user is logged in to the Ubuntu desktop, a power button event will cause the user to be prompted to choose if they'd like to proceed with a shutdown. However, if the system is sitting at a greeter screen, a power button event will instead attempt a suspend w/o prompting. This is due to a different set of defaults for the greeter and the user.
This is a fix for this, aligning all power actions between the greeter behaviour and the user session one on the user session.

[Test Plan]
1. Install new package and reboot
2. On the greeter screen (gdm), press the physical power button of your machine.
3. You should be now prompted about what to do, like shutdown. You can dismiss it.
4. Clicking on the physical suspend button should suspend the machine immediatly.

[Where problems could occur]
We change the scope of when we applied those settings: we were only applying them to the GNOME session ran by the user, and it will now be applied as default to the GNOME session ran by gdm.
Impacts is thus limited to the greeter screen.

Diff is available on this commit: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/ubuntu-settings/commit/?h=focal&id=ca2f9aa9b03862ff044b64d7ef9506ca87e3dd89

------
Original report content:

For a logged-in desktop user, they
see:

$ gsettings get org.gnome.settings-daemon.plugins.power
power-button-action 'interactive'

But the gdm user sees:
$ sudo machinectl shell gdm@ /bin/bash
Connected to the local host. Press ^] three times within 1s to exit session.
gdm:~$ gsettings get org.gnome.settings-daemon.plugins.power power-button-action
'suspend'

Changing the gdm user's setting to "interactive" using gsettings causes the greeter to begin prompting, consistent with the logged in user experience.

dann frazier (dannf)
Changed in ubuntu-settings (Ubuntu Focal):
status: New → Confirmed
Revision history for this message
Iain Lane (laney) wrote :

Issue here I think is that we use per-session overrides for the majority of our Ubuntu customisations, and these don't apply to greeter sessions.

tags: added: rls-hh-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :

is it important enough to justify doing the SRU work?

Changed in ubuntu-settings (Ubuntu Groovy):
status: New → Confirmed
Changed in ubuntu-settings (Ubuntu Hirsute):
status: New → Confirmed
Changed in ubuntu-settings (Ubuntu Focal):
importance: Undecided → Low
Changed in ubuntu-settings (Ubuntu Groovy):
importance: Undecided → Low
Changed in ubuntu-settings (Ubuntu Hirsute):
importance: Undecided → Low
tags: removed: rls-hh-incoming
Changed in ubuntu-settings (Ubuntu Focal):
assignee: nobody → Didier Roche (didrocks)
Changed in ubuntu-settings (Ubuntu Groovy):
assignee: nobody → Didier Roche (didrocks)
Changed in ubuntu-settings (Ubuntu Hirsute):
assignee: nobody → Didier Roche (didrocks)
Changed in ubuntu-settings (Ubuntu Groovy):
status: Confirmed → Incomplete
Changed in ubuntu-settings (Ubuntu Focal):
status: Confirmed → Incomplete
Revision history for this message
dann frazier (dannf) wrote : Re: [Bug 1902898] Re: power-button action inconsistent between user session and greeter

On Tue, Nov 10, 2020 at 7:45 AM Sebastien Bacher
<email address hidden> wrote:
>
> is it important enough to justify doing the SRU work?

From my myopic (server-oriented) point-of-view, changing the default
in 20.04 to prompt is a good idea. I've found that users often install
Ubuntu Desktop on their server-class hardware, using their BMC virtual
KVM as a head. These systems tend to support suspend, but suspend
rarely works well. Some systems will go to sleep just fine - but have
no way to wake them up[*]. Others will try to suspend, only to
immediately come back out of suspend (presumably after trying to sleep
a device that doesn't support it), so it looks like the system failed
to react at all. Both seem like a non-intuitive reaction to an "IPMI
power off soft" command.

[*] https://bugs.launchpad.net/bugs/1862559

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-settings - 21.04.1

---------------
ubuntu-settings (21.04.1) hirsute; urgency=medium

  * debian/ubuntu-settings.gsettings-override:
    - use the same power options between session and greeter. (LP: #1902898)

 -- Didier Roche <email address hidden> Thu, 25 Feb 2021 13:07:54 +0100

Changed in ubuntu-settings (Ubuntu Hirsute):
status: Confirmed → Fix Released
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

We are going to backport it to focal. Groovy, as being EOL in a couple of months, doesn’t work any SRU work, removing the task.

no longer affects: ubuntu-settings (Ubuntu Groovy)
description: updated
Changed in ubuntu-settings (Ubuntu Focal):
status: Incomplete → Triaged
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello dann, or anyone else affected,

Accepted ubuntu-settings into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-settings/20.04.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-settings (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
dann frazier (dannf) wrote :

Verified - I do now get the prompt! Thanks laney & didrocks!

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Dann, please be sure to always include the version number of the package you have tested next time!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-settings - 20.04.6

---------------
ubuntu-settings (20.04.6) focal; urgency=medium

  * debian/ubuntu-settings.gsettings-override:
    - use the same power options between session and greeter. (LP: #1902898)

 -- Didier Roche <email address hidden> Fri, 30 Apr 2021 09:01:06 +0200

Changed in ubuntu-settings (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubuntu-settings has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.