https://bugzilla.kernel.org/show_bug.cgi?id=189371

--- Comment #2 from José Pekkarinen <koali...@gmail.com> ---
I forgot to add that obviously the kernel module is in place:

lsmod| grep button
button                 16384  1 i915

Here it's the /etc/acpi/events/default:

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

and the /etc/acpi/default.sh is this:

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

set $*                                                                          

group=${1%%/*}
action=${1#*/}
device=$2
id=$3
value=$4

log_unhandled() {
        logger "ACPI event unhandled: $*"
}

echo 'group: $group, action: $action, device: $device, id: $id, value: $value'
>> /var/log/acpi.events.log

case "$group" in
        button)
                case "$action" in
                        power)
                                /etc/acpi/actions/powerbtn.sh
                                ;;

                        # if your laptop doesnt turn on/off the display via
hardware
                        # switch and instead just generates an acpi event, you
can force
                        # X to turn off the display via dpms.  note you will
have to run
                        # 'xhost +local:0' so root can access the X DISPLAY.
                        #lid)
                        #       xset dpms force off
                        #       ;;

                        *)      log_unhandled $* ;;
                esac
                ;;

        ac_adapter)
                case "$value" in
                        # Add code here to handle when the system is unplugged
                        # (maybe change cpu scaling to powersave mode).  For
                        # multicore systems, make sure you set powersave mode
                        # for each core!
                        #*0)
                        #       cpufreq-set -g powersave
                        #       ;;

                        # Add code here to handle when the system is plugged in
                        # (maybe change cpu scaling to performance mode).  For
                        # multicore systems, make sure you set performance mode
                        # for each core!
                        #*1)
                        #       cpufreq-set -g performance
                        #       ;;

                        *)      log_unhandled $* ;;
                esac
                ;;

        *)      log_unhandled $* ;;
esac

The added echo at the beginning is my fault, and it doesn't shows anything in
that file.

cat /var/log/acpi.events.log 
ant acpi # 

Thanks!

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
------------------------------------------------------------------------------
_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to