You are not logged in.

#1 2008-08-30 11:36:18

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

Lid close - nothing happens!

Hi!

I have installed Arch Linux and it's really nice. I really love it. Simply beautifull!
I followed the wiki tutorial completely, very, very helpful.

But:

When I close my laptop lid the screen doesn't standby! How can I enable this?
I goes standby after 5 minutes, this I configured in xorg.

I have @laptop-mode in my daemons in rc.conf. Or do I have to do sth with acpid?

Thanks!

Offline

#2 2008-08-30 14:56:44

pjjanak
Member
Registered: 2008-08-17
Posts: 128

Re: Lid close - nothing happens!

You need to have acpid running to do standby with acpi and you probably will need something like HAL for doing regular standby from the system menus. Also, make sure you user is in the "power" group:

gpasswd -a USER power

Offline

#3 2008-08-30 16:18:44

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Lid close - nothing happens!

If you're using Gnome or KDE, you can configure this in the power manager settings. If you're not, though, you probably need acpid.

Offline

#4 2008-08-30 16:54:14

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

Re: Lid close - nothing happens!

I think he is talking about putting the _screen_ in standby.


Arch - It's something refreshing

Offline

#5 2008-08-30 16:59:15

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

Re: Lid close - nothing happens!

Yes what I mean is that the screen turns off, when I close the lid, to save energy

Offline

#6 2008-08-30 21:30:28

chochem
Member
From: Denmark
Registered: 2008-03-02
Posts: 176
Website

Re: Lid close - nothing happens!

I think that the acpid handler.sh script (in /etc/acpi) is supposed to take care of these sorts of things, see the wiki article on acpid. If you are running acpid, and it doesn't do as the handler script tells it , you might have some acpi/bios problems (welcome to the club...). But I'd read up on acpid first...

BTW how can you tell that the screen does not turn off? Turn off the lights and see the screen light coming out through the cracks? wink

Offline

#7 2008-08-30 23:11:16

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

Re: Lid close - nothing happens!

chochem wrote:

BTW how can you tell that the screen does not turn off? Turn off the lights and see the screen light coming out through the cracks? wink

At least for my laptop, the lid is a little button near the screen. When I close the screen down, the lid button gets pressed by a little plastic thingy.


Arch - It's something refreshing

Offline

#8 2008-08-31 23:20:04

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Lid close - nothing happens!

When I closed the lid, I had to get acpid to issue the relevant pm-utils command for when I close the lid.

If you edit /etc/acpi/handler.sh you should find that there is a "button/lid)" section. Underneath there I just put the line

/usr/bin/pm-suspend

And then you should find that your laptop will suspend when you close the lid fine.

Offline

#9 2008-09-01 11:20:29

cyberius
Member
From: Germany
Registered: 2008-08-30
Posts: 97

Re: Lid close - nothing happens!

SiC wrote:

When I closed the lid, I had to get acpid to issue the relevant pm-utils command for when I close the lid.

If you edit /etc/acpi/handler.sh you should find that there is a "button/lid)" section. Underneath there I just put the line

/usr/bin/pm-suspend

Thanks, works, now I have to get pm-suspend working.. (my laptop doesn't wake up after suspending, but that's another topic)

BTW how can you tell that the screen does not turn off? Turn off the lights and see the screen light coming out through the cracks?

Every linux-geek lives in  a dark, deep basement... ;D

Offline

#10 2008-09-17 14:02:27

jetsabel
Member
From: Australia
Registered: 2008-08-20
Posts: 3

Re: Lid close - nothing happens!

this is a helpfull thread! if anyone like me wants only to turn the screen off (i want the laptop to continue playing music but just turn lcd backlight off to conserve energy) you can make the button/lid section run a script that contains

xset dpms force suspend

EDIT: hmmm its not working as expected and no time to fix now..but you get the general idea smile

Last edited by jetsabel (2008-09-17 14:14:05)

Offline

#11 2008-09-17 14:55:02

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Lid close - nothing happens!

chochem wrote:

I think that the acpid handler.sh script (in /etc/acpi) is supposed to take care of these sorts of things, see the wiki article on acpid. If you are running acpid, and it doesn't do as the handler script tells it , you might have some acpi/bios problems (welcome to the club...). But I'd read up on acpid first...

BTW how can you tell that the screen does not turn off? Turn off the lights and see the screen light coming out through the cracks? wink

Ah! that was a good tip, I have finally solved this problem big_smile
Thank you! (why didn't I look it up before?)


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#12 2008-09-17 14:58:05

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: Lid close - nothing happens!

My laptop does this automatically...indepentant of the operating system. Anyway, to turn off the screen in X use "xset dpms force off".

Offline

#13 2008-09-19 10:00:08

faw
Member
Registered: 2007-06-09
Posts: 18

Re: Lid close - nothing happens!

I've been trying to get the handler script to start vlock when I close my lid. I'm using handler.sh to run the command 'su -c "vlock -n" faw' so that it locks X and all the terminals down, but when I log back in I need to get past vlock twice (vlock unlocks once, I can see X for half a second, then it locks it down again). After commenting out the vlock command and uncommenting the echo "LID switched!" line I can see two echoes being sent to tty5, once when the lid is being closed, and again when the lid is being opened, so this means any command gets run twice. How do I set it up so that it runs a command only when closing the lid?

Cheers,

Offline

#14 2008-10-28 07:44:02

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: Lid close - nothing happens!

wuischke wrote:

My laptop does this automatically...indepentant of the operating system. Anyway, to turn off the screen in X use "xset dpms force off".

so does mine!  (thinkpad a21m)  and that's a good thing, because it nothing i can figure out issues a "button/lid" acpi event.

but come to think of it, it would be nice to have something like

on_lid_close {
  if power==ac blank_screen
  else sleep
}

"button/lid" isn't the only event that doesn't get sent, though.  my acpi is fricking weird.  but that's in another post.

-kludge


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

Board footer

Powered by FluxBB