[Xfce-bugs] [Bug 9952] UPower >= 0.99.0 no longer does hibernate and suspend
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Sun Aug 31 22:08:06 CEST 2014
https://bugzilla.xfce.org/show_bug.cgi?id=9952
--- Comment #31 from Eric Koegel <eric at xfce.org> ---
(In reply to Samuli Suominen from comment #30)
> (In reply to Eric Koegel from comment #29)
> > In xfsm_shutdown_try_suspend the logic is:
> > SystemD ? use LoginD suspend
> > Upower < 0.99 ? use Upower suspend
> > Otherwise lock the screen and call pkexec xfsm-shutdown-helper --suspend
> >
> > http://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfsm-shutdown.
> > c#n312
> >
> > Same for hibernate. I've been testing with a system that has consolekit +
> > upower git master (it calls itself 0.99.2). Or is this for systems without
> > polkit installed (or polkit-gobject-1 which is used for the fallback instead
> > of sudo)? Just trying to figure out where it's gone wrong so we can fix it.
> >
> > Does pkaction --action-id org.xfce.session.xfsm-shutdown-helper -v return
> > anything?
>
> The target system where I *assumed* the committed patch wouldn't work is
> with active ConsoleKit session, working PolicyKit, no systemd, UPower 0.99.1
> (or git, no real difference in this regard, as in, just UPower with no
> hibernate and suspend capabilities) -- a system, where I expect Hibernate
> and Suspend buttons to do direct pm-* command calls like the patch in
> Comment #24 does
>
> So, sorry, I didn't actually had chance to test it out yet, but I just can't
> see the code that calls pm-suspend anywhere
Well for that case:
xfsm_shutdown_try_suspend
http://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfsm-shutdown.c#n312
xfsm_upower_lock_screen (which just ends up calling xflock4 and ignoring the
other stuff)
http://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfsm-upower.c#n289
xfsm_shutdown_fallback_try_action XFSM_SHUTDOWN_SUSPEND
http://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfsm-shutdown.c#n242
pkexec " XFSM_SHUTDOWN_HELPER_CMD " --%s", action
http://git.xfce.org/xfce/xfce4-session/tree/xfsm-shutdown-helper/main.c#n86
#define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/pm-suspend"
#define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/pm-hibernate"
Which gets used in:
http://git.xfce.org/xfce/xfce4-session/tree/xfsm-shutdown-helper/main.c#n218
That is assuming your PC can suspend and you are authorized to suspend,
http://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfsm-shutdown.c#n577
http://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/xfsm-shutdown.c#n667
Once everyone has migrated to UPower 1.0 we can actually remove all the upower
stuff from xfsm since it doesn't do anything anymore. But that could be several
years down the road.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Xfce-bugs
mailing list