Pages

Linux Mint 15 Suspend when laptop lid is closed

I tried to use Power Management to set my laptop to Suspend when the lid is closed but instead it simply blanked the screen.

I found a workaround here, thanks to Unrealist.

In the file /etc/acpi/lid.sh comment out this line . /usr/share/acpi-support/screenblank something like this:


sudo pluma /etc/acpi/lid.sh

if [ $? = 0 ]
then
    for x in /tmp/.X11-unix/*; do
 displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
 getXuser;
 if [ x"$XAUTHORITY" != x"" ]; then
     export DISPLAY=":$displaynum"     
     #. /usr/share/acpi-support/screenblank
 fi
    done