LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   battery applet not working in GNOME due to ACPI error (https://www.linuxquestions.org/questions/linux-from-scratch-13/battery-applet-not-working-in-gnome-due-to-acpi-error-346846/)

ParticleHunter 07-26-2005 04:02 AM

battery applet not working in GNOME due to ACPI error
 
Hi,

when I try to load the battery status applet, it shows me the following message:

Can't access ACPI events in /var/run/acpid.socket! Make sure the ACPI subsystem in working and the acpid daemon in running.

I have, of course, ACPI support in the kernel (no APM, only ACPI as I read mixing AMP and ACPI is not a good idea) and I installed acpid-1.0.4, but I still get that error every time I log into GNOME and try to load the applet...

how can I solve this problem?

Thanks in advance,

Julio

kjordan 07-26-2005 08:47 AM

Do you have acpid running?

ParticleHunter 07-26-2005 02:10 PM

Oops :eek: (forgot to make it run) :cry:

but there's not a BLFS bootscript for ACPI daemon (not sure but I think there isn't a rule for 'make install-acpi')...

how do I create the script for it to run? :scratch:

Julio

kjordan 07-26-2005 06:06 PM

Here's a bootscript I made with some files it uses.

/etc/rc.d/init.d/acpid
Code:

. /etc/sysconfig/rc
. $rc_functions

case "$1" in
        start)
                echo "Starting acpid..."
                if [ ! -e /proc/acpi ]; then
                        echo -n "ACPI support has not been compiled into the kernel"
                        echo_failure
                else
                        loadproc /usr/sbin/acpid -c /etc/acpi/events
                fi
                ;;
        stop)
                echo "Stopping acpid..."
                killproc /usr/sbin/acpid
                ;;
        restart)
                $0 stop
                sleep 1
                $0 start
                ;;
        status)
                statusproc /usr/bin/acpid
                ;;
        *)
                echo "Usage: $0 {start|stop|restart|status}"
                exit 1
                ;;
esac

/etc/acpi/events/default (from Gentoo)
Code:

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-1.0.4-default,v 1.2 2005/04/24 16:21:45 brix Exp $

# This is the ACPID default configuration, it takes all
# events and passes them to /etc/acpi/default.sh for further
# processing.

# event keeps a regular expression matching the event. To get
# power events only, just use something like "event=button[ /]power.*"
# to catch it.
# action keeps the command to be executed after an event occurs
# In case of the power event above, your entry may look this way:
#event=button[ /]power.*
#action=/sbin/init 0

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

event=.*
action=/etc/acpi/default.sh %e

/etc/acpi/default.sh
Code:

#!/bin/sh
# Default acpi script that takes an entry for all actions

set $*

group=${1/\/*/}
action=${1/*\//}

case "$group" in
        button)
                case "$action" in
                        power)  /sbin/init 0
                                ;;
                                esac
                                ;;
                        *)      logger "ACPI action $action is not defined"
                                ;;
                esac
                ;;

        *)
                logger "ACPI group $group / action $action is not defined"
                ;;
esac


ParticleHunter 07-27-2005 12:52 AM

Hi kjordan,

thanks for the valuable info ;)

Julio


All times are GMT -5. The time now is 01:56 PM.