How to run something when laptop lid is closed?

Hi,
I'm running Arch on my EEEpc 1000h. I'd like to run certain commands when I close the lid. Can this be done?
Thanks in advance.

Check the aur for acpi-eee and acpi-eeepc-generic. Install one of them and configure it to do a specific task when the lid is closed.

Similar Messages

  • 10.4.9 dies when laptop lid is closed

    I installed 10.4.9 on my 17" MacBookPro a while ago. The OS runs fine with my applications, but I've found that the OS often crashes when I close the lid. It doesn't happen all the time, but it's starting to become an annoyance. The light is on and the laptop is hot, so the computer is on, but the OS is dead. I've been dealing with it by opening the battery compartment so that the computer shuts off and then restarting. After booting up, the OS tells me that it had crashed. Has anyone seen this phenomenon, and if so, is there some sort of workaround?
    Steve Seidman

    It seems strange, but I tried it again and this is exactly what happens when I start Disk Utility from the DVD. The lefthand window of Disk Utility shows two disks: my 100G hard drive and the 2.6G DVD. I was also surprised to see the second-level disc description (under 93.2 GB FUJITSU...) show two items: something called "disk0s1" and "Macintosh HD". The first item is shown having partition type EFI and 200G capacity, but no availability. The second item is the Macintosh HD as it should be: capacity 92.8 GB, of which 27.3 GB is currently used. However, when I select that item, I am only allowed to verify and repair disk permissions. The "Verify Disk" and "Repair Disk" buttons are grayed.
    Steve

  • SQL Developer 1.5.1 on XP: Abruptly aborts when laptop lid is closed

    I have SQLD 1.5.1 (latest version available for download, build 5440) on Windows XP (on a Lenovo laptop T60). When I am headed to say a meeting for example, and close the lid of the laptop so it goes to sleep/hibernate and then come back and open the lid, this new version seems to just disappear i.e. the application has closed, loosing all open editors etc.
    Has anyone noticed this?
    Thanks,
    Manish

    Unfortunately for your 8i DBs, there is a note in the [release notes|http://www.oracle.com/technology/products/database/sql_developer/files/relnotes_v151.html] that says:
    The JDBC drivers shipped are 11g R1. This means that users will no longer be able to connect to an Oracle 8.1.7 database.
    theFurryOne

  • Internet Connection off when Laptop Lid Closes

    Hi. I just bought my first Mac. A macbook pro. I like to leave my AIM or Ichat on but would like to close the lid to my laptop. Everytime I do, it logs me off. I think this is because of the sleep function. Is there a way to configure so that it doesnt lose my internet everytime???

    nope, it is a physical hardware switch that disables the internet when the lid is closed. the only way to disable it is to use your computer in clamshell mode, which means you need an exteral moniter, keyboard, and mouse

  • System always auto-suspends when the lid is closed

    Hello,
    I am trying to prevent my laptop (a System76 Lemur Ultra 3) from suspending when the lid is closed.  No matter what I change in the configuration, the laptop always suspends when the lid is closed.  The output of journalctl is as follows after this happens:
    Feb 21 04:35:32 hostname systemd-logind[196]: Lid closed.
    Feb 21 04:35:32 hostname systemd-logind[196]: Suspending...
    Feb 21 04:35:32 hostname systemd[1]: Starting Sleep.
    Feb 21 04:35:32 hostname systemd[1]: Reached target Sleep.
    Feb 21 04:35:32 hostname systemd[1]: Starting Suspend...
    Feb 21 04:35:33 hostname systemd-sleep[2001]: Suspending system...
    Feb 21 04:35:33 hostname kernel: PM: Syncing filesystems ... done.
    Feb 21 04:35:33 hostname kernel: PM: Preparing system for mem sleep
    Feb 21 04:35:43 hostname kernel: Freezing user space processes ... (elapsed 0.06 seconds) done.
    Feb 21 04:35:43 hostname kernel: Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
    Feb 21 04:35:43 hostname systemd[1]: Time has been changed
    Feb 21 04:35:43 hostname systemd[1]: systemd-tmpfiles-clean.timer: time change, recalculating next elapse.
    Feb 21 04:35:43 hostname systemd-logind[196]: Lid opened.
    Feb 21 04:35:43 hostname acpid[190]: client 1812[0:100] has disconnected
    Feb 21 04:35:43 hostname kernel: PM: Entering mem sleep
    Feb 21 04:35:43 hostname kernel: Suspending console(s) (use no_console_suspend to debug)
    Feb 21 04:35:43 hostname kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
    Feb 21 04:35:43 hostname kernel: sd 0:0:0:0: [sda] Stopping disk
    Feb 21 04:35:43 hostname kernel: PM: suspend of devices complete after 1092.547 msecs
    Feb 21 04:35:43 hostname kernel: PM: late suspend of devices complete after 0.556 msecs
    Feb 21 04:35:43 hostname kernel: jme 0000:03:00.0: wake-up capability enabled by ACPI
    Feb 21 04:35:43 hostname kernel: ehci_hcd 0000:00:1d.0: wake-up capability enabled by ACPI
    Feb 21 04:35:43 hostname kernel: ehci_hcd 0000:00:1a.0: wake-up capability enabled by ACPI
    Feb 21 04:35:43 hostname kernel: PM: noirq suspend of devices complete after 66.095 msecs
    Feb 21 04:35:43 hostname kernel: ACPI: Preparing to enter system sleep state S3
    Feb 21 04:35:43 hostname kernel: PM: Saving platform NVS memory
    Feb 21 04:35:43 hostname kernel: Disabling non-boot CPUs ...
    Feb 21 04:35:43 hostname kernel: smpboot: CPU 1 is now offline
    Feb 21 04:35:43 hostname kernel: smpboot: CPU 2 is now offline
    Feb 21 04:35:43 hostname kernel: smpboot: CPU 3 is now offline
    Feb 21 04:35:43 hostname kernel: smpboot: CPU 4 is now offline
    Feb 21 04:35:43 hostname kernel: smpboot: CPU 5 is now offline
    Feb 21 04:35:43 hostname kernel: smpboot: CPU 6 is now offline
    Feb 21 04:35:43 hostname kernel: smpboot: CPU 7 is now offline
    Feb 21 04:35:43 hostname kernel: Extended CMOS year: 2000
    Feb 21 04:35:43 hostname kernel: ACPI: Low-level resume complete
    Feb 21 04:35:43 hostname kernel: PM: Restoring platform NVS memory
    Feb 21 04:35:43 hostname kernel: Extended CMOS year: 2000
    Feb 21 04:35:43 hostname kernel: Enabling non-boot CPUs ...
    Feb 21 04:35:43 hostname systemd-sleep[2001]: System resumed.
    Feb 21 04:35:43 hostname kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
    Feb 21 04:35:43 hostname kernel: CPU1 is up
    Feb 21 04:35:43 hostname kernel: smpboot: Booting Node 0 Processor 2 APIC 0x4
    Feb 21 04:35:43 hostname kernel: CPU2 is up
    Feb 21 04:35:43 hostname kernel: smpboot: Booting Node 0 Processor 3 APIC 0x6
    Feb 21 04:35:43 hostname kernel: CPU3 is up
    Feb 21 04:35:43 hostname kernel: smpboot: Booting Node 0 Processor 4 APIC 0x1
    Feb 21 04:35:43 hostname kernel: CPU4 is up
    Feb 21 04:35:43 hostname kernel: smpboot: Booting Node 0 Processor 5 APIC 0x3
    Feb 21 04:35:43 hostname kernel: CPU5 is up
    Feb 21 04:35:43 hostname kernel: smpboot: Booting Node 0 Processor 6 APIC 0x5
    Feb 21 04:35:43 hostname kernel: CPU6 is up
    Feb 21 04:35:43 hostname kernel: smpboot: Booting Node 0 Processor 7 APIC 0x7
    Feb 21 04:35:43 hostname kernel: CPU7 is up
    Feb 21 04:35:43 hostname kernel: ACPI: Waking up from system sleep state S3
    Feb 21 04:35:43 hostname kernel: ehci_hcd 0000:00:1a.0: wake-up capability disabled by ACPI
    Feb 21 04:35:43 hostname kernel: ehci_hcd 0000:00:1d.0: wake-up capability disabled by ACPI
    Feb 21 04:35:43 hostname kernel: PM: noirq resume of devices complete after 133.251 msecs
    Feb 21 04:35:43 hostname kernel: PM: early resume of devices complete after 0.425 msecs
    The first thing I did was to disable systemd's acpi features by setting /etc/systemd/logind.conf as follows:
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    # See logind.conf(5) for details
    [Login]
    #NAutoVTs=6
    #ReserveVT=6
    #KillUserProcesses=no
    #KillOnlyUsers=
    #KillExcludeUsers=root
    #Controllers=
    #ResetControllers=cpu
    #InhibitDelayMaxSec=5
    HandlePowerKey=ignore
    HandleSuspendKey=ignore
    HandleHibernateKey=ignore
    HandleLidSwitch=ignore
    #PowerKeyIgnoreInhibited=no
    #SuspendKeyIgnoreInhibited=no
    #HibernateKeyIgnoreInhibited=no
    #LidSwitchIgnoreInhibited=yes
    IdleAction=suspend
    IdleActionSec=45min
    However, the behavior was the same as before.  I also tried setting
    LidSwitchIgnoreInhibited=no
    but after reading man 5 logind.conf it seems that this is unnecessary (and it had no effect when I tried it).
    acpid is also installed but I have commented out the contents of /etc/acpi/handler.sh as well as all the scripts in /etc/acpi/actions.  I noticed that there is also a UPower daemon which was installed as a dependency and thought that it might be triggering the suspend.  I tried setting
    IgnoreLid=true
    in /etc/UPower/UPower.conf but this also had no effect.
    systemctl list-units has the following output:
    UNIT LOAD ACTIVE SUB DESCRIPTION
    proc-sys-fs-binfmt_misc.automount loaded active waiting Arbitrary Executable File Formats File System Automount Point
    sys-devices-pci0000:00-0000:00:1b.0-sound-card0.device loaded active plugged /sys/devices/pci0000:00/0000:00:1b.0/sound/card0
    sys-devices-pci0000:00-0000:00:1c.2-0000:02:00.0-net-wlan0.device loaded active plugged /sys/devices/pci0000:00/0000:00:1c.2/0000:02:00.0/net/wlan0
    sys-devices-pci0000:00-0000:00:1c.3-0000:03:00.0-net-eth0.device loaded active plugged /sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/net/eth0
    sys-devices-pci0000:00-0000:00:1d.0-usb2-2\x2d1-2\x2d1.2-2\x2d1.2.1-2\x2d1.2.1.1-2\x2d1.2.1.1.1-2\x2d1.2.1.1.1:1.2-sound-card1.device loaded active plugged 0819
    sys-devices-pci0000:00-0000:00:1d.0-usb2-2\x2d1-2\x2d1.2-2\x2d1.2.1-2\x2d1.2.1.3.device loaded active plugged Deskjet_5400_series
    sys-devices-pci0000:00-0000:00:1f.2-ata1-host0-target0:0:0-0:0:0:0-block-sda-sda1.device loaded active plugged ST9500420AS
    sys-devices-pci0000:00-0000:00:1f.2-ata1-host0-target0:0:0-0:0:0:0-block-sda-sda2.device loaded active plugged ST9500420AS
    sys-devices-pci0000:00-0000:00:1f.2-ata1-host0-target0:0:0-0:0:0:0-block-sda.device loaded active plugged ST9500420AS
    sys-devices-pci0000:00-0000:00:1f.2-ata3-host2-target2:0:0-2:0:0:0-block-sr0.device loaded active plugged TSSTcorp_CDDVDW_SN-208AB
    sys-devices-platform-serial8250-tty-ttyS0.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS0
    sys-devices-platform-serial8250-tty-ttyS1.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS1
    sys-devices-platform-serial8250-tty-ttyS2.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS2
    sys-devices-platform-serial8250-tty-ttyS3.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS3
    sys-module-configfs.device loaded active plugged /sys/module/configfs
    sys-subsystem-net-devices-eth0.device loaded active plugged /sys/subsystem/net/devices/eth0
    sys-subsystem-net-devices-wlan0.device loaded active plugged /sys/subsystem/net/devices/wlan0
    -.mount loaded active mounted /
    dev-hugepages.mount loaded active mounted Huge Pages File System
    dev-mqueue.mount loaded active mounted POSIX Message Queue File System
    media-usbhd\x2dsda1.mount loaded active mounted /media/usbhd-sda1
    sys-kernel-config.mount loaded active mounted Configuration File System
    sys-kernel-debug.mount loaded active mounted Debug File System
    tmp.mount loaded active mounted Temporary Directory
    cups.path loaded active waiting CUPS Printer Service Spool
    systemd-ask-password-console.path loaded active waiting Dispatch Password Requests to Console Directory Watch
    systemd-ask-password-wall.path loaded active waiting Forward Password Requests to Wall Directory Watch
    acpid.service loaded active running ACPI event daemon
    atd.service loaded active running ATD daemon
    cronie.service loaded active running Periodic Command Scheduler
    cups.service loaded active running CUPS Printing Service
    dbus.service loaded active running D-Bus System Message Bus
    [email protected] loaded active running Getty on tty1
    laptop-mode.service loaded active exited Laptop Mode Tools
    polkit.service loaded active running Authorization Manager
    postfix.service loaded active running Postfix Mail Transport Agent
    systemd-journald.service loaded active running Journal Service
    systemd-logind.service loaded active running Login Service
    systemd-modules-load.service loaded active exited Load Kernel Modules
    systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
    systemd-sysctl.service loaded active exited Apply Kernel Variables
    systemd-tmpfiles-setup.service loaded active exited Recreate Volatile Files and Directories
    systemd-udev-trigger.service loaded active exited udev Coldplug all Devices
    systemd-udevd.service loaded active running udev Kernel Device Manager
    systemd-user-sessions.service loaded active exited Permit User Sessions
    systemd-vconsole-setup.service loaded active exited Setup Virtual Console
    upower.service loaded active running Daemon for power management
    wicd.service loaded active running Wicd a wireless and wired network manager for Linux
    acpid.socket loaded active listening ACPID Listen Socket
    cups.socket loaded active running CUPS Printing Service Sockets
    dbus.socket loaded active running D-Bus System Message Bus Socket
    dmeventd.socket loaded active listening Device-mapper event daemon FIFOs
    lvmetad.socket loaded active listening LVM2 metadata daemon socket
    systemd-initctl.socket loaded active listening /dev/initctl Compatibility Named Pipe
    systemd-journald.socket loaded active running Journal Socket
    systemd-shutdownd.socket loaded active listening Delayed Shutdown Socket
    systemd-udevd-control.socket loaded active listening udev Control Socket
    systemd-udevd-kernel.socket loaded active running udev Kernel Socket
    basic.target loaded active active Basic System
    cryptsetup.target loaded active active Encrypted Volumes
    getty.target loaded active active Login Prompts
    graphical.target loaded active active Graphical Interface
    local-fs-pre.target loaded active active Local File Systems (Pre)
    local-fs.target loaded active active Local File Systems
    multi-user.target loaded active active Multi-User
    network.target loaded active active Network
    printer.target loaded active active Printer
    remote-fs.target loaded active active Remote File Systems
    sockets.target loaded active active Sockets
    sound.target loaded active active Sound Card
    suspend.target loaded active active Suspend
    swap.target loaded active active Swap
    sysinit.target loaded active active System Initialization
    systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
    LOAD = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB = The low-level unit activation state, values depend on unit type.
    74 loaded units listed. Pass --all to see loaded but inactive units, too.
    To show all installed unit files use 'systemctl list-unit-files'.
    Any ideas on what might be causing the system to suspend when the lid is closed would be appreciated.
    Thanks
    Last edited by Superposition (2013-02-21 15:48:06)

    qinohe wrote:You don't have to disable acpi!
    Since you made the complete switch to systemd, why not let systemd handle this kind of events?
    I was referring to the suggestion of setting acpi=off on the kernel line.  systemd can only run a few preset actions on events like lid close (e.g. suspend, poweroff, ignore, etc.).  I need to run custom scripts.  Also, for some reason I still do not fully understand, it was not working properly.  The log in my original post seems to show that it was initiating the suspend.
    qinohe wrote:
    progandy wrote:Yes, it is easier, but my laptop should react differently depending on the power source. With AC power lid-switch locks the screen, in battery mode it suspends. That is impossible with systemd.
    Yes you need something like laptop-mode-tools for that, I know systemd will not do that, for now.
    But that is not the issue here!, the issue here is that the llid-switch-button' shouldn't be used at all.
    For as far as possible I would still recommend systemd to handle your events!, but it's your decision finally!
    You need acpid for that not laptop-mode-tools.  This is exactly what apcid is for --- running user scripts on ACPI events.
    Anyway, I finally have this fixed though I still have no idea what the problem was.  I ran out of ideas on how to fix it and #archlinux didn't know either so I went the painful but sure route.  I did full reinstall and reinstalled all programs.  logind was still behaving as this point (not ignoring it's logind.conf file as it seemed to be before the reinstall) after this so I concluded that the packages installed were not the problem at least with their default configs.  After that, I gradually restored the config files I cared about while testing to see if logind still worked correctly.  Contrary, to what I expected it never broke and I was able to restore all modified configs and get correct behavior.
    I suspect there was some old out of date config file somewhere that was causing the problem but it's hard to say which one it was.  I could probably figure it out with a bit more experimentation but have already spent enough time fixing this...
    In case anyone else needs a similar configuration, the relevant files are as follows.  This sets up the system to lock whenever systemd executes a suspend action.  It also sets up acpid to suspend on lid close.
    Make sure you have installed acpid and enabled it to run at startup.
    /etc/systemd/logind.conf
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    # See logind.conf(5) for details
    [Login]
    /etc/systemd/logind.conf
    #NAutoVTs=6
    #ReserveVT=6
    #KillUserProcesses=no
    #KillOnlyUsers=
    #KillExcludeUsers=root
    #Controllers=
    #ResetControllers=cpu
    #InhibitDelayMaxSec=5
    HandlePowerKey=ignore
    HandleSuspendKey=ignore
    HandleHibernateKey=ignore
    HandleLidSwitch=ignore
    #PowerKeyIgnoreInhibited=no
    #SuspendKeyIgnoreInhibited=no
    #HibernateKeyIgnoreInhibited=no
    #LidSwitchIgnoreInhibited=yes
    #IdleAction=ignore
    #IdleActionSec=30min
    /etc/acpi/handler.sh
    #!/bin/bash
    # Default acpi script that takes an entry for all actions
    case "$1" in
    button/power)
    case "$2" in
    PBTN|PWRF)
    logger 'PowerButton pressed'
    /usr/bin/systemctl poweroff
    logger "ACPI action undefined: $2"
    esac
    button/sleep)
    case "$2" in
    SLPB|SBTN)
    logger 'SleepButton pressed'
    /usr/bin/systemctl suspend
    logger "ACPI action undefined: $2"
    esac
    ac_adapter)
    case "$2" in
    AC|ACAD|ADP0)
    case "$4" in
    00000000)
    logger 'AC unpluged'
    /usr/sbin/laptop_mode auto
    00000001)
    logger 'AC pluged'
    /usr/sbin/laptop_mode auto
    esac
    logger "ACPI action undefined: $2"
    esac
    battery)
    case "$2" in
    BAT0)
    case "$4" in
    00000000)
    logger 'Battery online'
    /usr/sbin/laptop_mode auto
    00000001)
    logger 'Battery offline'
    /usr/sbin/laptop_mode auto
    esac
    CPU0)
    *) logger "ACPI action undefined: $2" ;;
    esac
    button/lid)
    case "$3" in
    close)
    logger 'LID closed'
    /usr/sbin/laptop_mode auto
    if [ $(cat /sys/class/power_supply/ADP0/online) -eq 0 ]; then
    /usr/bin/systemctl suspend
    fi
    open)
    logger 'LID opened'
    /usr/sbin/laptop_mode auto
    logger "ACPI action undefined: $3"
    esac
    logger "ACPI group/action undefined: $1 / $2"
    esac
    # vim:set ts=4 sw=4 ft=sh et:
    Last edited by Superposition (2013-02-23 23:15:54)

  • After 10.8.2 update i can no longer wake my macbook from standby with keyboard when the lid is closed

    I just updated to 10.8.2 and now i can no longer wake my macbook froom standby when the lid is closed, it directly goes back to sleep
    steps to reproduce:
    1. attach secondary monitor and keyboard
    2. close lid
    3. wait 5 seconds for going to standby
    4. press any key on keyboard and type in user-credentials (notice how the 2nd monitor becomes the mainscreen)
    5. wait 5 seconds
    6. standby again
    side note:
    i also have sudo nvram boot-args="iog=0x0" enabled, because i like to not use the integrated screen when its attached to a secondary screen, but since it goes back to standby right after login this is pretty much pointless

    Same here, I think changed something in 10.8.2 that wrecked the "Open-MBP Clamshell Mode."  sigh

  • [SOLVED]Gnome 3.4 is not suspending when the lid is closed.

    Hey..
    Since upgrading to gnome 3.4.1, my laptop does not suspend when the lid is closed.
    I have read this this thread without getting a clear answer...
    I have checked the setting in gnome tweak tool, and they are both set to "Suspend"
    The laptop has no problem suspending, if i run the command, or choose the option in the menu to the right.
    Is this a bug ?
    What can i do to fix it. ?
    Last edited by Munken (2012-06-20 05:54:08)

    See this thread for updates on the problem.

  • T420 - delete key gets pressed when screen/lid is closed

    Anyone run into this?
    I work at a large company and so far we have recieved a bunch of laptops where the delete key gets pressed if the lid is closed.
    I have tried replacing the KB but issue persists.
    Upon closer investigation, the DEL key does seem a bit raised when compared to other keys on the KB.

    ColonelONeill wrote:
    Strange, the DEL key is level for me.
    Have you updated your BIOS and drivers? I believe there was a change made where the keyboard will be deactivated when the lid is closed.
    Problem: On the listed ThinkPad systems, the delete key might be pressed and activated when the LCD is closed and the system is held tightly when carried..
    Affected Systems: ThinkPad T420, T420i, T420s, T520, W520, X220, X220t.
    Solution: Please update the BIOS to the version listed below, or newer. The BIOS can be downloaded from:
    T420/T420 (ver. 1.33): http://support.lenovo.com/en_US/downloads/detail.page?LegacyDocID=MIGR-77071 .
    T420s/T420si (ver. 1.29): http://support.lenovo.com/en_US/downloads/detail.page?LegacyDocID=MIGR-77010
    T520/T520i (ver. 1.32): http://support.lenovo.com/en_US/downloads/detail.page?LegacyDocID=MIGR-77001
    W520 (ver. 1.30): http://support.lenovo.com/en_US/downloads/detail.page?LegacyDocID=MIGR-77033
    X220/X220i/X220T (ver. 1.22) http://support.lenovo.com/en_US/downloads/detail.page?LegacyDocID=MIGR-77150:
    As noted previsouly in another post, if the wireless antenna wires are not routed neatly underneath, the keyboard will stick up just enough for the screen to press on those keys.

  • Powerbook does not sleep when the lid is closed

    my tibook does not go to sleep when i close the lid. the screen stays on when the lid is closed. the screen was replaced a few months ago. i have to hit the power button and choose sleep or choose sleep from the menu. does anyone know how to fix this. Thanks.

    Hi, fatchance. You have a hardware issue. The reed switch that puts the PB to sleep when it is closed is a two-part device. The latch mechanism in the main body of the Powerbook contains a magnet (which you can detect by moving a paper clip over it), and the switch itself is located inside the small latch opening in the display bezel. When the display is closed, the magnet is supposed to actuate the switch, putting the PB to sleep. If that isn't happening on your PB, the switch is broken or its wiring is damaged. Either way, the remedy will be to replace the entire display assembly. It's made not to be disassembled. Most technicians won't do so, because of the great likelihood of damaging the display housing/bezel or the display itself while prying it apart (it's epoxied together). Since the display is the PB's most costly part, replacing it merely to fix your reed switch would be a poor bargain, and I can't recommend it. Just put the PB to sleep manually or set a suitable sleep delay in the Energy Saver control pane instead.

  • T540p will not go to sleep when the lid is closed

    I recently got a T540p and all settings in Windows 8.1 are set to "sleep" when either the power button or lid is closed. Neither of these work, the screen stays on when the lid is closed. If I let the computer idle long enough, the computer will enter sleep. I've used Lenovo System Update to get the latest drivers and there is nothing outstanding. Could someone please advise if there is anything else to check?

    Hi Adamstirtan,
    Welcome to Lenovo Community!
    As per the query we understood that you are facing issue with system not going to sleep mode on your ThinkPad T500.
    Go to Control Panel\All Control Panel Items\Power Options\Choose what closing the lid dose – When close the lid – On battery sleep – Plugged in sleep.
    To prevent programs from waking your computer:
    Open Power Options by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, and then clicking Power Options.
    On the Select a power plan page, click Change plan settings for the plan that you want to change.
    On the Change settings for the plan page, click Change advanced power settings.
    On the Advanced settings tab, expand Sleep, expand Allow wake timers, choose Disable for both when your computer is running on battery and when it's plugged in, and then click OK.
    Hope this helps.
    Best regards,
    Hemanth Kumar

  • Can i choose the resolution of my external display for when the lid is closed when my lid is open

    When I close the lid of my MacBook Pro for an external display apple chooses a resolution that isn't compatible with my display can I choose the resolution when the lid is open in any way of my external display for the mode when the lid is closed?

    Hi there, I had a similar problem and was unable to resolve it.  I spent about an hour on the phone with a very helpful AppleCare rep who was also completely stuck.  It would seem that the only solution is to choose a setting with trial and error while the lid is closed.
    My MacBook ended up getting stuck on a closed-lid reoslution that wasn't supported, so I had to do a screen-share with another device to see what the video card was sending to the external display and change it back that way.

  • My macbook pro shuts down OSX and all my programs when the lid is closed

    Hi,
    I am having a problem. My macbook pro shuts down OSX and all my programs when the lid is closed. I close the lid, and then I hear the shutdown music and then when I open it again it automatically restarts OSX and all my windows and programs are closed, any info gone.
    This doesn't happen all the time. Just once a day or maybe twice a day. It seems like it happens basically when I have my computer just the way I want it, to keep an eye on things for the day.
    I just recently switched to a mac and while somewhat savvy, I am not a programmer or techie, but it seems to me that when I shut the lid, it should do the same thing every time.
    I have a intel core 2 duo 17 inch macbook pro with 2.33 processr and 2 gig ram, if that helps.
    I am in alaska and there is no genius bar here and I am hoping to figure this out before I begin bugging our local independant mac store about this.
    Thanks in advance,
    Lylah
    17 inch Macbook Pro   Mac OS X (10.4.9)   intel core 2 duo 2.33g. 2 gig ram

    Ahhh, enlightenment!
    That would make sense. What I usually do, after closing the lid, is to wait for the apple to turn off and then set it down on it's side leaning it against the side table. I will try to wait for it to indicate that it is fully asleep before I move it next time. Personally, I prefer my computer to NOT fall asleep at all, but I am told it is not an option. Apparently this function is hardware related accoring to my local mac shop. They tracked it down for me because I hated this feature when I first bought my computer and was trying some way around it.
    The shutdown music I was refering to was that music the mac makes when shutting down, which doesnt usually occur when it goes to sleep, unless it is malfunctioning like this.
    What does resetting the pmu do? (what is a pmu as well?)
    Thank you very much.
    Lylah

  • How to run functions when changing states?

    Hi everybody
    I want to run function when changin states
    For example I change my state and write something on Panels title and when this state appears i want to read my title and to do smth
    How can I do it. Where is my mistake?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle"
        width="340" height="250"
        layout="absolute"
    currentStateChange="StateChangez();">
    <mx:Script>
    <![CDATA[
    public function StateChangez():void
    if (currentState=='a')
    //Alert.show('a');
    if (Panel1.title=='New')
    Alert.show('New');
    else
    Alert.show('Edit');
    else
    Alert.show('b');
    ]]>
    </mx:Script>
    <mx:states>
      <mx:State name="a">
       <mx:RemoveChild target="{button1}"/>
       <mx:RemoveChild target="{button2}"/>
       <mx:AddChild position="lastChild">
        <mx:Panel x="0" y="40" width="340" height="210" layout="absolute" id="Panel1">
        </mx:Panel>
       </mx:AddChild>
       <mx:RemoveChild target="{button3}"/>
      </mx:State>
      <mx:State name="b">
       <mx:RemoveChild target="{button2}"/>
       <mx:RemoveChild target="{button1}"/>
       <mx:RemoveChild target="{button3}"/>
       <mx:AddChild position="lastChild">
        <mx:Label x="10" y="222" text="b"/>
       </mx:AddChild>
      </mx:State>
    </mx:states>
    <mx:Script>
      <![CDATA[
       import mx.controls.Alert;
      ]]>
    </mx:Script>
    <mx:Button label="New" x="10" y="10" id="button1" click="currentState='a';Panel1.title='New';"/>
    <mx:Button x="68" y="10" label="Edit" id="button2" click="currentState='a';Panel1.title='Edit';"/>
    <mx:Button x="10" y="218" label="b" click="currentState='b';" id="button3"/>
    <mx:Button x="265" y="10" label="Read" click="StateChangez()"/>
    </mx:Application> 
    Message was edited by: AtomicRussian

    Hi,
    I think your event handler "StageChangez()" is called before your Panel title is set. Try first change title, then change currentState.
    Oh yes my mistake, you are adding it when state changes. You can put your Panel's title change in StageChangez() and after that you can do some actions.
    Regards,
    Adrian
    Message was edited by: AdrianWiecek

  • How to run GINA when windows log off ?

    I test pGina program which was create from GINA. I want create program for logon windows with C#. I wonder when user log off windows why pGina can run application for login windows. I think application can run when start windows only . How pGina can run
    program when user click log off button ?

    Hi mmc01,
    I'm afraid you posted your question on the wrong forum. This forum is dedicated to Project Server concerns, the Microsoft enterprise scheduling & planning application.
    Please go to an appropriate forum in order to have an helpful hand.
    Cheers.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Windows 10: Open Windows Are Resized When The Lid Is Closed

    I have just done the free Windows 10 Pro upgrade. Everything seems to be working fine; except for this issue. Every time I simply close and re-open the laptop lid, the open windows are resized. Most windows get restored to where they started, yet they seem to ALL have been resized and then sized to their previous location. You can tell because minimizing / restoring windows does not remember the actual last size that you used. But some windows DO NOT get resized back where I left them. Chrome in partiular becomes crazy. Sometimes the window becomes maximized; and other times it gets sized to a smaller rectangle at the top left of the screen. You can see all the windows flicker and jump around when you re-open the lid. ... My laptop is the ThinkPad W540.  MsInfo32: OS Name Microsoft Windows 10 Pro
    Version 10.0.10240 Build 10240
    Other OS Description Not Available
    OS Manufacturer Microsoft Corporation
    System Name COCOTPW540
    System Manufacturer LENOVO
    System Model 20BG0016US
    System Type x64-based PC
    System SKU LENOVO_MT_20BG
    Processor Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz, 2694 Mhz, 4 Core(s), 8 Logical Processor(s)
    BIOS Version/Date LENOVO GNET73WW (2.21 ), 3/12/2015
    SMBIOS Version 2.7
    Embedded Controller Version 1.11
    BIOS Mode Legacy
    BaseBoard Manufacturer LENOVO
    BaseBoard Model Not Available
    BaseBoard Name Base Board
    Platform Role Mobile
    Secure Boot State Unsupported
    PCR7 Configuration Binding Not Possible
    Windows Directory C:\WINDOWS
    System Directory C:\WINDOWS\system32
    Boot Device \Device\HarddiskVolume1
    Locale United States
    Hardware Abstraction Layer Version = "10.0.10240.16392"
    User Name CocoTpW540\Steven
    Time Zone Eastern Daylight Time
    Installed Physical Memory (RAM) 8.00 GB
    Total Physical Memory 7.62 GB
    Available Physical Memory 4.08 GB
    Total Virtual Memory 8.81 GB
    Available Virtual Memory 4.93 GB
    Page File Space 1.19 GB
    Page File C:\pagefile.sys
    Hyper-V - VM Monitor Mode Extensions Yes
    Hyper-V - Second Level Address Translation Extensions Yes
    Hyper-V - Virtualization Enabled in Firmware No
    Hyper-V - Data Execution Protection Yes  Components / Display: Name NVIDIA Quadro K2100M
    PNP Device ID PCI\VEN_10DE&DEV_11FC&SUBSYS_221E17AA&REV_A1\4&23A19969&0&0008
    Adapter Type Quadro K2100M, NVIDIA compatible
    Adapter Description NVIDIA Quadro K2100M
    Adapter RAM (2,147,483,648) bytes
    Installed Drivers nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um,nvwgf2um
    Driver Version 10.18.13.5362
    INF File oem86.inf (Section040 section)
    Color Planes Not Available
    Color Table Entries Not Available
    Resolution Not Available
    Bits/Pixel Not Available
    Memory Address 0xB0000000-0xB10FFFFF
    Memory Address 0x80000000-0x91FFFFFF
    Memory Address 0x90000000-0x91FFFFFF
    I/O Port 0x00004F80-0x00004FFF
    IRQ Channel IRQ 4294967289
    Driver c:\windows\system32\drivers\nvlddmkm.sys (10.18.13.5362, 10.63 MB (11,142,984 bytes), 7/23/2015 4:02 AM)
    Name Intel(R) HD Graphics 4600
    PNP Device ID PCI\VEN_8086&DEV_0416&SUBSYS_221E17AA&REV_06\3&21436425&0&10
    Adapter Type Intel(R) HD Graphics Family, Intel Corporation compatible
    Adapter Description Intel(R) HD Graphics 4600
    Adapter RAM 1.00 GB (1,073,741,824 bytes)
    Installed Drivers igdumdim64.dll,igd10iumd64.dll,igd10iumd64.dll,igd12umd64.dll,igdumdim32,igd10iumd32,igd10iumd32,igd12umd32
    Driver Version 10.18.15.4256
    INF File oem76.inf (iHSWM_w10 section)
    Color Planes Not Available
    Color Table Entries 4294967296
    Resolution 2880 x 1620 x 50 hertz
    Bits/Pixel 32
    Memory Address 0xB1400000-0xB17FFFFF
    Memory Address 0xA0000000-0xAFFFFFFF
    I/O Port 0x00005000-0x0000503F
    IRQ Channel IRQ 4294967290
    I/O Port 0x000003B0-0x000003BB
    I/O Port 0x000003C0-0x000003DF
    Memory Address 0xA0000-0xBFFFF
    Driver c:\windows\system32\drivers\igdkmd64.sys (10.18.15.4256, 6.09 MB (6,389,688 bytes), 7/18/2015 12:36 AM)

    Minor update: I performed another Windows 10 reset: I reset the operating system, keeping User Files. So the system got re-installed. I ran Windows Update until all updates came down. I also ran the Lenovo System Update and installed all updates. Specifically, at this point, I haven't gone looking for additional drivers, such as the graphics drivers --- and on this dual-graphics, there is no control panel for the high performance NVIDIA GPU ... I don't know if that is making any difference. The bug DOES persist; but behaves marginally different at this point ... at least, the open Chrome window no longer resizes; and the Task Manager doesn't move; but other things still jump around, and the open Control Panel window becomes duplicated. Again, this is just by closing and re-opening the laptop lid. The Lid-Closed behavior is set to "Do Nothing"; and the Intel Graphics is set to High Performacen mode. ... So I don't know if they do, but I would not understand why the graphics would switch when the lid closes: they still might. I have another video that captures the behavior. Again: there is no Lid-Closed action, and just closing and re-opening the lid causes the resolution to switch back and forth. YouTube: https://youtu.be/Qapt3ZyOVE4 ... I would like to see this cured, since it is truly a very annoying bug! Your work becomes disrupted simply from closing the lid.

Maybe you are looking for