Bug 416591 - Error org.freedesktop.DBus.Error.UnknownMethod: Method "Inhibit" with signature "ss" on interface "org.freedesktop.PowerManagement" doesn't exist
Summary: Error org.freedesktop.DBus.Error.UnknownMethod: Method "Inhibit" with signatu...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-power-manager
Version: 8
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Zeuthen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-08 16:47 UTC by Barry Powell
Modified: 2013-03-06 03:53 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-09 07:31:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Barry Powell 2007-12-08 16:47:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.1.10) Gecko/20071128 Fedora/2.0.0.10-2.fc8 Firefox/2.0.0.10

Description of problem:
I would like to prevent my system suspending during something which takes a long tine to complete.  I've tried the python example code.

#!/usr/bin/python 
import dbus
import time
bus = dbus.Bus(dbus.Bus.TYPE_SESSION)
devobj = bus.get_object('org.freedesktop.PowerManagement', '/org/freedesktop/PowerManagement')
dev = dbus.Interface (devobj, "org.freedesktop.PowerManagement.Inhibit")
cookie = dev.Inhibit('Nautilus', 'Copying files from /media/SANVOL')
time.sleep(10)
dev.UnInhibit(cookie)

And dbus-send

dbus-send \
        --print-reply \
        --dest='org.freedesktop.PowerManagement' \
        /org/freedesktop/PowerManagement \
        org.freedesktop.PowerManagement.Inhibit \
        string:'rdiff-backup' string:'Long job'

Both will return...
Error org.freedesktop.DBus.Error.UnknownMethod: Method "Inhibit" with signature "ss" on interface "org.freedesktop.PowerManagement" doesn't exist

Is the Inhibit method missing / not yet implemented on FC8, or am I doing something wrong ?





Version-Release number of selected component (if applicable):
gnome-power-manager-2.20.0-6.fc8

How reproducible:
Always


Steps to Reproduce:
1dbus-send \
        --print-reply \
        --dest='org.freedesktop.PowerManagement' \
        /org/freedesktop/PowerManagement \
        org.freedesktop.PowerManagement.Inhibit \
        string:'rdiff-backup' string:'Long job'.


Actual Results:
Error org.freedesktop.DBus.Error.UnknownMethod: Method "Inhibit" with signature "ss" on interface "org.freedesktop.PowerManagement" doesn't exist

Expected Results:
Should return an unsigned integer and prevent system entering suspend state during  long tasks

Additional info:

Comment 1 Barry Powell 2008-01-03 20:46:19 UTC
I have have worked out why the python code does not work.  The correction should
as follows.

#!/usr/bin/python 
import dbus
import time
bus = dbus.Bus(dbus.Bus.TYPE_SESSION)
devobj = bus.get_object('org.freedesktop.PowerManagement',
'/org/freedesktop/PowerManagement/Inhibit')    <-- "/Inhibit" was missing
dev = dbus.Interface (devobj, "org.freedesktop.PowerManagement.Inhibit")
cookie = dev.Inhibit('rdiff-backup', 'Copying files to /media/BACKUP')
print cookie
time.sleep(10)
dev.UnInhibit(cookie)

The example code from the documentation was inaccurate  

Comment 2 Barry Powell 2008-01-03 20:56:42 UTC
I still cant get the dbus-send to work I have altered as show below. Added
trailing slash to the /org/... line (also tried adding "/Inhibit/")

dbus-send --session \
        --print-reply \
        --type=method_call \
        --reply-timeout=2000 \
        --dest=org.freedesktop.PowerManagement \
        /org/freedesktop/PowerManagement/ \
        org.freedesktop.PowerManagement.Inhibit \
        string:'rdiff-backup' string:'Long job'

Either way I now produce

arguments to dbus_message_new_method_call() were incorrect, assertion
"_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 1074.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

Comment 3 Richard Hughes 2008-04-30 09:29:14 UTC
dbus-send  --session \
	--dest=org.freedesktop.PowerManagement \
	--type=method_call \
	--print-reply /org/freedesktop/PowerManagement/Inhibit
org.freedesktop.PowerManagement.Inhibit.Inhibit string:gnome-packagekit
string:"A transaction is running"

Comment 4 Bug Zapper 2008-11-26 08:54:30 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2009-01-09 07:31:15 UTC
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.