grupo ACPI / ação undefined: processor / LNXCPU

11

Se eu desconectar meu laptop do adaptador AC, receberei erros da ACPI como estes:

May 07 21:45:04 veritas root[7067]: ACPI group/action undefined: processor / LNXCPU:00
May 07 21:45:04 veritas root[7076]: ACPI group/action undefined: processor / LNXCPU:01
May 07 21:45:04 veritas root[7078]: ACPI group/action undefined: processor / LNXCPU:02
May 07 21:45:04 veritas root[7080]: ACPI group/action undefined: processor / LNXCPU:03

acpi_listen dumps

ac_adapter ACPI0003:00 00000080 00000000
battery PNP0C0A:00 00000080 00000001
processor LNXCPU:00 00000080 00000015
processor LNXCPU:01 00000080 00000015
processor LNXCPU:02 00000080 00000015
processor LNXCPU:03 00000080 00000015
processor LNXCPU:00 00000081 00000000
processor LNXCPU:01 00000081 00000000
processor LNXCPU:02 00000081 00000000
processor LNXCPU:03 00000081 00000000
...
processor LNXCPU:00 00000080 00000000
processor LNXCPU:01 00000080 00000000
processor LNXCPU:02 00000080 00000000
processor LNXCPU:03 00000080 00000000

/etc/acpi/handler.sh parece não lidar com o evento processador / LNXCPU ...

#!/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'
                ;;
            open)
                logger 'LID opened'
                ;;
            *)
                logger "ACPI action undefined: $3"
                ;;
    esac
    ;;
    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

O pior é que vou ter sérios problemas de desempenho. (tudo está atrasado!) Suponho que isso se deva a tentativas repetidas de processador / LNXCPU, porque problemas de desempenho estão strongmente relacionados com erros de ação ACPI indefinida, e o desempenho será normal novamente se a reinicialização for feita.

No entanto, não consegui descobrir qual é a razão ... Eu tentei cpupower para controlar o modo de CPU (economia de energia ou desempenho) e desabilitar tlp , mas ambos não ajudaram.

Como isso acontece? O que é responsável por este problema? E, mais importante, como posso resolver isso? Muito obrigado!

ACOMPANHAMENTO : notei que a freqüência da CPU é de 400MHz (a seleção do modo performance não funciona), mas após a reinicialização ela se torna 800MHz (selecionando o modo performance a freq será 2.8GHz) .

    
por Mike Manilone 07.05.2017 / 15:49

1 resposta

0

If I unplug my laptop from the AC adapter, I will get ACPI errors like these ...

Isso foi sugerido em: " Adaptador AC ACPI conectado / desligado não reconhecido ".

rzepaczyk - My handler.sh:

# Default acpi script that takes an entry for all actions

minspeed='cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq'
maxspeed='cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq'
setspeed1="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
setspeed2="/sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed"
setspeed3="/sys/devices/system/cpu/cpu2/cpufreq/scaling_setspeed"
setspeed4="/sys/devices/system/cpu/cpu3/cpufreq/scaling_setspeed"

set $*

case "$1" in
    button/power)
        #echo "PowerButton pressed!">/dev/tty5
        case "$2" in
            PBTN|PWRF)  logger "PowerButton pressed: $2" ;;
            *)          logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/sleep)
        case "$2" in
            SLPB)   echo -n mem >/sys/power/state ;;
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;
    ac_adapter)
        case "$2" in
            AC*|ACAD*|ADP0*|AD*)
                case "$4" in
                    00000000)
                        echo -n $minspeed >$setspeed1
                        echo -n $minspeed >$setspeed2
                        echo -n $minspeed >$setspeed3
                        echo -n $minspeed >$setspeed4
                        #/etc/laptop-mode/laptop-mode start
                    ;;
                    00000001)
                        echo -n $maxspeed >$setspeed1
                        echo -n $maxspeed >$setspeed2
                        echo -n $maxspeed >$setspeed3
                        echo -n $maxspeed >$setspeed4
                        #/etc/laptop-mode/laptop-mode stop
                    ;;
                esac
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    battery)
        case "$2" in
            BAT0)
                case "$4" in
                    00000000)   #echo "offline" >/dev/tty5
                    ;;
                    00000001)   #echo "online"  >/dev/tty5
                    ;;
                esac
                ;;
            CPU0)
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/lid)
        case "$3" in
            close)
                #echo "LID closed!">/dev/tty5
                ;;
            open)
                #echo "LID opened!">/dev/tty5
                ;;
        esac
        ;;

    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

What I'm trying to do is to set cpu governor to ondemand when adapter is plugged in and powersave when adapter is unplugged. I saw that actions are undefined so I assumed that acpi is not recognizing actions (even with this:

ac_adapter)
           case "$2" in
           AC*|ACAD*|ADP0*|AD*)

)

entries in handler.sh .

Raynman - Looks like they are handled. acpi_listen shows ac_adapter events in addition to the undefined events that showed up in the log. These are handled by the case in your last quote. Then you have another case statement on $4 to distinguish between plugging (00000001) and unplugging (00000000). If you replace those echo statements by a call to cpufreq-set (or whatever else you can think of), it should work.

rzepaczyk - It's working, thanks for your help.

    
por 20.08.2018 / 09:37