daemon doesn't start

Help
cjaegle
2006-01-24
2013-04-08
  • cjaegle

    cjaegle - 2006-01-24

    I'm using gentoo linux and the powersave daemon doesn't start. Tried the verbose option and I get following errors:
    (Many infos about empty values)

    [powersave]: ERROR (PM_Interface:87) Haldaemon not running. Battery or ac adapter information will not be available.

    [powersave]: ERROR (openSystemConnection:277) dbus_bus_request_name(): Error. (Connection ":1.15094" is not allowed to own the service "com.novell.powersave" due to security policies in the configuration file)

    [powersave]: ERROR (MainLoop:57) Error setting up connection to DBus system bus. Aborting...

    Hald and dbus are running.

    hal-0.5.5.1-r3
    dbus-0.60-r3

    Any ideas?

     
    • Holger Macht

      Holger Macht - 2006-01-25

      Please check whether there is a directory /etc/dbus-1/system.d/ and if so post the content of powersave.conf in that directory.

      Regards,
        Holger

       
      • cjaegle

        cjaegle - 2006-01-25

        There was no such file in /etc/dbus-1/system.d/, so I copied files from /usr/local/... to the corresponding directories (and /usr/local/(s)bin/powersave(d) to /usr/(s)bin. The init script returned many errors so I started /usr/sbin/powersaved, it seems to run (display got brighter ad I can see the entry in the process table), but I don't have any menu items in kpowersave, don't know why.

         
        • Holger Macht

          Holger Macht - 2006-01-25

          Please don't copy all those files. This will result in unexpected behaviour. So you found a powersave.conf in /usr/local/etc/dbus-1/system.d or something similiar? If so, it should be enough to only copy this file.

          So if the initscript does not work, please start the powersve daemon with:
            powersaved -v 3 -f /var/run/acpid.socket

          Please tell me the result.

          Regards,
            Holger

           
    • cjaegle

      cjaegle - 2006-01-25

      Installed acpid first. Here the output in /var/log/messages:

      Jan 25 15:32:54 defiant [powersave]: ERROR (PM_Interface:87) Haldaemon not running. Battery or ac adapter information will not be available.
      Jan 25 15:32:54 defiant [powersave]: WARNING (initSingleInterface:100) Kernel ondemand governor not working, trying userspace instead
      Jan 25 15:32:54 defiant [powersave-set_disk_settings][23504]: ERROR: invalid function call: do_remounts ''
      Jan 25 15:33:09 defiant logger: ACPI group battery / action battery is not defined

      defiant system.d # ps aux |grep hald
      102      23428  0.3  0.6   4684  3324 ?        Ss   15:32   0:01 /usr/sbin/hald --use-syslog
      102      23433  0.0  0.1   1740   676 ?        S    15:32   0:00 hald-addon-acpi
      102      23443  0.0  0.1   1740   656 ?        S    15:32   0:00 hald-addon-storage

       
      • Holger Macht

        Holger Macht - 2006-01-25

        So does kpowersave show more menue entries now?

        I will go through the error messages step by step:

        1 .ERROR (PM_Interface:87) Haldaemon not running. Battery or ac adapter information will not be available.

        If a 'powersave -b' or 'lshal' gives any reasonable output, you can ignore this message. It it caused by a check for a pidfile that can't be found.

        2. WARNING (initSingleInterface:100) Kernel ondemand governor not working, trying userspace instead

        It seems that the userspace governor for cpu frequency scaling is working. Good.

        3. ERROR: invalid function call: do_remounts ''

        Ignore it, it is already fixed in newer versions and does not cause any problems.

        4. logger: ACPI group battery / action battery is not defined

        That is acpid throwing this error. If you are using the powersave daemon, you need no processing of acpi buttons anymore. Please make sure that /etc/acpi/events/<file> does not contain any rules. Additionally, the powersaved should have installed a /etc/acpi/events.ignore/events.ignore file.

         
        • cjaegle

          cjaegle - 2006-01-25

          No not more entries. After some seconds there pops up a message which says that the powersave daemon isn't running.
          powersave - b gives a reasonable output.
          uncommented entries in /etc/acpi/events/default
          Thanks for your help so far.

          Sry for wrong location of my postings

           
          • Holger Macht

            Holger Macht - 2006-01-25

            Ok, so hal seems to be ok.

            Please do 'powersave -c' and tell me if the current cpufreq policy is printed. This assures that the connection to the powersaved can be established. Then we maybe have a problem with kpowersave...

            Now please also do:
              logger xxxxxx
              powersaved -v 15 -f /var/run/acpid.socket

            Now there should appear a line containing xxxxx in /var/log/messages. Please post the output starting from this line.

            Regards,
              Holger

             
            • cjaegle

              cjaegle - 2006-01-25

              Ah, there seems to be a problem with the user rights. When I start kpowersave as root, I can see the entries and powersave -c gives an correct output. Hm should I add the user to a special group?

               
              • Holger Macht

                Holger Macht - 2006-01-25

                Please post your /etc/dbus-1/system.conf.

                 
                • cjaegle

                  cjaegle - 2006-01-25

                  <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
                  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
                  <busconfig> 
                    <type>system</type> 
                    <user>messagebus</user>
                    <fork/> 
                    <pidfile>/var/run/dbus.pid</pidfile> 
                    <auth>EXTERNAL</auth>  <listen>unix:path=/var/run/dbus/system_bus_socket</listen>
                    <policy context="default">
                      <deny send_interface="*"/>
                      <deny receive_interface="*"/>
                      <deny own="*"/>  
                      <allow user="*"/>
                      <allow send_destination="org.freedesktop.DBus"/>
                      <allow receive_sender="org.freedesktop.DBus"/>   
                      <allow send_requested_reply="true"/>
                      <allow receive_requested_reply="true"/>
                    </policy>
                   
                    <includedir>system.d</includedir>
                   
                    <include ignore_missing="yes">system-local.conf</include>

                    <include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>

                  </busconfig>

                   
                  • Holger Macht

                    Holger Macht - 2006-01-25

                    This looks good. The problem must be within the powersave dbus config file then. Please replace the content of /etc/dbus-1/system.d/powersave.conf with the following:

                    -----------------------snip---------------------

                    <!DOCTYPE busconfig PUBLIC
                    "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
                    "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
                    <busconfig>

                      <!-- This configuration file specifies the required security policies
                           for the powersave daemone to work. -->

                      <policy context="default">
                         <deny own="com.novell.powersave"/>
                         <deny own="com.novell.powersave.manager"/>
                         <deny own="com.novell.powersave.request"/>
                         <deny own="com.novell.powersave.action"/>
                         <deny own="com.novell.powersave.scripts"/>
                         <deny own="com.novell.powersave.admin"/>

                         <allow send_interface="com.novell.powersave"/>
                         <allow send_interface="com.novell.powersave.manager"/>
                         <allow send_interface="com.novell.powersave.request"/>
                         <allow send_interface="com.novell.powersave.action"/>

                         <allow receive_interface="com.novell.powersave"/>
                         <allow receive_interface="com.novell.powersave.manager"/>
                         <allow receive_interface="com.novell.powersave.request"/>
                         <allow receive_interface="com.novell.powersave.action"/>
                      </policy>

                      <!-- Only root is allowed to own the powersave service -->
                      <policy user="root">
                        <allow own="com.novell.powersave"/>
                        <allow own="com.novell.powersave.manager"/>
                        <allow own="com.novell.powersave.request"/>
                        <allow own="com.novell.powersave.action"/>
                        <allow own="com.novell.powersave.scripts"/>
                        <allow own="com.novell.powersave.admin"/>

                        <allow send_interface="com.novell.powersave"/>
                        <allow send_interface="com.novell.powersave.manager"/>
                        <allow send_interface="com.novell.powersave.request"/>
                        <allow send_interface="com.novell.powersave.action"/>
                        <allow send_interface="com.novell.powersave.scripts"/>
                        <allow send_interface="com.novell.powersave.admin"/>

                        <allow receive_interface="com.novell.powersave"/>
                        <allow receive_interface="com.novell.powersave.manager"/>
                        <allow receive_interface="com.novell.powersave.request"/>
                        <allow receive_interface="com.novell.powersave.action"/>
                        <allow receive_interface="com.novell.powersave.scripts"/>
                        <allow receive_interface="com.novell.powersave.admin"/>
                      </policy>

                    </busconfig>

                    -------------------------snip-------------------------------

                    Regards,
                      Holger

                     
                    • cjaegle

                      cjaegle - 2006-01-25

                      Thank you very much, now it's running.
                      One last question. I can only choose suspend to disk (not working now, but that's probably not related to this software), what do I have to do when I would like to have the possibility to select suspend to ram and standby? (When I remember correctly sus to ram worked a few weeks ago)

                       
                      • Holger Macht

                        Holger Macht - 2006-01-25

                        For getting suspend to ram and standby (if supported) enabled, you have to change the variables DISABLE_USER_SUSPEND2DISK and DISABLE_USER_SUSPEND2RAM in the powersave sleep configuration file. For suspend to disk, you need a software suspend (not swsusp2) enabled kernel.

                        Just a note: With the removed at_console policy in the dbus configuration file, any user logged in remote to your machine can suspend it. Maybe you know somebody from gentoo who you can ask if there is a replacement for at_console in gentoo?

                        Now I would have a request. Would it be possible for you to summarize the outcomes of this thread and write a short guide how to get the powersave daemon and kpowersave running on gentoo? What needs to be installed, configuration etc. Maybe you can put it in the gentoo wiki and send it to me that we can also include it in our documentation. Just if you like.

                        Regards,
                          Holger

                         
                        • cjaegle

                          cjaegle - 2006-01-26

                          Probably not the next few days but then I'l try to do
                          ebuilds, never did this before, so I'm not sure if I will have success.
                          Perhaps I can write some lines here what I did, but it's not gentoo specific, so it would be better if there were ebuilds for powersave and kpowersave and a short description of how to use them.
                          Is the acpi daemon required for powersave(d)?

                           
                          • Holger Macht

                            Holger Macht - 2006-01-26

                            Ebuilds would be great!

                            Yes, acpid is required. And also hal, dbus and in recent versions cpufreq-utils.

                            The problem with at_console _is_ system specific. It depends on what the system supports. SUSE and Fedora are the two I know they do.

                            Thanks anyway,
                              Holger

                             
                            • cjaegle

                              cjaegle - 2006-01-26

                              ah mom, I didnt' use your posted configuration file, I only changed send/recieve interface from deny to allow for default context policy.
                              I did't change or remove at_console policy.

                               
                              • Holger Macht

                                Holger Macht - 2006-01-26

                                Yes, if you enable those for context default, it is  enabled for default ;-) But on you system it is not sufficient to enable it for at_console.

                                 
    • cjaegle

      cjaegle - 2006-01-25

      No not more entries. After some seconds there pops up a message which says that the powersave daemon isn't running.
      powersave - b gives a reasonable output.
      uncommented entries in /etc/acpi/events/default
      Thanks for your help so far.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks