GearHack

: :

Add Comment | Related Links | TrackBack
Related Content

How to Disable the Notebook Lid from Putting the Laptop to Sleep?

I have recently installed Xubuntu 7.1 on my wife's old Acer TravelMate 331T. But whenever I closed the lid, the notebook went into sleep mode. As soon as I open the lid, the notebook powered up. It's great to see that Linux had integrated so smoothly with hardware components now. It had made great strides for seamless usability.

However, for my purpose, I can't let the notebook go to sleep upon closing the lid. In fact, the lid will be closed 99% of the time while it is being used. It is being used as a server. Ever since I've written the "24/7 Home Notebook Server" article (see "TrackBack" below), all of my servers are now notebooks. So running the Acer TravelMate 331T as a server means I could close the lid, tuck it away somewhere, and forget about it. But not if closing the lid causes it to go to sleep.

So far, I have found the "/etc/acpi/events/lidbtn" file. This file was suppose to control what closing and opening the lid did. However, when I commented out the content of this file, the action of the lid closing didn't change. And frustrated me greatly. If anyone knows the solution to this problem, please post a message. Thanks.

Chieh Cheng
Mon, 13 Oct 2008 03:48:17 +0000

Ok, I figured it out. lidbtn didn't do anything because it functions under ACPI. And the notebook was too old for ACPI, so it defaulted to APM. APM is quite difficult to change. Therefore, I decided to disable APM altogether. To do so, first figure out your run-level. Xubuntu 7.1 Desktop runs at level 2 on this laptop:

  $ who -r
run-level 2 2008-10-12 23:15 last=

Now you can change to the right directory and stop the daemons from running. I decided to disable ACPI while I'm at it. Use the following command to disable them at run-level 2. Change '2' to another run-level if your system runs at a different run-level.

  $ cd /etc/rc2.d/
$ sudo mv S10acpid K10acpid
$ sudo mv S20apmd K20apmd
$ sudo mv S99acpi-support K99acpi-support

After rebooting to get rid of the daemons, the system runs beautifully even with the lid closed.

Chieh Cheng
Mon, 13 Oct 2008 06:28:44 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

Title: 24/7 Home Notebook Server
Weblog: GearHack
Excerpt: Is it smart to run a 24/7 home server off a laptop computer? Ten years ago, the answer would be, unanimously, "no"! Back in those days, running a server on a notebook computer is like shooting yourself in the foot with a shotgun. Laptop computers cost several times more than desktop computers. Even . . .
Tracked: Mon, 13 Oct 2008 03:49:21 +0000

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 10 + 6?
Click button only once, please!

Messages, files, and images copyright by respective owners.


Articles | Wiki
Forums | Latest | RSS
Library | Links | News
Search | Store | Help

304 Users Online



Hacking Digital Cameras
Fun for Photographers

Amazon Associate

Copyright © 2004 - 2024. All Rights Reserved.