You are not logged in.

#1 2014-05-16 06:27:09

mindstalk
Member
Registered: 2014-05-16
Posts: 23

laptop sleeps on lid close -- why? [SOLVED]

New Arch install on a Dell Latitude E5530.  Some things had to be configured, like the sound keys.  Others work out of the box, or at least without anything I remember doing, like the screen brightness keys, and the laptop going to sleep/suspend when I close the lid, or shutting off right away when the power button is pressed.  In particular I would like to change the lid behavior, and maybe the power button behavior, but I'm not sure how.  [solved -- see posts 2 and 3]

/etc/acpi/handler.sh has
    button/power)
        case "$2" in
            PBTN|PWRF)
                logger 'PowerButton pressed'
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;
    button/sleep)
        case "$2" in
            SLPB|SBTN)
                logger 'SleepButton pressed'
                ;;
            *)
                logger "ACPI action undefined: $2"
                ;;
        esac
        ;;

    button/lid)
        case "$3" in
            close)
                logger 'LID closed'
                ;;
            open)
                logger 'LID opened'
                ;;
            *)
                logger "ACPI action undefined: $3"
                ;;
    esac

which has no obvious "go to sleep" commands, and there's nothing for the brightness keys (video/brightnessup from acpi_listen)
/etc/acpi/events is the standard "pass everything to handler.sh"

Nothing interesting in /etc/system looks uncommented.  I don't know where else to look.

Last edited by mindstalk (2014-05-16 18:52:22)

Offline

#2 2014-05-16 06:29:39

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,592

Re: laptop sleeps on lid close -- why? [SOLVED]

Offline

#3 2014-05-16 06:47:58

mindstalk
Member
Registered: 2014-05-16
Posts: 23

Re: laptop sleeps on lid close -- why? [SOLVED]

Aha, thank you!

"If these options are not configured, systemd will use its defaults: " answers why it was sleeping, and changing the line to
HandleLidSwitch=ignore
fixed that behavior.
And I guess I could map the power key to Hibernate, though I'm not sure if that'd be a good idea.  I'm not sure I have a Hibernate key on the keyboard; Fn-F1 is a moon and seem sto be sleep, Fn-F3 is lock, I'm not sure what F5 and F8 are showing...  I'd actually like an "are you sure?" but I guess I'd need a fancier WM than TWM for that.

Still don't know who's responding to the screen brightness keys, but that's not a high priority since they do what I'd want.

Offline

#4 2014-05-16 06:55:04

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,397

Re: laptop sleeps on lid close -- why? [SOLVED]

Sometime screen brightness is controlled by hardware itself.
If you can chenge brightness in the bios too, that's the case wink


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#5 2014-05-16 06:58:15

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: laptop sleeps on lid close -- why? [SOLVED]

mindstalk wrote:

I'm not sure I have a Hibernate key on the keyboard; Fn-F1 is a moon and seem sto be sleep,

Ehmm... 'hibernate' and 'sleep' are the same thing i.e. a suspend-to-disk operation. My 'moon' triggers hibernate.

Offline

#6 2014-05-16 07:06:49

mindstalk
Member
Registered: 2014-05-16
Posts: 23

Re: laptop sleeps on lid close -- why? [SOLVED]

kokoko3k wrote:

Sometime screen brightness is controlled by hardware itself.
If you can chenge brightness in the bios too, that's the case wink

Ah.  I'd wondered later if it was an acpi default.

Later use of xev IDed the top keys as ScrollLock, XF86TouchpadToggle (?!) and 'p'.  33 p. Okaayyy

"Ehmm... 'hibernate' and 'sleep' are the same thing i.e. a suspend-to-disk operation. My 'moon' triggers hibernate."

Err, I don't think so.  Hibernate writes memory to disk then shuts off, so you can restore state when you come back on.  Sleep (or in the acpi logo, suspend) just goes to a super low power mode, faster but will run out of battery eventually (especially as the power key keeps flashing.)

Woo, and when I tested moon-key-suspend just now, it didn't even break the net connection.  Bonus of wifi vs. ethernet, maybe.  Even a brief lid close killed my net connection when I'd been on ethernet, before.

Offline

Board footer

Powered by FluxBB