Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 268727 - sys-apps/hal-0.5.12_rc1-r2: XFCE no longer shutting down
Summary: sys-apps/hal-0.5.12_rc1-r2: XFCE no longer shutting down
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Gryniewicz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-05 13:53 UTC by Tony Vroon (RETIRED)
Modified: 2010-06-20 09:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xfce-shutdown-failure.jpg (xfce-shutdown-failure.jpg,257.84 KB, image/jpeg)
2009-05-05 13:54 UTC, Tony Vroon (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Vroon (RETIRED) gentoo-dev 2009-05-05 13:53:42 UTC
A popup with the following message appears:
Unable to perform shutdown

org.freedesktop.hal.power-management.shutdown no
<-- (action, result)
                                [ Quit ]

HAL configured as follows:
[ebuild   R   ] sys-apps/hal-0.5.12_rc1-r2  USE="X acpi consolekit crypt disk-partition policykit -apm -debug -dell -doc -laptop (-selinux)" 0 kB

XFCE4 components (excerpt, hopefully the ones you care about):
[ebuild   R   ] xfce-base/xfce4-4.6.1  USE="alsa cups xscreensaver -minimal -oss" 0 kB
[ebuild   R   ] xfce-extra/exo-0.3.101  USE="hal libnotify python -debug -doc" 0 kB
[ebuild   R   ] xfce-extra/xfce4-power-manager-0.8.0_beta2  USE="xfce -debug" 0 kB

Will attach a photo I took of the warning.
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2009-05-05 13:54:48 UTC
Created attachment 190415 [details]
xfce-shutdown-failure.jpg
Comment 2 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-05-06 16:29:22 UTC
This is policykit denying access.  Do you have hal emerged with the policykit flag?  If so, do you have consolekit installed and running (/etc/init.d/consolekit)?

I suspect you have 2 options: you can enable policykit and consolekit, and add consolekit to your default runlevel, or you can disable the policykit USE flag.
Comment 3 Tony Vroon (RETIRED) gentoo-dev 2009-05-11 11:44:29 UTC
I have added the consolekit init script to the default runlevel. I can confirm that HAL has both consolekit & policykit set on both systems.
Both systems still fail to shut down or reboot, the error message remains the same.
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-05-11 13:18:36 UTC
Adding xfce@g.o for informational purposes
Comment 5 Sebastian Günther 2009-06-09 22:24:40 UTC
Well I suspect this change as root of all evil:

Do we have to add this rules on our own in the future?

--- /etc/dbus-1/system.d/hal.conf       2009-06-03 15:47:26.000000000 +0200
+++ /etc/config-archive/etc/dbus-1/system.d/hal.conf    2009-05-14 21:59:55.000000000 +0200
@@ -15,7 +15,6 @@
   </policy>
 
   <!-- Allow anyone to invoke methods on the Manager and Device interfaces -->
-  <!-- Policykit regulates actual access -->
   <policy context="default">
     <allow send_destination="org.freedesktop.Hal"
            send_interface="org.freedesktop.DBus.Introspectable"/>
@@ -58,5 +57,48 @@
 
   </policy>
 
+  <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
+  <policy group="plugdev">
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.DBus.Introspectable"/>
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.DBus.Properties" />
+
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.Hal.Device"/>
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.Hal.Manager"/>
+
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.DockStation"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.Leds"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.LightSensor"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.Storage"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.Volume"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+    <allow send_destination="org.freedesktop.Hal"
+          send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.Hal.Device.VideoAdapterPM"/>
+
+  </policy>
+
 </busconfig>
Comment 6 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-06-09 23:42:45 UTC
Those rules are added if you have -policykit on hal.  Otherwise, they are not.  If you have +policykit on hal, you must use policykit/consolekit to enable this kind of thing.
Comment 7 Sebastian Günther 2009-06-10 06:51:22 UTC
Well, then hal should definetly state this in it's elog!

And maybe one should provide a policy to regain the old behaviour.

Changing such things without being notified is not an option.

BTW: There is no way to zu circumvent consolkit with pam enabled and bluez-4.x since this rdepends pambase with consolkit enabled...
Comment 8 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-06-10 13:46:46 UTC
Hal does state this in the elog; and there's no reason why you can't emerge hal with -policykit even if something else is depending on policykit.  I haven't tried it, but it should work.

As for the option to re-add that policy, that is dbus policy.  It allows one to send messages to hal.  If hal is build with policykit enabled, then everyone can send messages to hal, and hal will use policykit to decide whether to answer the request.  The policy files for dbus and the status of the plugdev group won't matter.

Sort answer: For a desktop system, if you have -policykit, you need to be in plugdev.  This has not changed.  If you have policykit, then hal will use policykit to authenticate everything.  This has not changed.  All that's changed is that root is now included in the need for being in plugdev (and this is a change in dbus, not in hal).
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2009-09-04 07:13:19 UTC
Nothing left for xfce@ to do.
Comment 10 Daniel Gryniewicz (RETIRED) gentoo-dev 2010-01-20 13:16:25 UTC
Let me know if there's still a problem.
Comment 11 Thomas 2010-06-20 09:13:06 UTC
I just tripped over this problem (and then googled this bug report) after globally enabling the policykit flag.  Could someone leave a pointer here how to add a policy to re-enable shutdown and friends?  (I'm using xfce, not gnome.)