Bug#397508: [EMAIL PROTECTED]: Fwd: Re: [Pkg-kde-extras] Powermanager OSD comes up again and again]
On Monday 15 January 2007 23:20, Luka Renko wrote: > Yep, this should help, however I have also proposed simple fix for > on_battery detection which should make it more robust for such failures. > See > https://launchpad.net/bugs/77091 This looks good to me, can you commit it? -- sebas http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Perfection is achieved not when you have nothing more to add, but when you have nothing left to take away. - Antoine de Saint-Exupery pgpZ19sKk5nOI.pgp Description: PGP signature
Bug#397508: [EMAIL PROTECTED]: Fwd: Re: [Pkg-kde-extras] Powermanager OSD comes up again and again]
On Monday 15. January 2007 23:17, Sebastian Kügler wrote: > DBus is returning bogus output from HAL it seems. While I cannot see the > real reason for that (some problem with brightness setting, it seems), > attached patch should work around this specific issue. Note that this might > make other, similar problems surface, but we can work through them. > > Can you try the attached patch, see if that helps, and post console output > if you still have problems? Yep, this should help, however I have also proposed simple fix for on_battery detection which should make it more robust for such failures. See https://launchpad.net/bugs/77091 Root cause is probably dbus security - we are discussing this on IRC with Rainer... Regards, Luka
Bug#397508: [EMAIL PROTECTED]: Fwd: Re: [Pkg-kde-extras] Powermanager OSD comes up again and again]
Am Montag, 15. Januar 2007 17:20 schrieb Luka Renko: > On Monday 15. January 2007 23:17, Sebastian Kügler wrote: > > DBus is returning bogus output from HAL it seems. While I cannot see the > > real reason for that (some problem with brightness setting, it seems), > > attached patch should work around this specific issue. Note that this > > might make other, similar problems surface, but we can work through them. > > > > Can you try the attached patch, see if that helps, and post console > > output if you still have problems? > > Yep, this should help, however I have also proposed simple fix for > on_battery detection which should make it more robust for such failures. > See > https://launchpad.net/bugs/77091 > Root cause is probably dbus security - we are discussing this on IRC with > Rainer... > Just wanted to mention for the Debian BTS, that this patch circumvents the problem. It does not resolve the root cause of the problem (the permission problem reported when powermanager is started on the command line), but makes the annoying box going away. Thanks, Rainer -- Rainer Dorsch Alzentalstr. 28 D-71083 Herrenberg 07032-919495 jabber: [EMAIL PROTECTED] GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E Full GPG key: http://pgp.mit.edu/
Bug#397508: [EMAIL PROTECTED]: Fwd: Re: [Pkg-kde-extras] Powermanager OSD comes up again and again]
Hi Luka, thanks for your reply. I checked the output of lshal, both when the laptop is connected to the power supply and when the laptop runs from battery. The output looks reasonable to me. Since kde-guidance-powermanager displays again and again that the laptop is disconnected, I did several time an lshal, when the power supply is plugged off. But always I get the ac_adapter.present = false. Looks to me like a powermanager issue. Also the problem is not intermittent, happens always Thanks, Rainer Here are details: This is what I get, when plugged in: [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter udi = '/org/freedesktop/Hal/devices/acpi_AC' info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) linux.hotplug_type = 4 (0x4) (int) ac_adapter.present = true (bool) info.capabilities = {'ac_adapter'} (string list) info.category = 'ac_adapter' (string) info.product = 'AC Adapter' (string) info.parent = '/org/freedesktop/Hal/devices/computer' (string) linux.acpi_type = 3 (0x3) (int) linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) Now plugging off the power supply. This is what I get when plugged off: [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter udi = '/org/freedesktop/Hal/devices/acpi_AC' info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) linux.hotplug_type = 4 (0x4) (int) ac_adapter.present = false (bool) info.capabilities = {'ac_adapter'} (string list) info.category = 'ac_adapter' (string) info.product = 'AC Adapter' (string) info.parent = '/org/freedesktop/Hal/devices/computer' (string) linux.acpi_type = 3 (0x3) (int) linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter udi = '/org/freedesktop/Hal/devices/acpi_AC' info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) linux.hotplug_type = 4 (0x4) (int) ac_adapter.present = false (bool) info.capabilities = {'ac_adapter'} (string list) info.category = 'ac_adapter' (string) info.product = 'AC Adapter' (string) info.parent = '/org/freedesktop/Hal/devices/computer' (string) linux.acpi_type = 3 (0x3) (int) linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter udi = '/org/freedesktop/Hal/devices/acpi_AC' info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) linux.hotplug_type = 4 (0x4) (int) ac_adapter.present = false (bool) info.capabilities = {'ac_adapter'} (string list) info.category = 'ac_adapter' (string) info.product = 'AC Adapter' (string) info.parent = '/org/freedesktop/Hal/devices/computer' (string) linux.acpi_type = 3 (0x3) (int) linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter udi = '/org/freedesktop/Hal/devices/acpi_AC' info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) linux.hotplug_type = 4 (0x4) (int) ac_adapter.present = false (bool) info.capabilities = {'ac_adapter'} (string list) info.category = 'ac_adapter' (string) info.product = 'AC Adapter' (string) info.parent = '/org/freedesktop/Hal/devices/computer' (string) linux.acpi_type = 3 (0x3) (int) linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) [EMAIL PROTECTED]:~/.ssh$ Am Montag, 15. Januar 2007 15:06 schrieb Luka Renko: > Hi! > > Powermanager uses HAL/DBus to get information about battery and AC adapter. > Currently, powermanager does polling on the HAL devices status in regular > intervals and detect if the state of device changes. > > Notification about battery powered/AC adapter powered is therefore detected > by device of category "ac_adapter". You can check the output of "lshal" and > search for "ac_adapter". On my system: > > udi = '/org/freedesktop/Hal/devices/acpi_C176' > info.udi = '/org/freedesktop/Hal/devices/acpi_C176' (string) > linux.hotplug_type = 4 (0x4) (int) > ac_adapter.present = false (bool) > info.capabilities = {'ac_adapter'} (string list) > info.category = 'ac_adapter' (string) > info.product = 'AC Adapter' (string) > info.parent = '/org/freedesktop/Hal/devices/computer' (string) > linux.acpi_type = 3 (0x3) (int) > linux.acpi_path = '/proc/acpi/ac_adapter/C176' (string) > > Powermanager checks 'ac_adapter.present' variable and if the state changes, > it notifies the users. > It is possible that the bug reported by you is powermanager bug or bug in > HAL or kernel. Inspecting lshal output when bug occurs might reveal if HAL > has proper info about the state or not. > > Regards, > Luka > > > - Forwarded message from Rainer Dorsch <[EMAIL PROTECTED]> - > > > > From: Rainer Dorsch <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED], [EMAIL PROTECTED] > > Date: Sat, 13 Jan 2007 20:35:22 -0500 > > Subject: Fwd: Re: [Pkg-kde-extras] Powermanager OSD comes up again and > > again > > > > Hello, > > > > I just wanted to politely ask how powermanager f
Bug#397508: [EMAIL PROTECTED]: Fwd: Re: [Pkg-kde-extras] Powermanager OSD comes up again and again]
Hi Rainer, On Monday 15 January 2007 22:35, Rainer Dorsch wrote: > Am Montag, 15. Januar 2007 16:05 schrieb Luka Renko: > > On Monday 15. January 2007 21:34, Rainer Dorsch wrote: > > > I checked the output of lshal, both when the laptop is connected to the > > > power supply and when the laptop runs from battery. The output looks > > > reasonable to me. Since kde-guidance-powermanager displays again and > > > again that the laptop is disconnected, I did several time an lshal, > > > when the power supply is plugged off. But always I get the > > > ac_adapter.present = false. > > > > > > Looks to me like a powermanager issue. Also the problem is not > > > intermittent, happens always > > > > Yep, thus looks like powermanager issue. If you start powermanager from > > konsole, do you get any messages on the screen? > > Here is the konsole output: > > [EMAIL PROTECTED]:~/.ssh$ guidance-power-manager > [EMAIL PROTECTED]:~/.ssh$ Traceback (most recent call last): > File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", > line 551, in changePoweredBrightness > self.powermanager.adjustBrightness(level) > File "/usr/share/python-support/kde-guidance/powermanage.py", line 255, > in adjustBrightness > if level == self.getBrightness(): > File "/usr/share/python-support/kde-guidance/powermanage.py", line 246, > in getBrightness > b = > self.brightnessObject.GetBrightness(dbus_interface="org.freedesktop.Hal.Dev >ice.LaptopPanel") File "/var/lib/python-support/python2.4/dbus/proxies.py", > line 102, in __call__ > reply_message = self._connection.send_with_reply_and_block(message, > timeout) > File "dbus_bindings.pyx", line 455, in > dbus_bindings.Connection.send_with_reply_and_block > dbus_bindings.DBusException: A security policy in place prevents this > sender from sending this message to this recipient, see message bus > configuration file (rejected message had interface > "org.freedesktop.Hal.Device.LaptopPanel" member "GetBrightness" error name > "(unset)" > destination "org.freedesktop.Hal") > Very strange! got a DCOPReplyDelayed opcode, but we were not waiting for a > reply! DBus is returning bogus output from HAL it seems. While I cannot see the real reason for that (some problem with brightness setting, it seems), attached patch should work around this specific issue. Note that this might make other, similar problems surface, but we can work through them. Can you try the attached patch, see if that helps, and post console output if you still have problems? Thanks, -- sebas http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Nothing ever becomes real until it is experienced. - John Keats Index: guidance-power-manager.py === --- guidance-power-manager.py (revision 623888) +++ guidance-power-manager.py (working copy) @@ -806,8 +806,11 @@ def powerHasBeenUnplugged(self): """ Actions to perform when the plug has been pulled.""" if self.powermanager.hasBrightness: -self.powermanager.brightnessObject.SetBrightness(self.BatteryBrightnessSlider.value(), +try: +self.powermanager.brightnessObject.SetBrightness(self.BatteryBrightnessSlider.value(), dbus_interface="org.freedesktop.Hal.Device.LaptopPanel") +except dbus_bindings.DBusException, e: +print e # No SetPowerSave in Ubuntu's HAL try: self.computerObject.SetPowerSave(True, pgp9J8bMviEya.pgp Description: PGP signature
Bug#397508: [EMAIL PROTECTED]: Fwd: Re: [Pkg-kde-extras] Powermanager OSD comes up again and again]
Am Montag, 15. Januar 2007 16:05 schrieb Luka Renko: > On Monday 15. January 2007 21:34, Rainer Dorsch wrote: > > I checked the output of lshal, both when the laptop is connected to the > > power supply and when the laptop runs from battery. The output looks > > reasonable to me. Since kde-guidance-powermanager displays again and > > again that the laptop is disconnected, I did several time an lshal, when > > the power supply is plugged off. But always I get the ac_adapter.present > > = false. > > > > Looks to me like a powermanager issue. Also the problem is not > > intermittent, happens always > > Yep, thus looks like powermanager issue. If you start powermanager from > konsole, do you get any messages on the screen? Here is the konsole output: [EMAIL PROTECTED]:~/.ssh$ guidance-power-manager [EMAIL PROTECTED]:~/.ssh$ Traceback (most recent call last): File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 551, in changePoweredBrightness self.powermanager.adjustBrightness(level) File "/usr/share/python-support/kde-guidance/powermanage.py", line 255, in adjustBrightness if level == self.getBrightness(): File "/usr/share/python-support/kde-guidance/powermanage.py", line 246, in getBrightness b = self.brightnessObject.GetBrightness(dbus_interface="org.freedesktop.Hal.Device.LaptopPanel") File "/var/lib/python-support/python2.4/dbus/proxies.py", line 102, in __call__ reply_message = self._connection.send_with_reply_and_block(message, timeout) File "dbus_bindings.pyx", line 455, in dbus_bindings.Connection.send_with_reply_and_block dbus_bindings.DBusException: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.LaptopPanel" member "GetBrightness" error name "(unset)" destination "org.freedesktop.Hal") Very strange! got a DCOPReplyDelayed opcode, but we were not waiting for a reply! [EMAIL PROTECTED]:~/.ssh$ [EMAIL PROTECTED]:~/.ssh$ [EMAIL PROTECTED]:~/.ssh$ Traceback (most recent call last): File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 411, in poll self.powerHasBeenUnplugged() File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 567, in powerHasBeenUnplugged dbus_interface="org.freedesktop.Hal.Device.LaptopPanel") File "/var/lib/python-support/python2.4/dbus/proxies.py", line 102, in __call__ reply_message = self._connection.send_with_reply_and_block(message, timeout) File "dbus_bindings.pyx", line 455, in dbus_bindings.Connection.send_with_reply_and_block dbus_bindings.DBusException: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.LaptopPanel" member "SetBrightness" error name "(unset)" destination "org.freedesktop.Hal") Traceback (most recent call last): File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 411, in poll self.powerHasBeenUnplugged() File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 567, in powerHasBeenUnplugged dbus_interface="org.freedesktop.Hal.Device.LaptopPanel") File "/var/lib/python-support/python2.4/dbus/proxies.py", line 102, in __call__ reply_message = self._connection.send_with_reply_and_block(message, timeout) File "dbus_bindings.pyx", line 455, in dbus_bindings.Connection.send_with_reply_and_block dbus_bindings.DBusException: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.LaptopPanel" member "SetBrightness" error name "(unset)" destination "org.freedesktop.Hal") [EMAIL PROTECTED]:~/.ssh$ [EMAIL PROTECTED]:~/.ssh$ [EMAIL PROTECTED]:~/.ssh$ [EMAIL PROTECTED]:~/.ssh$ Traceback (most recent call last): File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 411, in poll self.powerHasBeenUnplugged() File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 567, in powerHasBeenUnplugged dbus_interface="org.freedesktop.Hal.Device.LaptopPanel") File "/var/lib/python-support/python2.4/dbus/proxies.py", line 102, in __call__ reply_message = self._connection.send_with_reply_and_block(message, timeout) File "dbus_bindings.pyx", line 455, in dbus_bindings.Connection.send_with_reply_and_block dbus_bindings.DBusException: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.LaptopPanel" member "SetBrightness" error name "(unset)" destination "org.freedesktop.Hal") [EMAIL PROTECTED]:~/.ssh$ [EMAIL PROTECTED]:~/.ssh$ Traceback (most recent call
Bug#397508: [EMAIL PROTECTED]: Fwd: Re: [Pkg-kde-extras] Powermanager OSD comes up again and again]
On Monday 15. January 2007 21:34, Rainer Dorsch wrote: > I checked the output of lshal, both when the laptop is connected to the > power supply and when the laptop runs from battery. The output looks > reasonable to me. Since kde-guidance-powermanager displays again and again > that the laptop is disconnected, I did several time an lshal, when the > power supply is plugged off. But always I get the ac_adapter.present = > false. > > Looks to me like a powermanager issue. Also the problem is not > intermittent, happens always Yep, thus looks like powermanager issue. If you start powermanager from konsole, do you get any messages on the screen? Regards, Luka P.S. Can you get to IRC? It would be faster to debug this online. I am Lure @ freenode (in #kubuntu-devel) > Here are details: > > This is what I get, when plugged in: > > [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter > udi = '/org/freedesktop/Hal/devices/acpi_AC' > info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) > linux.hotplug_type = 4 (0x4) (int) > ac_adapter.present = true (bool) > info.capabilities = {'ac_adapter'} (string list) > info.category = 'ac_adapter' (string) > info.product = 'AC Adapter' (string) > info.parent = '/org/freedesktop/Hal/devices/computer' (string) > linux.acpi_type = 3 (0x3) (int) > linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) > > Now plugging off the power supply. > > This is what I get when plugged off: > > [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter > udi = '/org/freedesktop/Hal/devices/acpi_AC' > info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) > linux.hotplug_type = 4 (0x4) (int) > ac_adapter.present = false (bool) > info.capabilities = {'ac_adapter'} (string list) > info.category = 'ac_adapter' (string) > info.product = 'AC Adapter' (string) > info.parent = '/org/freedesktop/Hal/devices/computer' (string) > linux.acpi_type = 3 (0x3) (int) > linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) > > [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter > udi = '/org/freedesktop/Hal/devices/acpi_AC' > info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) > linux.hotplug_type = 4 (0x4) (int) > ac_adapter.present = false (bool) > info.capabilities = {'ac_adapter'} (string list) > info.category = 'ac_adapter' (string) > info.product = 'AC Adapter' (string) > info.parent = '/org/freedesktop/Hal/devices/computer' (string) > linux.acpi_type = 3 (0x3) (int) > linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) > > [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter > udi = '/org/freedesktop/Hal/devices/acpi_AC' > info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) > linux.hotplug_type = 4 (0x4) (int) > ac_adapter.present = false (bool) > info.capabilities = {'ac_adapter'} (string list) > info.category = 'ac_adapter' (string) > info.product = 'AC Adapter' (string) > info.parent = '/org/freedesktop/Hal/devices/computer' (string) > linux.acpi_type = 3 (0x3) (int) > linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) > > [EMAIL PROTECTED]:~/.ssh$ lshal|grep -B 3 -A 1 ac_adapter > udi = '/org/freedesktop/Hal/devices/acpi_AC' > info.udi = '/org/freedesktop/Hal/devices/acpi_AC' (string) > linux.hotplug_type = 4 (0x4) (int) > ac_adapter.present = false (bool) > info.capabilities = {'ac_adapter'} (string list) > info.category = 'ac_adapter' (string) > info.product = 'AC Adapter' (string) > info.parent = '/org/freedesktop/Hal/devices/computer' (string) > linux.acpi_type = 3 (0x3) (int) > linux.acpi_path = '/proc/acpi/ac_adapter/AC' (string) > > [EMAIL PROTECTED]:~/.ssh$ > > Am Montag, 15. Januar 2007 15:06 schrieb Luka Renko: > > Hi! > > > > Powermanager uses HAL/DBus to get information about battery and AC > > adapter. Currently, powermanager does polling on the HAL devices status > > in regular intervals and detect if the state of device changes. > > > > Notification about battery powered/AC adapter powered is therefore > > detected by device of category "ac_adapter". You can check the output of > > "lshal" and search for "ac_adapter". On my system: > > > > udi = '/org/freedesktop/Hal/devices/acpi_C176' > > info.udi = '/org/freedesktop/Hal/devices/acpi_C176' (string) > > linux.hotplug_type = 4 (0x4) (int) > > ac_adapter.present = false (bool) > > info.capabilities = {'ac_adapter'} (string list) > > info.category = 'ac_adapter' (string) > > info.product = 'AC Adapter' (string) > > info.parent = '/org/freedesktop/Hal/devices/computer' (string) > > linux.acpi_type = 3 (0x3) (int) > > linux.acpi_path = '/proc/acpi/ac_adapter/C176' (string) > > > > Powermanager checks 'ac_adapter.present' variable and if the state > > changes, it notifies the users. > > It is possible that the bug reported by you is powermanager bug or bug in > > HAL or kernel. Inspecting lshal output when bug occurs might