[SOLVED]Closed lid event

Hi!!
I've got Dell Studio 1555 laptop. I want it to react when I'm closing the lid. Now, there isn't any rule, when it works, but it works very very rarely. I've got acpi and acpid installed. ACPID daemon is working. I've tested:
tail -f /proc/acpi/button/lid/LID0/state
during closing/opening lid, but there has been only one line:
state: open
Do I have to add any additional modules?
I really appreciate any help
stefek
Last edited by stefek (2009-09-26 13:51:51)

Here's what I've got in /etc/acpi/handler.sh:
button/lid)
# check if the lid is open or closed, using the /proc file
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]; then
# if the lid is now closed, save the network state and suspend to ram
/usr/bin/netcfg all-suspend
/usr/sbin/pm-suspend
#echo -n mem >/sys/power/state
else
# if the lid is now open, restore the network state
/usr/bin/netcfg all-resume
fi
#echo "LID switched!">/dev/tty5

Similar Messages

  • ACPI doesn't detect closed lid until other acpi event

    Basically I have the same problem as described in this thread:
    https://bbs.archlinux.org/viewtopic.php?id=121224
    No solution is posted so I bring this up again.
    As said when I close the lid, acpi doesn't detect it not in the acpi.log neither with acpi_listen. When I insert the battery, acpi immediately detects the closed lid and my laptop goes in suspend as it's supposed to.
    This happens with a WM + acpi + laptop-mode-tools, in Xfce and in Gnome. KDE however works fine.
    The logs when I close the lid and then insert the battery:
    acpi.log
    Jan 21 20:51:31 localhost acpid: client 1254[0:1000] has disconnected
    Jan 21 20:51:31 localhost acpid: client connected from 1254[0:1000]
    Jan 21 20:51:31 localhost acpid: 1 client rule loaded

    I can tell with the lid closed because of which lights are on.
    Anyway, I don't see anything interesting at all in the logs. This is so weird.
    EDIT: I'm thinking that it might be conflicting kernel modules. For example I have phc-intel and acpi-cpufreq. Plus I'm using the CK kernel. So when I get home today, I'll first try removing phc-intel, then acpi-cpufreq, then I'll try stock kernel.
    Last edited by pogeymanz (2011-06-22 17:32:56)

  • Advice about using the laptop with closed lid while connected to external display

    Hello all HP forum members!
    I have an ENVY 17 with Win8.1 64bit, a great laptop, but I need an advice about using it while connected via HDMI cable to an external display (TV).
    When I play heavy 3D games, the computer produces more heat than usual (of course this is normal), but doing so with closed lid, could this harm the  display in some way, as a result of the heat?
    Thanks!

    Hi @VVel ,
    Thank you for visiting the HP Support Forums and Welcome. It is a great site for information and questions. I have looked into your issue about your HP ENVY 17 Notebook and issue with keeping the Notebook on while closing the lid. Here is a document on changing the Power option.
    Control Panel - Power Options - upper left - Choose what closing the lid does.
    Change Plan Settings and also check Advanced Settings. Make sure you do this for both battery and power.
    Hope this helps.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Charging iPhone with closed lid on mbp

    I've been researching, but found nothing this specific so far. Related links:
    - http://support.apple.com/kb/HT1476 - This says it may or may not charge
    - http://forums.mactalk.com.au/11/72536-snow-leopard-not-charging-iphone-while-lid -closed.html - This says it should work since Leopard and if it's not working to reset the SMC should fix it (I haven't tried yet): http://support.apple.com/kb/HT3964
    - http://forums.macrumors.com/showthread.php?t=795007 This is not the same model, but for him it seems to not work anyway
    - http://discussions.apple.com/thread.jspa?threadID=2126178 Suggests http://support.apple.com/kb/HT3131 for dealing with closed lid, but requires external display, among other things that don't come to this case (or so I guess)
    To me, experience showed that closing the lid with the iPhone already connected works fine. I'm using a macbook pro 2009, as already hinted elsewhere. It's 13'' if that makes any difference.
    But if I have the computer sleeping in the bag and want to just plug the iPhone for charging convenience, then it doesn't work. I have to remove it, open the lid, wait for charging to begin, then I can safely close, sleep, put it back on the bag, and it will be charging.
    So I wonder how this is supposed to work, and if I can "fix" this behavior. Anyone knows?

    I actually solved it on my own luck. Oddly enough, just need to remove and re-plug.
    Here, this is a small chart:
    1- Computer with lid open, up and running with energy - whatever AC or not.
    normal behavior, everything as expected: plug in iPhone it starts charging.
    2- Computer with closed lid, sleeping as blinking light indicate and plugged in AC power.
    normal behavior, everything as expected: plug in iPhone it starts charging.
    3- Computer with closed lid for long time, unplugged from AC power, no cables on it whatsoever.
    plug in iPhone - nothing happens.
    unplug it and plug in again in either port - it starts charging!
    If you close the lid and don't wait it gets to sleep (that is, white blinking light - if you want to be sure, wait till the computer cools down, if it was hot - that's sleep mode) you'll get normal behavior right on the first plug time. The trick of plugging again seem to work always from my tests. So this is a undocumented feature that took me freaking long enough to uncover!
    Now it's aight!

  • Systemd lid event

    Hi!
    Can systemd catch lid close/open events?
    Details:
    I'm strugling with "laptop suspend with external monitor attached" issue. Thist hread was discussed but none of solution mentioned was working for me. Problem is when I have an external monitor attached to my laptop, closing lid doesn't suspend laptop. Current desktop is Cinnamon and doesn't work with gnome-tweak-tools or other utils that are solution mentioned on forums. In https://wiki.archlinux.org/index.php/Po … leep_hooks wiki I found that I can create hooks for sleep/hybernate. So the question is: Can I create the same event just for lid open/close to triger something like "systemctl suspend" ?

    Did you read through the ACPI events section of the page? You can customize the actions taken by systemd on lid open/close by modifying /etc/systemd/logind.conf. I had to tweak these on my laptop to prevent hibernation during bootup when the lid was closed and external monitor was attached.
    This might not work once the desktop environment starts up, though. If not, look into acpid. It may already be running under Cinnamon.

  • Helix cannot sleep when closing lid

    Helix does not sleep after closing lid, even though I set to let it sleep in power plan in windows.
    I previously do not have this problem. Not notice anything changed.
    Any suggestions? Thanks!
    Solved!
    Go to Solution.

    Somehow, after rebooting, this problem is gone. So next time, I will try a reboot first. Thanks!

  • DVI to VGA Adapter Closed Lid Mode Distorted Picture on TV

    Hi
    I managed to hook up the DVI to VGA adapter and view on my Sanyo TV. Nothing fancy just a older TV.
    I am feeding through the Yellow Video output into the video input on the TV. (Also tried s-video)
    Viewing with the macbook lid open no problems. Remembered that I could close the lid.
    Followed the instructions online about connecting, closing the lid and waking up using my bluetooth mouse.
    First time things went well - able to use Front Row and View Slideshows etc. also steaming video from Safari, (TV Land for my kid)
    Then the screen began to flash - and change to black with rolling images.
    Like you used to have in the 60-70's black and white TV - multiple images rolling past over and over.
    I tried rebooting - starting new connections, using different cables, using both VGA and S-Video directly into the TV and not through my reciever.
    Any ideas!
    I can't use closed lid mode at all. I must instead, dim my screen.
    Help?
    Thanks
    Buddy

    Thanks, BSteely, I have the latest QT and iTunes already. Closing the lid seems to kick the MacBook external display into some special mode that Front Row can't display videos in. For example, you get the Front Row interface, but as you select movies/TV shows, the preview window on the left side is blank. Open the cover, and have both displays going, and you can see the previews fine (and of course, you can see the movies/TV shows play fine as well when you click on them)
    Running Quicktime Player full screen works fine without Front Row in either open or closed lid mode. So it is apparently something wrong with Front Row itself.

  • TV + Closed-Lid Mode?

    Is running in closed-lid mode on the MacBook using a television with the Apple Video Adapter supported? I can't get it to work properly.
    Brian

    Make sure your power saving settings aren't unusual - I find normal works fine. Configure your external displays with the lid open and then with the power cable connected try closing the lid. It will fall asleep immediately - let it. Then when the light throbs try waking it back up again with the remote... It works for me, but it did try my patience before I came up with a routine that I was happy with.
    Also - how do you connect your TV? My TV has a monitor / DVI out and it's quite happy with that. I shouldn't think that S-Video should be too different. Has anyone tried with S-Video? Hope this helps...
    macbook 2.0Ghz   Mac OS X (10.4.8)   2 Gb RAM

  • 10.5.2 wake/sleep and closed-lid problems

    As of 10.5.2 my MBP no longer works correctly in closed lid mode using a hardware
    setup that previously worked flawlessly. After plugging in power and video, plugging
    in the USB keyboard seems to wake the system, but no video. I then must open the
    lid, unplug the USB and video and try to get the system to respond. I often must cycle
    the power to reset the system--very disturbing to do that.
    Also as of 10.5.2, I have had to power-cycle the machine when it has refused to wake
    in open-lid mode and this weekend I the entire machine froze (no mouse movement,
    no expose, etc) in the middle of work using a graphics-intensive program and I had
    to reboot by cycling the power.
    A friend also reported similar issue in which the system would not respond after the
    screensaver became active.
    Are others seeing problems like these? I am beginning to suspect that the post-10.5.2
    graphics update has problems.

    I just wiped my HD and reinstalled everything besides the Graphics Update. I can now close the lid of my MBP and use my external monitor alone. The Graphics Update had made that impossible.
    Further, I am in the habit of putting my MCP to sleep and putting it in a backpack in the morning, meeting friends for breakfast, and re-awakening it at the office. When I did get to my office, I found (as another user had on another thread) that the MBP, even closed, had woken itself up and was hot as heck. I am uncertain that sleep will work properly under 10.5.2, but I know that the display wackiness of the Graphics Update was driving me nuts. I will not install it until Apple fixes it.
    I looked around for awhile for a way to uninstall the Graphics Update, but could not find it...I suspect it exists somewhere.
    The 10.5.2 Combo update (343MB download) DOES NOT include the Graphics Update, and at this time, I seem quite ok with everything else updated.

  • 15-r007TU-Display does not turn on when it automatically turns off after closing lid.

    I just purchased hp 15-r007TU, Windows 8.1 x84. I'm facing a strange problem. After all initial setup, I put the laptop on to download and install all lates Windows 8.1 patches. The display is set to tuen off automaticaaly after 5 minutes. After 5 min it did turn off as set. But then I can not turn it back on. I pressed all (except power) keys, used touch pad, closed lid and opened but it stayed off. Laptop was on and running as I could see HDD lights flickering, I could hear system sounds on pressign mute/volume keys, also I could toggle WiFi with key. I then pressed power off key to turn Windows off normally. I did turn off. I again turned it on, I could see 'hp' logo with spinning wheel and then nothing. Display is off and I don't see start screen. I have to hard reset (press power button for more than 5 seconds) then display is normal. This happens every time the display turns itself off automatically after set time or I close the lid. Only after hard reset it works normally and I see the start menu.
    The power settings I use are:
    1. never put system to standby after preset time. (either on battery or AC power)
    2. turn display off after 5 min. (both on battery or AC power)
    3. when I close lid - do nothing. (both on battery or AC power)
    4. when I press power button - shut down
    I am using Windows 8.1 x64 with all latest patches installed. BIOS updated to lates available. All latest drivers installed.
    I have not yet set password to the system to log in.
    Help would be immensly appreciate. The device is still in warrenty if it needs to be replaced.

    Hello K1200LT,
    Welcome to the HP Forums!
    I understand the computer will not sleep when you shut down the lid. You seem to have already done most of the troubleshooting I would've suggested.
    To be honest,  it is either a hardware or software-related issue. To determine this, I would like you to reinstall the operating system. It will clear up any software conflicts and allow you to start fresh.
    First, please ensure you backup your files. Here is information on how to do this: Backing Up Your Files (Windows 8)
    Once this is done, it is safe to reinstall the operating system. Performing an HP System Recovery (Windows 8)
    If the same situation occurs, the computer likely has faulty hardware. At that point, please contact HP phone support. You can utilize this website to learn how to contact HP appropriately, based on your region: Contact HP Worldwide
    Please let me know what happens. Thanks!
    Mario
    I worked on behalf of HP.

  • Closed Lid Operations Wont Work

    I am a big fan of the closed lid with external mouse, keyboard, and display (minimize spill risks in college dorm room). I just got a new macbook pro after 4 great years with my g4 powerbook and I cannot get the new machine to work with the lid closed. I have tried working with both displays then closing it, but it won't wake up. I tried putting it to sleep and attaching the external display but it doesn't wake up. The for either if I try to open the machine to use it normally the built in display, keyboard, and trackpad are non-responsive and so are all my external items. Has anyone else had this problem or any ideas on what could be going on.

    Jonathan , I am experiencing the same exact problems with my Macbook Pro 15 inch. I first started noticing about a month ago that the computer was getting unusually HOT to the touch , and after one day I set the lid down, when I tried to open it back up, it remained on , but no screen, and unresponsive. I have had to restart it everytime since then. It also now takes a lot longer than usual to reboot. I hope the people at Apple resolve this soon, because this is WAY too expensive to be having these problems on a new machine Ive only had for 5 months.

  • Closed lid, fans always running

    Howdy. I've been using my MBP in closed lid mode attached to a Cinema Display. I expected the fans to run constantly when in use, especially with XP running in Parallels. When I put the computer to sleep--still attached to monitor, usb keyboard, bluetooth mouse and power adapter--it acts as I suspect it would, fans stop, front LED starts fading in and out. However, I'll come back later and the LED will be solid, display blank, and the fans running away. The keyboard or mouse will wake the computer and then it runs as normal. This has happened overnight as well as in half an hour, and several times.
    I am kind of getting concerned about using the computer this way. Fans always fail, and I am not really looking forward to opening the computer up again.
    I guess my questions are: why would the computer be running the fans, especially after being in sleep for hours, and is it shortening my MBPs expected life using it with the lid closed?
    Thanks.

    I'd guess/assume that something is actually waking it from sleep and causing the heat/fan activity and that when you return you're not actually waking it up just re-activating it from screensaver mode ...
    Run Utilities/Console and click 'All Messages' top left - what lines appear during the time you think it should be sleeping ?
    It isn't shortening the life of the hardware using it in clamshell mode but if something is causing it to overheat regularly that will have an impact on internal components/motherboard that could be detrimental.

  • EXTERNAL HDD NOW DISAPPEARS WHEN USING MY MBP IN CLOSED LID MODE

    I have an 15" MBP 2.53 running Snow Leopard, which installed fine. When I go to use it with my Apple 24" Display and my external hard drive, the external HDD disappears when I go into closed lid mode.
    The finder freezes too, and I can no longer enter into Time Machine.
    The external HDD does show up in disk utility, however.

    and please ... STOP SHOUTING!
    It doesn't make your message any more relevant or increase the motivation to help you. To be honest, it makes you look like a moron, if anything.
    Cheers,
    Jazz

  • MacBook Pro keeps going to sleep in closed-lid mode and external monitor

    I am trying to run the MacBook in closed lid mode with an external monitor. It seems to work fine at first, but after about 10 seconds, it goes to sleep. I can wake it back up but it just goes to sleep again.
    Has anyone seen this before?

    I figured it out. Apparently you can't run in closed-lid mode on battery. I plugged in the power adapter and it's working fine now.

  • IChat and Closed-Lid Mode

    I found something very interesting in iChat 4.0.8 and Leopard 10.5.7. I run my MBP in closed-lid mode with an external Apple Cinema Display. When in iChat, I cannot do audio chats at all - i.e. no sound input with either of my external interfaces (Apogee Duet via FireWire and Mbox 2 Mini via USB). Of course video doesn't work at all, as the built-in iSight is not accessible. If I open the MBP display, they both work normally. As soon as I close the display, wake the MBP and run in closed-lid mode, I cannot get any input whatsoever. The devices work normally in QuickTime Player Pro, Soundtrack Pro, Logic Pro, Pro Tools, etc. In either mode there IS an input level in System Preferences > Sound as well. I even tried to "trick" the system by using Audio Hijack Pro and Soundflower, but the issue remains. No combo of settings in the Sound preference pane and iChat preferences will allow a signal input.
    Anyone else running a MacBook or MacBook Pro in closed-lid mode? Does this issue happen on your Mac as well?
    VERY strange,
    C

    Well...Snow Leopard seems to have fixed this issue.

Maybe you are looking for

  • HT5312 how can i add a rescue email to my account

    how can i add a rescue email to my app store account i traid hard to find a seloutin becouse i dont know the securty questins answers and there is no rescue emai please help me

  • How do I get rid of the white space in the navigation toolbar after installing LastPass?

    I've uninstalled and reinstalled the 64-bit Firefox on my Windows 7 laptop. After installing LastPass I get this white space in the left search. I didn't know if anybody has had a similar issue. Thanks for your time guys. Here's a link to what it loo

  • Enabling screen sharing through .mac or VNC

    I want to enable screen sharing on my desktop computer from another network (so I can connect to my home machine from the office, or on the road). I have successfully enabled my router to allow VNC traffic, and have been able to connect from my lapto

  • Open iChat instead of AIM from Safari?

    I would like to know how I can get iChat to open instead of AIM, when I click on a link from a webpage that will allow for chatting? Everytime I do this, Safari automatically opens AIM.

  • How to retrive archived data from ECC table

    Hi, I need extract the data from archived ECC tables to BW. How can I know that which tables the archived data has been stored in ECC ? Thanks for your help in advance. Raj.