powersaving detection fails 8 times before success

Bug #458847 reported by Daniel Wagner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Caffeine
Fix Released
High
Isaiah Heyer

Bug Description

The first time I click the Caffeine icon, I get some spew, and nothing much else happens. The spew seems to be broken into two categories, which I've de-interlaced below from a run where I clicked the icon three times. Once it has finally detected DPMS power-save mode (which takes about five minutes), everything works as expected, though the icon may be out-of-sync with reality.

I've also included below the output from dbus-monitor during a run (not the same run).

output category one: trying to figure out the powersave method:
(23 Oct 2009) 03:31:35 INFO: Attempting to detect screensaver/powersaving type... (0 dbus failures so far)
(23 Oct 2009) 03:31:50 INFO: Attempting to detect screensaver/powersaving type... (1 dbus failures so far)
(23 Oct 2009) 03:32:05 INFO: Attempting to detect screensaver/powersaving type... (2 dbus failures so far)
(23 Oct 2009) 03:32:20 INFO: Attempting to detect screensaver/powersaving type... (3 dbus failures so far)
(23 Oct 2009) 03:32:35 INFO: Attempting to detect screensaver/powersaving type... (4 dbus failures so far)
(23 Oct 2009) 03:32:50 INFO: Attempting to detect screensaver/powersaving type... (5 dbus failures so far)
(23 Oct 2009) 03:33:05 INFO: Attempting to detect screensaver/powersaving type... (6 dbus failures so far)
(23 Oct 2009) 03:33:20 INFO: Attempting to detect screensaver/powersaving type... (7 dbus failures so far)
(23 Oct 2009) 03:33:35 INFO: Attempting to detect screensaver/powersaving type... (8 dbus failures so far)
(23 Oct 2009) 03:33:35 INFO: Successfully detected screensaver and powersaving type: DPMS
(23 Oct 2009) 03:33:35 INFO: Caffeine is now preventing powersaving modes and screensaver activation (DPMS)

output category two: clicks
(23 Oct 2009) 03:31:35 INFO: User has clicked the Caffeine icon
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/caffeine/main.py", line 464, in on_L_click
    self.toggle_activated()
  File "/usr/lib/python2.6/site-packages/caffeine/main.py", line 448, in toggle_activated
    self.Core.toggleActivated()
  File "/usr/lib/python2.6/site-packages/caffeine/core.py", line 415, in toggleActivated
    self.screensaverAndPowersavingType + ")")
TypeError: cannot concatenate 'str' and 'NoneType' objects
(23 Oct 2009) 03:31:39 INFO: User has clicked the Caffeine icon
(23 Oct 2009) 03:31:39 INFO: Caffeine is now dormant; powersaving is re-enabled
(23 Oct 2009) 03:32:07 INFO: User has clicked the Caffeine icon
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/caffeine/main.py", line 464, in on_L_click
    self.toggle_activated()
  File "/usr/lib/python2.6/site-packages/caffeine/main.py", line 448, in toggle_activated
    self.Core.toggleActivated()
  File "/usr/lib/python2.6/site-packages/caffeine/core.py", line 415, in toggleActivated
    self.screensaverAndPowersavingType + ")")
TypeError: cannot concatenate 'str' and 'NoneType' objects

output from dbus-monitor:
signal sender=org.freedesktop.DBus -> dest=:1.159 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.159"
method call sender=:1.159 -> dest=org.freedesktop.DBus serial=3 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='method_call'"
method call sender=:1.159 -> dest=org.freedesktop.DBus serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='method_return'"
method call sender=:1.159 -> dest=org.freedesktop.DBus serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='error'"
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=7 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.160"
   string ""
   string ":1.160"
method call sender=:1.160 -> dest=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method call sender=:1.160 -> dest=org.gnome.GConf serial=2 path=/org/gnome/GConf; interface=org.gnome.GConf; member=GetIOR
method return sender=:1.148 -> dest=:1.160 reply_serial=2
   string "IOR:010000001600000049444c3a436f6e666967536572766572323a312e30000000030000000054424f540000000101020005000000554e4958000000000a0000006c6f63616c686f73740000002a0000002f746d702f6f726269742d646d7769742f6c696e632d323038652d302d31396464383336653661633500000000000000caaedfba54000000010102002a0000002f746d702f6f726269742d646d7769742f6c696e632d323038652d302d3139646438333665366163350000001c00000000000000f59058c866882828c02b28282828282801000000c19a284c01000000480000000100000002000000050000001c00000000000000f59058c866882828c02b28282828282801000000c19a284c01000000140000000100000001000105000000000901010000000000"
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=8 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.161"
   string ""
   string ":1.161"
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=3 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=6 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=7 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=8 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=9 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=10 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=11 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=12 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=13 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=14 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=15 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=16 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=17 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=18 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames
method call sender=:1.161 -> dest=org.freedesktop.DBus serial=19 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=ListNames

Revision history for this message
pragmattica (bnsmith) wrote :

If the icon can get out of sync with reality, that's especially worrying. We were aware that it made multiple attempts to detect dbus before going to DPMS, but I had thought that the icon should never get out of sync...

Changed in caffeine:
status: New → Confirmed
Changed in caffeine:
importance: Undecided → High
Changed in caffeine:
assignee: nobody → Isaiah Heyer (freshapplepy)
milestone: none → 1.0.1
Changed in caffeine:
status: Confirmed → Fix Committed
pragmattica (bnsmith)
Changed in caffeine:
status: Fix Committed → Fix Released
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.