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


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to