Your message dated Sat, 8 Nov 2014 16:36:58 +0100
with message-id <[email protected]>
and subject line Re: [Pkg-acpi-devel] Bug#768551: acpi-support: Sleep doesn't 
work when lid is closed
has caused the Debian Bug report #768551,
regarding acpi-support: Sleep doesn't work when lid is closed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
768551: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768551
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: acpi-support
Version: 0.142-5
Severity: important

Dear Maintainer,

After a recent upgrade, sleep functionality stopped working on a Lenovo X230
laptop. On further investigation it seemed the condition in
/etc/acpi-support/lid.sh

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

was succeeding without then carrying on to subsequently calling pm-suspend.

After commenting out the exit above (also in the attached version of lid.sh)
sleep is working again.

I suspect commenting out exit is not the right way to fix the problem but don't
know enough to do it properly.

As an aside, I'd also like to argue that ACPI_SLEEP=true should be the default
in /etc/default/acpi-support to make sleep work out of the box (which it did
before the upgrade).

Thanks,
Punit

-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages acpi-support depends on:
ii  acpi-support-base  0.142-5
ii  acpid              1:2.0.23-1
ii  lsb-base           4.1+Debian13+nmu1
ii  pm-utils           1.4.1-15
ii  x11-xserver-utils  7.7+3

Versions of packages acpi-support recommends:
ii  acpi-fakekey  0.142-5
ii  rfkill        0.5-1

Versions of packages acpi-support suggests:
pn  radeontool    <none>
ii  vbetool       1.1-3
pn  xinput        <none>
ii  xscreensaver  5.30-1+b1

-- Configuration Files:
/etc/acpi/lid.sh changed:
test -f /usr/share/acpi-support/state-funcs || exit 0

. /usr/share/acpi-support/power-funcs
. /usr/share/acpi-support/policy-funcs
. /etc/default/acpi-support

[ -x /etc/acpi/local/lid.sh.pre ] && /etc/acpi/local/lid.sh.pre
if { CheckPolicy || HasLogindAndSystemd1Manager; }; then
#       exit
fi

grep -q closed /proc/acpi/button/lid/*/state
if [ $? -eq 0 ]
then
    . /usr/share/acpi-support/screenblank
    if [ x$LID_SLEEP = xtrue ]; then
        pm-suspend
        if [ $? -ne 0 -a x$LID_SHUTDOWN = xtrue ]; then
                shutdown -P now
        fi
    fi
else
    d=/tmp/.X11-unix
    for x in $d/X*; do
        displaynum=${x#$d/X}
        getXuser;
        if [ x$XAUTHORITY != x ]; then
            export DISPLAY=":$displaynum"
            if [ x$RADEON_LIGHT = xtrue ]; then
                [ -x /usr/sbin/radeontool ] && radeontool light on
            fi
            case "$DISPLAY_DPMS" in
                xset)
                        su "$XUSER" -s /bin/sh -c "xset dpms force on"
                        ;;
                xrandr)
                        su "$XUSER" -s /bin/sh -c "xrandr --output 
$XRANDR_OUTPUT --auto"
                        ;;
                vbetool)
                        /usr/sbin/vbetool dpms on
                        ;;
            esac
            if pidof xscreensaver > /dev/null; then
                if on_ac_power; then 
                    su "$XUSER" -s /bin/sh -c "xscreensaver-command -unthrottle"
                fi
                su "$XUSER" -s /bin/sh -c "xscreensaver-command -deactivate"
            fi
        else
            if [ -x$DISPLAY_DPMS_NO_USER = xtrue ]; then
                [ -x /usr/sbin/vbetool ] && /usr/sbin/vbetool dpms on
            fi 
        fi
    done
fi
[ -x /etc/acpi/local/lid.sh.post ] && /etc/acpi/local/lid.sh.post

/etc/default/acpi-support changed:
ACPI_SLEEP=true
ACPI_HIBERNATE=true
LOCK_SCREEN=true
LID_SLEEP=true
DISPLAY_DPMS=xset
XRANDR_OUTPUT=LVDS


-- no debconf information

--- End Message ---
--- Begin Message ---
On Sat, Nov 08, 2014 at 10:41:31AM +0000, Punit Agrawal wrote:
> After a recent upgrade, sleep functionality stopped working on a Lenovo X230
> laptop. On further investigation it seemed the condition in
> /etc/acpi-support/lid.sh
> 
> if { CheckPolicy || HasLogindAndSystemd1Manager; }; then
>       exit
> fi
> 
> was succeeding without then carrying on to subsequently calling pm-suspend.

Which indeed it was it is supposed to do. The reason for this check is that
acpi-support is only the last resort for calling in the action. I don't know
which version you upgraded from so I cannot guess which other software you have
running that is supposed to handle the lid switch. But the test definitely
suggests one is and therefore acpi-support stops and lets that other software
handle it.

Michael 

-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL

--- End Message ---

Reply via email to