From: Pierre Guinoiseau <songoku38@gmail.com>
To: gentoo-laptop@lists.gentoo.org
Subject: Re: [gentoo-laptop] turn off laptop monitor when closing lid
Date: Mon, 14 Aug 2006 20:37:51 +0200 [thread overview]
Message-ID: <44E0C2FF.9000803@gmail.com> (raw)
In-Reply-To: <a9f1a6400608131904q2391ff9di15bd75cb54b427a8@mail.gmail.com>
Hi
Try with sys-apps/vbetool, it work for me :)
- /etc/acpi/default.sh :
#!/bin/bash
group=${1/\/*/}
action=${1/*\//}
case "$group" in
button)
case "$action" in
power) /sbin/init 0
;;
lid) /etc/acpi/actions/toggle-display.sh
;;
sleep) /usr/sbin/hibernate-ram
;;
*) logger "ACPI action $action is not defined"
;;
esac
;;
*) logger "ACPI group $group / action $action is not defined"
;;
esac
- /etc/acpi/actions/toggle-display.sh :
#!/bin/bash
LID_STATE="/proc/acpi/button/lid/LID/state"
LID_OPEN="open"
LID_CLOSED="closed"
if [[ "$(grep ${LID_OPEN} ${LID_STATE})" != "" ]]; then
logger "Switching on Display"
/usr/sbin/vbetool dpms on
elif [[ "$(grep ${LID_CLOSED} ${LID_STATE})" != "" ]]; then
logger "Switching off Display"
/usr/sbin/vbetool dpms off
fi
Pierre
Neil Isaac a écrit :
> I modified my /etc/acpi/default.sh to:
>
> -- snip off the top --
> case "$group" in
> button)
> case "$action" in
> power) /sbin/init 0
> setterm -blank 0
> ;;
>
> lid) /usr/bin/xset -display :0.0 dpms force
> off # i added this
> ;;
>
> *) logger "ACPI action $action is not
> defined"
> ;;
> esac
> ;;
> *)
> logger "ACPI group $group / action $action is not defined"
> ;;
> esac
> -- EOF --
>
> This preforms exactly as I would like it to (turn the laptop monitor
> right off) but it obviously only works while running X. How can I
> adapt it to achieve the same end even if I'm not running X. Note that
> my screen already blanks after a given time, but still emits some
> light.
>
>
--
Pierre Guinoiseau
Email: songoku38@gmail.com
M$N: songoku38@gmail.com
Jabber: lnx@jabber.fr
WWW: http://akoya.homelinux.net
--
gentoo-laptop@gentoo.org mailing list
next prev parent reply other threads:[~2006-08-14 18:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-14 2:04 [gentoo-laptop] turn off laptop monitor when closing lid Neil Isaac
2006-08-14 18:13 ` Pierre Guinoiseau
2006-08-14 18:37 ` Pierre Guinoiseau [this message]
2006-08-14 21:39 ` Neil Isaac
2006-08-14 22:02 ` Michael Greenberg
2006-08-15 2:04 ` Neil Isaac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44E0C2FF.9000803@gmail.com \
--to=songoku38@gmail.com \
--cc=gentoo-laptop@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox