:: Re: [DNG] ASCII doesn't suspend whe…
Inizio della pagina
Delete this message
Reply to this message
Autore: Didier Kryn
Data:  
To: dng
Oggetto: Re: [DNG] ASCII doesn't suspend when closing lid
Le 28/12/2017 à 12:35, J. Fahrner a écrit :
> Am 2017-12-28 11:05, schrieb Didier Kryn:
>
>>     My HP EliteBook running ASCII doesn't suspend when I close the
>> lid. It used to do with Debian Wheezy.
>
> I had the same problem when switching from Debian to Devuan. Solution
> is easy:
> You need the package "acpid".
> Look what events are triggered when closing the lid with "acpi_listen".


# acpi_listen
button/lid LID close
 PNP0C14:00 00000080 00000000
button/lid LID open
 PNP0C14:00 00000080 00000000

> Then create a rule and a script for this event.
>
> Example:
> /etc/acpi/events/lidbtn-acpi-support:
> event=button[ /]lid LID close
> action=/etc/acpi/lidbtn-acpi-support.sh "%e"

    This file doesn't exist, but there is a file just called lidbtn,
which contains the following:
----------------
# /etc/acpi/events/lidbtn
# Called when the user closes or opens the lid

event=button[ /]lid
action=/etc/acpi/lid.sh
---------------

    I started debugging /etc/acpi/lid.sh

The script is called and it has everything to work, except it doesn't
pass the following test:

if { CheckPolicy || HasLogindAndSystemd1Manager; }; then
        exit
fi

Suspend/resume works perfectly when these 3 lines are commented. Have
now to find what this CheckPolicy is doing...

    Didier