inhibit applet does not inhibit some user initiated events

Bug #389857 reported by Oded Arbel
74
This bug affects 13 people
Affects Status Importance Assigned to Milestone
gnome-power
New
Medium
gnome-power-manager (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

With the inhibit applet enabled (using the patched version from upstream, see linked ppa below):
1) does the screen blank when power preferences is set to blank it? (no)
2) does it suspend at the time set in power preferences? (no)
3) can you manually shutdown? (no)
4) can you manually suspend? (yes)
5) can you manually switch users, log off, hibernate? (yes, no, yes)
6) on lid close, does it suspend? (yes)
7) on lid close,does it shutdown? (yes)

The inhibit applet is intended to inhibit auto-power saving. However, inhibiting manual events is useful, especially if you just want to close your laptop to walk between rooms without losing an internet connect, for example.

Related branches

Revision history for this message
Scott Howard (showard314) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Could you please attach the resulting log file of: /usr/share/gnome-power-manager/gnome-power-bugreport &> gpm.log to the report? You might also want to take a look to the Debugging instructions located at https://wiki.ubuntu.com/DebuggingGNOMEPowerManager for submit any other logs related to your problem.Thanks in advance.

Also, check out this upstream report and see if it has similar symptoms:
http://bugzilla.gnome.org/show_bug.cgi?id=577966

Changed in gnome-power-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
Oded Arbel (oded-geek) wrote :

Attached.

The upstream bug mentioned is unrelated, as the behavior I'm seeing is different - the applet does not seem to respond at all (I'm guessing it tries to inhibit and detects that it failed).

Revision history for this message
Scott Howard (showard314) wrote :

Thanks for looking into the upstream report. In order to debug further, there are some additional information we can collect:

GNOME Power Manager Verbose Trace (This will turn on verbose debugging for GNOME Power Manager.):
1) enter the following into the terminal:
killall gnome-power-manager
gnome-power-manager --no-daemon --verbose
2) try the inhibit applet and post the output from the terminal

Reason (/var/log/messages) information (This will return the reason GNOME Power Manager did a specific action.)
1) Try the inhibit applet
2) enter the following into the terminal:
cat /var/log/message | grep gnome-power-manager
3) post the output from the terminal

HAL Verbose Trace
1) enter the following into the terminal:
/usr/sbin/hald --daemon=no --verbose=yes --retain-privileges
2) try the inhibit applet and post the output from the terminal

Revision history for this message
Oded Arbel (oded-geek) wrote :

I tried all of the above test:
1. gnome-power-manager --no-daemon --verbose does not produce any output. I tried clicking the inhibit applet and changing panel brightness and there is no output at all.
2. grepping /var/log/messages for gnome-power-manager produces no results. I also tried grepping /var/log/syslog which I believe should be the more detailed log, and there isn't anything there either.
3. stopping hald and running it from the command line produces a lot of output for everything in the system, but after it settles down I tried to play with the inhibit applet and I got no output. Playing with the panel brightness got some reports from hald about "IBM hotkey" and "Video LCD0"

Given that, it seems to me that inhibit applet 2.27.1 simply does not respond to mouse clicks for some reason.

Revision history for this message
Scott Howard (showard314) wrote :

Thanks for your testing and finding this bug. I can confirm that this bug exists in Karmic.

Steps to reproduce:
Karmic Live CD (Power Manager Inhibit Applet version 2.27.1)
Add "Power Manager Inhibit Applet" to the top panel
click on the icon

what happens:
nothing

what should happen:
the icon adds a red circle with a line through indicating that the inhibit applet is active.

Changed in gnome-power-manager (Ubuntu):
importance: Undecided → High
status: Incomplete → Confirmed
summary: - inhibit applet not working after upgrade to karmic
+ [karmic] inhibit applet not working
description: updated
Revision history for this message
Scott Howard (showard314) wrote : Re: [karmic] inhibit applet not working

From duplicate bug #383637 by Nicolò Chieffo (yelo3).

Binary package hint: gnome-power-manager

yelo3@yelo3-laptop:~/bin$ /usr/bin/gnome-power-manager-inhibit test
Traceback (most recent call last):
  File "/usr/bin/gnome-power-manager-inhibit", line 34, in <module>
    cookie = gpm.Inhibit("Command Line: " + sys.argv[1], "Long Execution")
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Inhibit" with signature "ss" on interface "(null)" doesn't exist

ProblemType: Bug
Architecture: amd64
Date: Thu Jun 4 17:34:32 2009
DistroRelease: Ubuntu 9.10
Package: gnome-power-manager 2.27.1-0ubuntu2
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.30-7.8-generic
SourcePackage: gnome-power-manager
Uname: Linux 2.6.30-7-generic x86_64

description: updated
Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Scott Howard (showard314) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at: http://bugzilla.gnome.org/show_bug.cgi?id=588124

Changed in gnome-power:
status: Unknown → New
Changed in gnome-power:
status: New → Unknown
Changed in gnome-power:
status: Unknown → In Progress
Revision history for this message
Scott Howard (showard314) wrote :

Hello, this bug was supposedly fixed in version 2.27.5. Could you please test the latest release in Karmic and confirm that it is working? I was able to get it working.

The inhibit call was moved from gnome-power-manager to gnome-session-manager over the past few weeks and should be working now.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Thanks for the heads up, Scott. It appears to be working for me, now, too.

Revision history for this message
Scott Howard (showard314) wrote :

Great! Thanks for reporting this bug.

Changed in gnome-power-manager (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Oded Arbel (oded-geek) wrote :

Thanks for the fix, now the applet responds to my clicks and shows a nice "sleep not allowed" icon - but it does NOT prevent the laptop from suspending.

With the inhibit applet active ("no sleep" icon showing on the panel), closing the lid immediately suspends the laptop. The applet now responds to clicks, but has no effect on the actual ability of the laptop to suspend.

Revision history for this message
Oded Arbel (oded-geek) wrote :

Interestingly enough, when the inhibit applet is active - while it does not prevent the laptop from sleeping - it does prevent the laptop from shutting down: When I try to shutdown or restart the laptop I get the session manager window shown in the attachment.

It stays like that until I deactivate the inhibit applet, at which point it immediately shuts down.

Changed in gnome-power-manager (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Scott Howard (showard314) wrote :

I think the applet was not inhibiting the idle counter. I changed theo gnome-session-manager inhibit call to be more strict. Could you test this version of GPM:
https://launchpad.net/~showard314/+archive/ppa

Let me know if this works.

Changed in gnome-power-manager (Ubuntu):
assignee: nobody → Scott Howard (showard314)
status: Triaged → In Progress
Revision history for this message
Oded Arbel (oded-geek) wrote :

With that gnome-power-manager installed, the laptop won't sleep at all when the lid is closed - even when inhibit is inactive - so I can't tell if the inhibit applet is doing anything.

Inhibit does still prevent the laptop from shutting down or logging off, when active.

Revision history for this message
Oded Arbel (oded-geek) wrote :

Correction - with the current Karmic (after today's update), with or without the updated gnome-power-manager from your PPA, my laptop does not sleep when closing the lid.

Specifically, if I go to "power management preferences" I see that it is set to shutdown when lid is closed, for both "on ac power" and "on battery power" and I can't change it - if I set some other value and click "close", when I open it again it is reset to the previous values.

So at the moment I can't test how the laptop behaves when the lid is closed.

Revision history for this message
Scott Howard (showard314) wrote :

Hi Oded, version 2.27.91 should be hitting the repos today (they may already be available). Could you test that version to make sure the inhibit applet is properly working? I believe that it will inhibit the shutdowns/suspends based on power preferences properly from my tests.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Scott,

I have

  gnome-power-manager 2.27.91-0ubuntu1

and I still have a problem. Here are the specifics:

I am running VMware. I turn on the inhibit applet so that it says "automatic sleep inhibited. The system stays awake while I am working in VMware, but as soon as I move the mouse outside of the VM, the system immediately acts as if the entire period had been idle, rather than ignoring it due to the inhibit applet.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Even without VMware, the applet fails to inhibit the screensaver.

Revision history for this message
Oded Arbel (oded-geek) wrote :

Hi Scott, I've upgraded Karmic with the latest everything, including GNOME 2.27.91, and the inhibit applet still does not work - without the inhibit applet I close the lid and the computer suspends, I install the inhibit applet, turn it on, close the lid and the computer suspends again.

I can't find anything relevant in the logs for this.

Revision history for this message
Oded Arbel (oded-geek) wrote :

Actually, the above description is not correct - its back to the behavior described in comment #12: does not inhibit sleep, does inhibit shutdown.

Revision history for this message
Scott Howard (showard314) wrote : Re: [Bug 389857] Re: [karmic] inhibit applet not working
Download full text (3.4 KiB)

Thanks for testing this so much. This bug has been a moving target
since gnome-session, xorg (which keeps track of IDLE), and GPM have
been changing how they keep track of IDLE sessions quite a bit (see
bug #397839).

I have a new version at
https://launchpad.net/~showard314/+archive/ppa, which also inhibits
the xorg IDLE. That can be tested too, but we need to make a uniform
test case to forward this bug upstream (please fill in the answers
here from your testing so far so we can have a complete set of tests):

With inhibit enabled (using the unpatched GPM 2.27.91-0ubuntu1):
1) does the screen blank when power preferences is set to blank it?
2) does it suspend at the time set in power preferences?
3) can you manually shutdown? (no)
4) can you manually suspend? (yes)
5) can you manually switch users, log off, hibernate?
6) on lid close, can you suspend? (yes)
7) on lid close, can you shutdown?

All of the above should be "no"

And finally:
With inhibit enabled (using the patched GPM 2.27.91-0ubuntu2~ppa1 from
the above linked ppa):
1) does the screen blank when power preferences is set to blank it? (no)
2) does it suspend at the time set in power preferences? (no)
3) can you manually shutdown? (no)
4) can you manually suspend? (yes)
5) can you manually switch users, log off, hibernate? (yes, no, yes)
6) on lid close, can you suspend?
7) on lid close, can you shutdown?

Once we have this complete, we can send it upstream.

Thanks again.

On Sun, Aug 30, 2009 at 11:45 PM, Launchpad Bug
Tracker<email address hidden> wrote:
> ** Branch linked: lp:~showard314/gnome-power/bug389857
>
> --
> [karmic] inhibit applet not working
> https://bugs.launchpad.net/bugs/389857
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Gnome Powermanager: In Progress
> Status in “gnome-power-manager” package in Ubuntu: In Progress
>
> Bug description:
> Binary package hint: gnome-power-manager
>
> The inhibit applet does not work in Karmic (both as a jaunty upgrade and in a Live CD environment, on a desktop and a laptop).
>
> test case:
> After adding the applet to the gnome panel, the applet icon appears normal, and the tooltip says "Automatic sleep enabled".
> Click on the applet.
>
> Result:
> Clicking on the applet icon produces no effect. The inhibit applet's icon and tooltip does not change, and gnome-power is not inhibited (the screen will still blank/suspend as per power profile).
>
> Expected result:
> clicking on the applet changes the tool tip and icon to display "automatic sleep disabled" (or something similar), and the applet should prevent the screen from blanking or suspending.
>
>
> Also, from the terminal:
>
> yelo3@yelo3-laptop:~/bin$ /usr/bin/gnome-power-manager-inhibit test
> Traceback (most recent call last):
>  File "/usr/bin/gnome-power-manager-inhibit", line 34, in <module>
>    cookie = gpm.Inhibit("Command Line: " + sys.argv[1], "Long Execution")
>  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
>    return self._proxy_method(*args, **keywords)
>  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
>    **keywords)
>  File "/usr/lib/py...

Read more...

Revision history for this message
Scott Howard (showard314) wrote : Re: [karmic] inhibit applet not working

two bug reports were filed upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=593804
http://bugzilla.gnome.org/show_bug.cgi?id=593800

Further work on this bug will occur there. You may add yourselves to the cc: list and add any additional relevant info you may have. Thanks for your help!

Changed in gnome-power-manager (Ubuntu):
status: In Progress → Triaged
assignee: Scott Howard (showard314) → nobody
Changed in gnome-power:
status: In Progress → Unknown
Changed in gnome-power:
status: Unknown → New
Revision history for this message
Noel J. Bergman (noeljb) wrote :

Scott, should this also be inhibiting screen-saving?

Revision history for this message
Scott Howard (showard314) wrote : Re: [Bug 389857] Re: [karmic] inhibit applet not working

@Noel: The intention of the applet is to inhibit auto-standby.
However, the new version in the above linked ppa has a patch which
might also inhibit the screen saver as well since it will inhibit the
gnome session from going idle. I'm not 100% sure though. Does either
version (karmic official repo our the above ppa) inhibit the screen
saver?

On Wed, Sep 2, 2009 at 9:07 PM, Noel J. Bergman<email address hidden> wrote:
> Scott, should this also be inhibiting screen-saving?
>
> --
> [karmic] inhibit applet not working
> https://bugs.launchpad.net/bugs/389857
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Gnome Powermanager: New
> Status in “gnome-power-manager” package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: gnome-power-manager
>
> The inhibit applet does not work in Karmic (both as a jaunty upgrade and in a Live CD environment, on a desktop and a laptop).
>
> test case:
> After adding the applet to the gnome panel, the applet icon appears normal, and the tooltip says "Automatic sleep enabled".
> Click on the applet.
>
> Result:
> Clicking on the applet icon produces no effect. The inhibit applet's icon and tooltip does not change, and gnome-power is not inhibited (the screen will still blank/suspend as per power profile).
>
> Expected result:
> clicking on the applet changes the tool tip and icon to display "automatic sleep disabled" (or something similar), and the applet should prevent the screen from blanking or suspending.
>
>
> Also, from the terminal:
>
> yelo3@yelo3-laptop:~/bin$ /usr/bin/gnome-power-manager-inhibit test
> Traceback (most recent call last):
>  File "/usr/bin/gnome-power-manager-inhibit", line 34, in <module>
>    cookie = gpm.Inhibit("Command Line: " + sys.argv[1], "Long Execution")
>  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
>    return self._proxy_method(*args, **keywords)
>  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
>    **keywords)
>  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in call_blocking
>    message, timeout)
> dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Inhibit" with signature "ss" on interface "(null)" doesn't exist
>

summary: - [karmic] inhibit applet not working
+ [karmic] inhibit applet does not inhibit user initiated events
description: updated
summary: - [karmic] inhibit applet does not inhibit user initiated events
+ [karmic] inhibit applet does not inhibit some user initiated events
Changed in gnome-power-manager (Ubuntu):
importance: High → Medium
Revision history for this message
Oded Arbel (oded-geek) wrote : Re: [karmic] inhibit applet not working

Here is my testing:

With inhibit enabled (using the unpatched GPM 2.27.91-0ubuntu1):
1) does the screen blank when power preferences is set to blank it? Yes
2) does it suspend at the time set in power preferences? Yes
3) can you manually shutdown? No
4) can you manually suspend? Yes
5) can you manually switch users, log off, hibernate? (Yes, No, Yes)
6) on lid close, can you suspend? Yes
7) on lid close, can you shutdown? Yes (!!)

With inhibit enabled (using the patched GPM 2.27.91-0ubuntu2~ppa1 from
the above linked ppa):
1) does the screen blank when power preferences is set to blank it? No
2) does it suspend at the time set in power preferences? No
3) can you manually shutdown? No
4) can you manually suspend? Yes
5) can you manually switch users, log off, hibernate? Yes, No , Yes
6) on lid close, can you suspend? Yes
7) on lid close, can you shutdown? Yes

Revision history for this message
Oded Arbel (oded-geek) wrote : Re: [karmic] inhibit applet does not inhibit some user initiated events

I think its silly that the inhibit applet prevents shutdown and logout but does not prevent suspend. I don't think it should ever prevent manual actions from taking place.

description: updated
description: updated
Revision history for this message
Noel J. Bergman (noeljb) wrote :

> the new version in the above linked ppa has a patch which
> might also inhibit the screen saver as well since it will inhibit the
> gnome session from going idle. I'm not 100% sure though. Does
> either version (karmic official repo

No

> our the above ppa) inhibit the screen saver?

Yes.

I am liking your new code, so far.

Revision history for this message
Oded Arbel (oded-geek) wrote :

Suspend on lid close is not a manual action - closing the lid is manual, the same as not doing anything until the session idle timer expires: both are user decisions. Suspending the computer when the lid closes as well as triggering screensaver or putting the display to sleep when because a user has done something related - both are automatic actions that the inhibit applet should prevent.

Using the shutdown command from the system or session menu, is the user requesting a very specific power manager action and should not be inhibited. As a rule of thumb, I would say that if a preference says to take that action (because the user has triggered something that caused that preference to be consulted) then the inhibit applet should inhibit it, while if a user said to take that action then the inhibit applet should not inhibit it.

As an example, here are two things that the current inhibit + power management setup gets wrong:

* Shutdown the computer when the shutdown command is invoked by the user: current inhibit behavior- inhibits; expected inhibit behavior - do not inhibit.
* Shutdown the computer when lid is closed (is specified in the preferences): current inhibit behavior - does not inhibit; expected inhibit behavior - should inhibit.

Changed in gnome-power:
importance: Unknown → Medium
status: New → Fix Released
Revision history for this message
Oded Arbel (oded-geek) wrote :

Changed upstream bug, as the original bug is dead.

Changed in gnome-power:
importance: Medium → Unknown
status: Fix Released → Unknown
Changed in gnome-power:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Still confirmed on Natty.

summary: - [karmic] inhibit applet does not inhibit some user initiated events
+ inhibit applet does not inhibit some user initiated events
Revision history for this message
Noel J. Bergman (noeljb) wrote :

I provided a replacement for the inhibit applet ages ago. The replacement supports both the Gnome Applet API and the App Indicator API.

Revision history for this message
Oded Arbel (oded-geek) wrote :

Noel: thanks for providing this applet replacement - its a shame I wasn't aware of this before. Due to this and a few other issues I migrated my laptop to KDE on Fedora so this issue is no longer relevant for me.

That being said, I tested this applet on my desktop running Oneiric with "Gnome Classic" session, and it looks to be working fine for inhibiting the screen lock. I of course couldn't test the laptop lid action which is what I was interested in the first place, and also the UI is not as simple as the original inhibit applet - It would have been great if the icon would update to show some icon other then the "inhibiting" icon when there are no inhibiting options enabled.

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.