------- Comment From nasas...@in.ibm.com 2017-09-19 01:35 EDT-------
Tested this on latest libvirtd 3.6.0 and I am not seeing the issue.

# gdbus call --system --dest org.freedesktop.login1 --object-path
/org/freedesktop/login1 --method
org.freedesktop.login1.Manager.CanSuspend('yes',)

# pm-is-supported --suspend

# echo $?
0

# cat /sys/power/state
freeze mem

------- Comment From nasas...@in.ibm.com 2017-09-19 01:42 EDT-------
pm-utils   1.4.1-17

Version of pm-utils

------- Comment From balamuruh...@in.ibm.com 2017-09-19 05:27 EDT-------
(In reply to comment #7)
> Bala,
>
> Is this still an issue with the latest libvirt updates in Ubuntu 17.10?

Hi Leonardo,

This bug originated from
https://bugzilla.linux.ibm.com/show_bug.cgi?id=150043 for the purpose of
tracking in Ubuntu. The issue have been fixed in Kernel and can be
closed.

Thank you Nageswara for validating it.

-- Bala

------- Comment From lagar...@br.ibm.com 2017-10-09 08:16 EDT-------
Closing based on last comment.

** Bug watch added: bugzilla.linux.ibm.com/ #150043
   https://bugzilla.linux.ibm.com/show_bug.cgi?id=150043

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to pm-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1706948

Title:
  [Ubuntu 18.04] [Feature] Inconsistent report of pm CanSuspend state by
  systemd and pm-utils

Status in The Ubuntu-power-systems project:
  Incomplete
Status in pm-utils package in Ubuntu:
  Incomplete

Bug description:
  == Comment: #0 - Balamuruhan S <> - 2017-06-28 03:39:15 ==
  systemd and pm-utils interprets CanSuspend states differently and reports it 
as supported or not in a conflicting way.

  # gdbus call --system --dest org.freedesktop.login1 --object-path 
/org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanSuspend
  ('yes',)

  # pm-is-supported --suspend
  # echo $?
  1

  Both systemd and pm-is-supported looks into /sys/power/state file to
  check if suspend is supported.

  pm-is-supported --suspend returns true if either "standby" or "mem" is 
present in the file.
  ( /usr/lib/pm-utils/pm-functions )

  systemd(Manager.CanSuspend) returns true if "standby", "freeze" or "mem" is 
present in the file.
  ( 
https://github.com/systemd/systemd/blob/dd8352659c9428b196706d04399eec106a8917ed/src/shared/sleep-config.c
 )

  # cat /sys/power/state
  freeze

  So here, pm-is-supported --suspend returns false and gdbus returns
  true.

  Both these utilities interpret /sys/power/state differently.

  Secondly, systemd should split CanSuspend to Cansuspend+CanFreeze Or
  don't report freeze as CanSuspend.

  Impact of this inconsistency can be felt from Libvirt supported pm
  states:

  To reduce ABI dependency, libvirt queries the available states via
  dbus, if not falls to pm-utils. Libvirt won't check for strings in
  sys/power/state and interpret directly.

  so due to this, libvirt will list that suspend_to_mem is supported
  from virsh capabilities but ideally it might not.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1706948/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to