You are not logged in.

#1 2011-09-22 01:30:25

snoxu
Member
Registered: 2010-01-24
Posts: 141

Resume on lid open not working?

Hello fellow archers maybe one of you could share some insight into a little quirk I've ran into.

I've setup acpid to suspend on lid close via pm-suspend.

But on lid open nothing happens and I have to press a key to get my Vaio Z to wake.

This is what i have in the /etc/acpi/handler.sh

button/lid)
        #echo "LID switched!">/dev/tty5
        logger "ACPI lid switched $1 $2"
        if grep -q closed /proc/acpi/button/lid/LID0/state
        then
            logger "ACPI lid closed"
            /usr/sbin/pm-suspend
        else
            logger "ACPI lid opened"
            echo 0 > /sys/class/backlight/acpi_video0/brightness
        fi
        ;;
    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;

I'm having a second somewhat unrelated issued. I have two users. One user when pressing a key to resume I get the Gnome desktop immediately. The second user when pressing when pressing a key it resumes shows me desktop momentarily, then turns off the monitor. I have to press a key a second time to get the desktop.

A bit odd!

I'm running gnome power manager. lid actions turned off in Gnome 3 Tweak Tool, laptop-mode tools and acpid to pm-suspend.

Any insight into to these is appreciated

Last edited by snoxu (2011-09-22 01:31:37)

Offline

#2 2011-09-22 02:06:30

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Resume on lid open not working?

I think your first problem is more a laptop specific problem rather than an acpi problem. As long as the laptop is suspended no software can be executed. Hence, there need to be some initial trigger that awakes your laptop from suspend on lid opening. Take a look at your bios, maybe there is such a setting.

Regards

Offline

#3 2011-09-23 00:12:17

snoxu
Member
Registered: 2010-01-24
Posts: 141

Re: Resume on lid open not working?

I was under the impression it could resume on open lid. I could be wrong. I didn't find a specific setting in the BIOS for this besides what I assume are normal acpi settings.

Offline

#4 2011-09-23 03:08:43

snoxu
Member
Registered: 2010-01-24
Posts: 141

Re: Resume on lid open not working?

I figured it out.

To get resume on lid I installed a custom kernel and Vaio Control Center from AUR.

Vaio Control Center has an option to enable resume on lid open.

Offline

#5 2011-09-24 23:13:33

snoxu
Member
Registered: 2010-01-24
Posts: 141

Re: Resume on lid open not working?

One interesting thing when booting into the Arch kernel resume on open lid is still enabled, which leads me to believe maybe there's a config somewhere to enable it without the need of a custom kernel

Offline

#6 2011-12-12 08:03:55

xitrumch
Member
Registered: 2011-08-28
Posts: 2

Re: Resume on lid open not working?

add this part under "button/lid)" section of your /etc/acpi/handler.sh script:

       case "$(cat /proc/acpi/button/lid/LID0/state | awk '{print $2}')" in
                closed) /usr/sbin/pm-suspend
                ;;
                open)   echo "LID switched!">/dev/tty5
                ;;
        esac
        ;;

Be careful of the naming convention: LID, or LID0  on different pc though. One way to make sure you have the correct naming is to check which LID is inside your  /proc/acpi/button/lid/ folder.

Last edited by xitrumch (2011-12-12 08:05:47)

Offline

#7 2012-11-22 03:28:30

eruditorum
Member
Registered: 2012-11-12
Posts: 130

Re: Resume on lid open not working?

Unfortunately, I've got the same problem with my laptop.

In Windows there is some piece of crapware named "Samsung Control Center" which enables resume on lid open.
But I don't know how to set this up in [Arch]Linux.
May be there are some hidden hardware registers where it writes to?

Does anybody know how to do it in [Arch]Linux?

Last edited by eruditorum (2012-11-23 06:14:11)

Offline

Board footer

Powered by FluxBB