After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 330889 - Hard to debug when dbus messages fail
Hard to debug when dbus messages fail
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.13.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-02-12 14:33 UTC by Crispin Flowerday (not receiving bugmail)
Modified: 2006-11-26 23:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
picture of proposed notification (32.01 KB, image/png)
2006-02-13 15:59 UTC, Richard Hughes
Details

Description Crispin Flowerday (not receiving bugmail) 2006-02-12 14:33:46 UTC
I had a situation where gnome-power-manager wasn't working because I didn't have the appropriate pam module installed, so all the dbus messages failed. However, although gnome-power-manager was printing things to stderr, these just went to /dev/null (I ended up stracing to find out what the problem was).

I might be better not to actually daemonize by default so that when started by gnome-session the output will just go to ~/.xsession-errors ..

Or .. perhaps gnome-power-manager should give error dialogues when the dbus messages fail.
Comment 1 Richard Hughes 2006-02-13 11:15:39 UTC
What dbus messages failed? The ones to register org.gnome.PowerManager or the ones to HAL and NetworkManager?

I think both your suggestions are valid, to not daemonize by default, and also to display a proper modal messagebox in the event of a startup failure.
Comment 2 Crispin Flowerday (not receiving bugmail) 2006-02-13 11:19:37 UTC
It was the ones to Hal, IIRC dbus was complaining that g-p-m didn't have the correct permissions to send the event - these errors happened when g-p-m wanted to suspend the machine. I seem to recall that NetworkManager was reacting as though it was being talked to.

Anyway, to reproduce my problems, just remove libpam-foreground, and re-login and then try and use g-p-m :-)
Comment 3 Richard Hughes 2006-02-13 11:40:46 UTC
OOps. Not sure what happened with the "critical" and "high" attributes.
Comment 4 Richard Hughes 2006-02-13 15:59:50 UTC
Created attachment 59269 [details]
picture of proposed notification

What do you think of the attached picture? Is this the sort of thing you had in mind?
Comment 5 Crispin Flowerday (not receiving bugmail) 2006-02-13 16:04:58 UTC
Yeah! that looks good :-)
Comment 6 Richard Hughes 2006-02-13 16:14:33 UTC
I've committed something to CVS to do these notifications:

2006-02-13  Richard Hughes  <richard@hughsie.com>
 * src/gpm-common.h: Add location of FAQ page as GPM_FAQ_URL.
 * src/gpm-manager.c (gpm_manager_suspend, gpm_manager_hibernate): Inform the user if the HAL command failed, and point them in the direction of the online FAQ page. Fixes bug #330889.

Okay, what distro you got, and what was the exact error message, and I'll add it to the FAQ page.
Comment 7 Crispin Flowerday (not receiving bugmail) 2006-02-13 16:27:22 UTC
Excellent, thanks :-)

My distro is Ubuntu dapper, and due to the daemonizing nature, the only way to get the error is to strace it, however the error is (may be minor typos, manually copied from one machine to another):

WARNING **: gpm_hal_suspend: A security policy in place prevents this sender from sending this message to this recepient, see message bus configuration  (rejected message had interface "org.freedesktop.Hal.Device.SystemPowerManagement" member "Suspend" error name "(unset)" destination "org.freedesktop.Hal")
WARNING **: org.freedesntop.Hal.Device.SystemPowerManagement.Suspend failed (HAL error)

The fix was to install the libpam-foreground package
Comment 8 Richard Hughes 2006-02-13 18:03:28 UTC
Actually you can do --no-daemon (and even --no-daemon --verbose if you want lots of debugging text!) so that it doesn't daemonise.

I've your information to the FAQ page, and I'm just waiting to upload the new pages now.

Thanks, Richard.
Comment 9 Faidon Liambotis 2006-04-30 07:26:21 UTC
> I've your information to the FAQ page, and I'm just waiting to upload the new
> pages now.
I'm having the same issue with Debian sid (unstable) because of a similar (or probably the same) dbus policy. The solution is to add the user to the powerdev group.
Installing libpam-foreground didn't work for me.
(adding the user eliminated the warning -- it doesn't actually doing anything, yet)

Please update the FAQ :)
And while you're at it, correct the 'stable/unstable? No, use etch.' in the relevant question.
unstable > etch > stable (sarge).

Regards,
Faidon 
Comment 10 Richard Hughes 2006-04-30 08:29:06 UTC
Faidon, can you update the FAQ please? It's a wiki, so just create a new username and edit it yourself, as I'm sure you can provide more details for other debianers.

Thanks,

Richard.
Comment 11 Faidon Liambotis 2006-04-30 09:40:00 UTC
Hi,
> Faidon, can you update the FAQ please? It's a wiki, so just create a new
> username and edit it yourself, as I'm sure you can provide more details for
> other debianers.
The popup is linking to
http://www.gnome.org/projects/gnome-power-manager/faq.html
which isn't a wiki, as far as I can tell.

I just saw
http://live.gnome.org/GnomePowerManager/Faq
...which is immutable :(

I'd be happy to document my findings on the wiki, fwiw.

Regards,
Faidon
Comment 12 Richard Hughes 2006-04-30 10:03:03 UTC
(In reply to comment #11)
> Hi,
> > Faidon, can you update the FAQ please? It's a wiki, so just create a new
> > username and edit it yourself, as I'm sure you can provide more details for
> > other debianers.
> The popup is linking to
> http://www.gnome.org/projects/gnome-power-manager/faq.html
> which isn't a wiki, as far as I can tell.

Aha! Gotcha. The FAQ page should be the new wiki page - I'll fix this in CVS now.

> I just saw
> http://live.gnome.org/GnomePowerManager/Faq
> ...which is immutable :(

You need to create a username and login to be able to edit. I think anonymous edits are disabled in w.g.o.

Richard.
Comment 13 Olivier Berger 2006-11-26 19:15:14 UTC
It seems the FAQ is no longer in the Wiki but in CVS...

Can anybody add something about Debian and the powerdev user in the FAQ in CVS since libpam-foreground seems only valid for Ubuntu ?

Thanks in advance
Comment 14 Richard Hughes 2006-11-26 19:19:37 UTC
Oliver, if you type up a couple of paragraphs, I'll add this to the FAQ tonight. Thanks.
Comment 15 Olivier Berger 2006-11-26 23:00:33 UTC
Something like that should fit :

Why using Debian (Etch) do I get the error

WARNING **: gpm_hal_suspend: A security policy in place prevents this sender
from sending this message to this recepient, see message bus configuration
(rejected message had interface
"org.freedesktop.Hal.Device.SystemPowerManagement" member "Suspend" error name
"(unset)" destination "org.freedesktop.Hal")
WARNING **: org.freedesktop.Hal.Device.SystemPowerManagement.Suspend failed (HAL error)
      

Debian ships a locked down DBUS by default for Etch which prevents ordinary users from issuing methods to HAL. To allow the current logged in user to use these methods, just add it to the powerdev group (see /usr/share/doc/gnome-power-manager/README.Debian).

Hope this helps.

Best regards,
Comment 16 Richard Hughes 2006-11-26 23:29:10 UTC
2006-11-26  Richard Hughes  <richard@hughsie.com>

	* docs/faq.html:
	* docs/faq.xml:
	* docs/index.html:
	Add a new FAQ from Olivier Berger about debian etch.
	Also remove the obsolete entries that no longer apply.

Many thanks.