You are not logged in.

#1 2015-02-14 01:12:36

JoeMBlair
Member
From: Glasgow
Registered: 2014-09-12
Posts: 2

ACPID not logging certain events after a couple of hours

I'm using ACPID and it's handler.sh file to suspend my laptop when the lid is closed on Macbook 4,1 2008. It works perfectly for about the first couple hour after my computer is booted.

After that thought it seems like it's not logging those events anymore. I've checked acpi_listen and only the volume, media controls and brightness get logged. Neither AC being plugged and unplugged or lid closed and opened are shown in acpi_listen. I''ve even checked /proc/acpi/button/lid/LID0/state file and it's correctly showing when the lid is closed or open.

ACPID Log

Feb 13 22:57:45 mars systemd[1]: Starting ACPI event daemon...
Feb 13 22:57:45 mars systemd[1]: Started ACPI event daemon.
Feb 13 22:57:45 mars acpid[240]: starting up with netlink and the input layer
Feb 13 22:57:45 mars acpid[240]: 1 rule loaded
Feb 13 22:57:45 mars acpid[240]: waiting for events: event logging is off
Feb 13 22:57:52 mars acpid[240]: client connected from 342[1000:1000]
Feb 13 22:57:52 mars acpid[240]: 1 client rule loaded
Feb 13 22:57:53 mars acpid[240]: client connected from 342[1000:1000]
Feb 13 22:57:53 mars acpid[240]: 1 client rule loaded
Feb 13 23:00:27 mars acpid[240]: client connected from 1112[1000:1000]
Feb 13 23:00:27 mars acpid[240]: 1 client rule loaded
Feb 13 23:00:34 mars logger[1125]: ACPI group/action undefined: processor / LNXCPU:00
Feb 13 23:00:36 mars acpid[240]: client 1112[1000:1000] has disconnected
Feb 13 23:01:51 mars logger[1258]: ACPI group/action undefined: button/volumedown / VOLDN
Feb 13 23:46:59 mars logger[4049]: ACPI group/action undefined: button/volumeup / VOLUP
Feb 14 00:22:54 mars acpid[240]: client connected from 7166[1000:1000]
Feb 14 00:22:54 mars acpid[240]: 1 client rule loaded
Feb 14 00:23:09 mars logger[7183]: ACPI action undefined: ACPI0003:00
Feb 14 00:23:09 mars logger[7185]: ACPI group/action undefined: processor / LNXCPU:00
Feb 14 00:23:10 mars logger[7187]: ACPI group/action undefined: processor / LNXCPU:01
Feb 14 00:23:25 mars logger[7204]: ACPI action undefined: ACPI0003:00
Feb 14 00:23:25 mars logger[7206]: ACPI group/action undefined: processor / LNXCPU:00
Feb 14 00:23:25 mars logger[7208]: ACPI group/action undefined: processor / LNXCPU:01
Feb 14 00:23:25 mars logger[7210]: ACPI action undefined: ACPI0003:00
Feb 14 00:23:25 mars logger[7212]: ACPI group/action undefined: processor / LNXCPU:00
Feb 14 00:23:25 mars logger[7214]: ACPI group/action undefined: processor / LNXCPU:01
Feb 14 00:23:25 mars logger[7216]: ACPI action undefined: ACPI0003:00
Feb 14 00:23:25 mars logger[7218]: ACPI group/action undefined: processor / LNXCPU:00
Feb 14 00:23:25 mars logger[7220]: ACPI group/action undefined: processor / LNXCPU:01
Feb 14 00:26:37 mars logger[7398]: ACPI group/action undefined: button/volumedown / VOLDN
Feb 14 00:26:37 mars logger[7403]: ACPI group/action undefined: button/volumedown / VOLDN
Feb 14 00:26:38 mars logger[7408]: ACPI group/action undefined: button/volumedown / VOLDN
Feb 14 00:32:54 mars logger[7742]: ACPI group/action undefined: video/brightnessup / BRTUP
Feb 14 00:32:55 mars logger[7746]: ACPI group/action undefined: video/brightnessup / BRTUP
Feb 14 00:32:55 mars logger[7751]: ACPI group/action undefined: video/brightnessdown / BRTDN
Feb 14 00:32:55 mars logger[7755]: ACPI group/action undefined: video/brightnessdown / BRTDN
Feb 14 00:35:07 mars acpid[240]: client 7166[1000:1000] has disconnected
Feb 14 00:35:18 mars systemd[1]: Stopping ACPI event daemon...
Feb 14 00:35:18 mars systemd[1]: Starting ACPI event daemon...
Feb 14 00:35:18 mars systemd[1]: Started ACPI event daemon.
Feb 14 00:35:19 mars acpid[8010]: starting up with netlink and the input layer
Feb 14 00:35:19 mars acpid[8010]: 1 rule loaded
Feb 14 00:35:19 mars acpid[8010]: waiting for events: event logging is off
Feb 14 00:35:19 mars acpid[8010]: client connected from 342[1000:1000]
Feb 14 00:35:19 mars acpid[8010]: 1 client rule loaded
Feb 14 00:35:20 mars acpid[8010]: client connected from 8015[1000:1000]
Feb 14 00:35:20 mars acpid[8010]: 1 client rule loaded
Feb 14 00:38:41 mars acpid[8010]: client 8015[1000:1000] has disconnected
Feb 14 00:42:46 mars systemd[1]: Stopping ACPI event daemon...
Feb 14 00:42:46 mars systemd[1]: Stopped ACPI event daemon.
Feb 14 00:42:56 mars systemd[1]: Starting ACPI event daemon...
Feb 14 00:42:56 mars systemd[1]: Started ACPI event daemon.
Feb 14 00:42:56 mars acpid[8854]: starting up with netlink and the input layer
Feb 14 00:42:56 mars acpid[8854]: 1 rule loaded
Feb 14 00:42:56 mars acpid[8854]: waiting for events: event logging is off
Feb 14 00:42:57 mars acpid[8854]: client connected from 342[1000:1000]
Feb 14 00:42:57 mars acpid[8854]: 1 client rule loaded
Feb 14 00:43:08 mars logger[8873]: ACPI group/action undefined: video/brightnessdown / BRTDN
Feb 14 00:43:08 mars logger[8877]: ACPI group/action undefined: video/brightnessdown / BRTDN
Feb 14 00:43:08 mars logger[8883]: ACPI group/action undefined: video/brightnessup / BRTUP
Feb 14 00:43:09 mars logger[8888]: ACPI group/action undefined: video/brightnessup / BRTUP
Feb 14 00:43:10 mars acpid[8854]: client connected from 8893[1000:1000]
Feb 14 00:43:10 mars acpid[8854]: 1 client rule loaded
Feb 14 00:43:12 mars logger[8903]: ACPI group/action undefined: video/brightnessdown / BRTDN
Feb 14 00:43:54 mars acpid[8854]: client 8893[1000:1000] has disconnected
Feb 14 00:47:31 mars logger[9167]: ACPI group/action undefined: processor / LNXCPU:00
Feb 14 00:47:44 mars logger[9183]: ACPI action undefined: ACPI0003:00
Feb 14 00:47:45 mars logger[9186]: ACPI group/action undefined: processor / LNXCPU:00
Feb 14 00:47:45 mars logger[9188]: ACPI group/action undefined: processor / LNXCPU:01
Feb 14 00:51:44 mars logger[9650]: ACPI group/action undefined: video/brightnessup / BRTUP

handler.sh

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

case "$1" in
    button/power)
        case "$2" in
            PBTN|PWRF)
                logger 'PowerButton pressed'
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;
    button/sleep)
        case "$2" in
            SLPB|SBTN)
                logger 'SleepButton pressed'
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;
    ac_adapter)
        case "$2" in
            AC|ACAD|ADP0)
                case "$4" in
                    00000000)
                        logger 'AC unpluged'
                        ;;
                    00000001)
                        logger 'AC pluged'
                        ;;
                esac
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;
    battery)
        case "$2" in
            BAT0)
                case "$4" in
                    00000000)
                        logger 'Battery online'
                        ;;
                    00000001)
                        logger 'Battery offline'
                        ;;
                esac
                ;;
            CPU0)
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/lid)
        case "$3" in
            close)
                logger 'LID closed'
		systemctl start suspend@joe.service
		pm-suspend
                ;;
            open)
                logger 'LID opened'
                ;;
            *)
                logger "ACPI action undefined: $3"
                ;;
    esac
    ;;
    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

# vim:set ts=4 sw=4 ft=sh et:

Last edited by JoeMBlair (2015-02-14 15:47:49)

Offline

Board footer

Powered by FluxBB