Bug 1005234
Summary: | Suspend / Hibernate don't work in MATE on fedora 20 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dan Mashal <dan.mashal> |
Component: | mate-session-manager | Assignee: | Dan Mashal <dan.mashal> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 20 | CC: | christoph.wickert, dan.mashal, fedora, funtoos, gregor, rdieter, stefano |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | mate-session-manager-1.6.1-3.fc20 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-09-22 23:55:39 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dan Mashal
2013-09-06 13:34:49 UTC
Steps to reproduce: 1) Install MATE Desktop or Cinnamon 2) Go to system -> shutdown -> no option to hibernate or standby Oh, you mean suspend/hibernate doesn't work when logged into mate or cinnamon, when using lightdm? I can suspend/hibernate just fine from lightdm-gtk itself. At least, how I tested, was installing f20-alpha-tc4 kde live image, then yum install lightdm-gtk systemctl enable lightdm --force reboot, suspend options show and work in lightdm-gtk greeter menu. And, as a bonus, I can suspend from within my kde session, logged in from lightdm too. tested gnome too. Now, tried sddm + mate session, still no suspend. Pretty sure this is not a lightdm issue, reassigning to mate-power-manager for now. Rex, i'm pretty shure you forgot to update this report. This bug affected all DE's (mate, cinnamon, xfce, gnome, etc), what is confirmed by me and Leigh for cinnamon, so it has nothing to do with mate-power-manager. To be clarify this issue: Suspend/hibernate from inside lightdm works fine in f20. But it doesn't work from inside any DE exept KDE which use qdbus commands for suspend/hibernate. Fwiw, I tested gnome, and it worked for me (closing lid), there's apparently no UI way without using an extention. Since, qdbus --system org.freedesktop.login1 /org/freedesktop/login1 org.feedesktop.login1.Manager.CanSuspend returned 'yes', for me, in the MATE session, I can only conclude, based on the evidence so far, that mate-power-manager methods for checking this over dbus aren't working for whatever reason. and, checking just now, in xfce, xfce4-power-manager shows suspend/hibernate options (that work as advertised), for me. testing Cinnamon, assuming it is supposed to show suspend option from the menu near or with either Quit or Leave , then I can confirm it doesn't work either. (In reply to Rex Dieter from comment #7) > Fwiw, I tested gnome, and it worked for me (closing lid), there's apparently > no UI way without using an extention. Suspend on lid close works also in MATE, but i see no suspend/hibernate in gnome/cinnamon logout popup window. > > Since, > qdbus --system org.freedesktop.login1 /org/freedesktop/login1 > org.feedesktop.login1.Manager.CanSuspend > > returned 'yes', for me, in the MATE session, I can only conclude, based on > the evidence so far, that mate-power-manager methods for checking this over > dbus aren't working for whatever reason. In the end i can solve this issue with adding command and desktop-file for dbus-send --system --print-reply --dest="org.freedesktop.login1" /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend boolean:true for mate menus if nothing helps. (In reply to Rex Dieter from comment #9) > testing Cinnamon, assuming it is supposed to show suspend option from the > menu near or with either Quit or Leave , then I can confirm it doesn't work > either. I don't thing that cinnamon shows this in the menu normaly, it's like in mate that a window pop up which shows this options. ~think OK, I can confirm Cinnamon lid close=>suspend works too. So, IMO, we're down to what appears to be a bug in the mate/cinnamon UI's not showing the suspend (and friends) options properly. agree with mate/cinnamon/gnome. I'm still wondering that it works now in xfce because it was definitely not working some weeks ago on my system, maybe cwickert knows about a change in xfce. This is confusing since nothing changed (afaik) from Fedora 19 -> 20. Just lightdm. Does this still work on F19? Wolfgang, I guess the only way to resolve this is with the patch you mentioned and we should submit that patch upstream. (In reply to Dan Mashal from comment #15) > This is confusing since nothing changed (afaik) from Fedora 19 -> 20. Just > lightdm. > > Does this still work on F19? In f19 everthing works fine. > > Wolfgang, I guess the only way to resolve this is with the patch you > mentioned and we should submit that patch upstream. This is the last solution for me if anything else helps, and can be done very quickly. After talking with Stefano, suspend and hybernate are handled from mate-session-manager, which use ck and systemd. There is a check for upower inside the code for hybernate/suspend. But systemd and upower was working fine together until f20. ah, that's the problem. Remember, upower is deprecated for this purpose. As a matter of fact, no longer works in f20: $ qdbus --system org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.CanSuspend false $ qdbus --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanSuspend yes Interestingly, found UPower.SuspendAllowed method. On f20: $ qdbus --system org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.SuspendAllowed Error: org.freedesktop.UPower.GeneralError Method is deprecated, please port to org.freedesktop.login1.Manager.CanSuspend On f19: $ qdbus --system org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.SuspendAllowed true Digging more, according to, http://upower.freedesktop.org/docs/UPower.html Seems my prior interpretation of UPower.CanSuspend was incorrect. It only checks if the system supports suspend, not whether it's allowed by policy. The policy check is SuspendAllowed login1's CanSuspend does both: http://www.freedesktop.org/wiki/Software/systemd/logind/ "CanPowerOff(), CanReboot(), CanSuspend(), CanHibernate(), CanHybridSleep() tests whether the system supports the respective operation and whether the calling user is eligible for the desired operation." So long and short of it is that basically still can't rely on UPower here, need to use systemd-login1 native calls to make this work right. With a huge help from infirit our friend from gentoo we could track down the issue. It is upower related. mate-session-manager needs upower for suspend and friends. See https://github.com/mate-desktop/mate-session-manager/blob/master/mate-session/gsm-manager.c#L3190 https://github.com/mate-desktop/mate-session-manager/blob/master/mate-session/gsm-manager.c#L1106 http://git.mate-desktop.org/mate-session-manager/tree/mate-session/gsm-logout-dialog.c#n200 But upower-0.9.21 is build without --enable-deprecated configure flag and runtime require pm-utils for f20. A rebuild with that flag gives me the suspend/hibernation option back. Tested with mate/cinnamon/xfce, only in gnome-3 i have no suspend/hibernation options. koji scratch build for testing. http://koji.fedoraproject.org/koji/taskinfo?taskID=5907874 Seems like we spoken about the same :) The better/long-term fix is to simply port to use the proper org.freedesktop.login1 methods, and not rely on deprecated upower stuff, imho. mate-session-manager-1.6.1-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mate-session-manager-1.6.1-3.fc20 Package mate-session-manager-1.6.1-3.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mate-session-manager-1.6.1-3.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-16262/mate-session-manager-1.6.1-3.fc20 then log in and leave karma (feedback). Thanks Rex mate-session-manager-1.6.1-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. Ah...I finally found the solution to my problems on Gentoo. Thank you so much Wolfgang! I am basically running Gentoo with openrc as init and I had tough time figuring out why suspend was not allowed. My debugging/comments/rants at: http://forums.gentoo.org/viewtopic-p-7457320.html |