You are not logged in.

#1 2007-02-12 17:34:44

billy
Member
From: Slovenia
Registered: 2006-09-13
Posts: 164

laptop lid/hard-drive problems

i've installed laptop-mode-tools to be able to automatically adjust hd parameters and turn off the lid when it's closed down. well i ran into some problems roll

1.when i closed the lid the screnn was black but the backlight was turned on. i fixed this by editing /etc/acpi/actions/lm_lid.sh to:

#!/bin/bash

# lid button pressed/released event handler
test -x /usr/sbin/laptop_mode && /usr/sbin/laptop_mode auto

if grep -q open /proc/acpi/button/lid/LID/state
then
       /usr/bin/xset -display :0.0 dpms force on
else
       /usr/bin/xset -display :0.0 dpms force off
fi

This now turns of the backlight but there is another problem. if another user is logged in on a different display this doesn't work. i tried eraseing -display :0.0 argument but it didn't work. how can i repair this?

2. for using hdparm it says in the wiki http://wiki.archlinux.org/index.php/Pos … own_Kernel that you must enable some kernel settings. is this maybe included in the beyond kernel?

3. does hdparm permanently change hard-drive settings or you need to run it every time the computer boots?

Last edited by billy (2007-02-12 17:36:23)

Offline

#2 2007-02-12 17:50:00

zeus
Member
From: Korolev / Russia
Registered: 2006-09-19
Posts: 117
Website

Re: laptop lid/hard-drive problems

1) use vbetool instead X

#!/bin/bash
if [ ! "$(cat /proc/acpi/button/lid/LID/state | grep open)" = "" ];
  then vbetool dpms on
#  else hibernate
fi

2) 3) use extra/laptop-mode-tools

Offline

#3 2007-02-12 18:38:43

billy
Member
From: Slovenia
Registered: 2006-09-13
Posts: 164

Re: laptop lid/hard-drive problems

vbetool works the same as laptop-mode-tools with same problems as before: backlight on and (forgot to mention it in previous post tongue) when i open the lid the screen is still black and must do ctrl+Fx then ctrl+F7 to see the desktop sad. is this maybe because i use fglrx rivers? 
well i combined both  scripts into one and now it works smile:

#!/bin/bash

if grep -q open /proc/acpi/button/lid/LID/state
then
       /usr/bin/xset -display :0.0 dpms force on
       vbetool dpms on
else
       /usr/bin/xset -display :0.0 dpms force off
       vbetool dpms off
fi

the screen is still black (with backlight turned on) when i open the lid but when i move the mouse the desktop shows up. on the other display (not :0) the desktop shows up on itself thou hmm.
Is it ok to turn off/on dpms twice?
thx for the help zeus!

Offline

#4 2007-02-12 19:50:58

zeus
Member
From: Korolev / Russia
Registered: 2006-09-19
Posts: 117
Website

Re: laptop lid/hard-drive problems

try vbetool state save/restore (search in google... i don't remmember correct commands)
but i think vbetool dpms on/off must be enough

Offline

#5 2007-02-12 23:06:32

billy
Member
From: Slovenia
Registered: 2006-09-13
Posts: 164

Re: laptop lid/hard-drive problems

i restarted my laptop and your vbetool script was working. but after a fullscreen 3d game i had to do ctrl+alt+fx ctrl+alt+f7 again to se the desktop sad.  it's like the system works different every time i boot. neutral

Offline

#6 2007-02-12 23:26:36

zeus
Member
From: Korolev / Russia
Registered: 2006-09-19
Posts: 117
Website

Re: laptop lid/hard-drive problems

seems like your acpid boot not at evry system boot
hm
Have you add "apm=off acpi=on" at kernel param line in menu.conf?

Offline

#7 2007-02-12 23:27:08

billy
Member
From: Slovenia
Registered: 2006-09-13
Posts: 164

Re: laptop lid/hard-drive problems

ok, i restarted the laptop again and found out that a 3d game isn't causing the problems. i recrated the problems by:
- creating a new graphical login at a different display (System->new login in xfce menu ... i think this option became availabile when i installed gnome)
- then switching bact to first (:0) display

until then the vbetool dpms on/off was working great (even on second display).


i don't know if this is connected but when i go to init 3 (i boot into init 5) i get a black screen too. but here the virtual consoles don't appear even if i change between them.

Offline

Board footer

Powered by FluxBB