public inbox for gentoo-user-de@lists.gentoo.org
 help / color / mirror / Atom feed
From: Roland Damm <roland-damm@arcor.de>
To: gentoo-user-de@lists.gentoo.org
Subject: Re: [gentoo-user-de] acpi on battery scripts beim hochfahren auch ausführen
Date: Mon, 4 Aug 2008 23:22:59 +0200	[thread overview]
Message-ID: <200808042322.59759.roland-damm@arcor.de> (raw)
In-Reply-To: <B9132FAF25F36744B6251820F22F2DDC01F5B5F8@ERLM843A.ww001.siemens.net>

Moin,

On Monday 04 August 2008 10:56:45 Zeitschel, Philipp wrote:

> leider ist ja der acpi daemon ein eventgesteuerterprozess, der die scripte
> in onbattery nur ausführt wenn der Netzstecker tatsächlich gezogen wird,
> nicht aber, wenn das notebook schon auf batterie hochgefahren wird. Hat
> jemand von euch einen tipp wie ich die Scripte ausführen lassen kann wenn
> das Notebook bereits auf Akku hochfährt?

Ich hatte so ein Ärgernis mit dem Bildschirm, der auf 'aus' sollte, wenn der 
Deckel zu ist, nicht einfach nur wenn der Deckel zugeklappt wird. Weil evtl 
ein videoplayer irgendwas overridet (wie sagt man das auf deutsch:-)?). Ob 
noch nötig ist oder nicht weiß ich nicht, aber bei mir läuft ein Cronjob alle 
paar Minuten, der den Deckel überwacht und bei geschlossenem Deckel was tut. 

In der Crontab:
*/5 * * * *     root    /root/lid-contrl > /dev/null

/root/lid-contrl:
#!/bin/sh
status=`cat /proc/acpi/button/lid/LID/state |grep "closed" `
if  [ -n "$status" ] ; then
        xset dpms force off   #Bildschirm aus
fi

Höchst wahrscheinlich ist das keine gute Lösung, aber sie hat funktioniert. 
Vielleicht kannst du was ähnliches für dein Problem basteln.

Mir ist das übrigens auch unsympatisch, dass gewisse Sachen, die von Zustand 
des Rechners abhängen sollten, nur bei Änderung des Zustandes geschaltet 
werden. Sollte da aus irgendwelchen Gründen ein Zustandsänderungsereignis 
verpasst werden, korrigiert sich das nicht mehr mit der Zeit von selbst, 
sondern der Fehler bleibt bestehen. So wie es ist, ist das System einfach 
nicht robust, fehlertolerant.

CU Rollo



  parent reply	other threads:[~2008-08-04 21:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04  8:56 [gentoo-user-de] acpi on battery scripts beim hochfahren auch ausführen Zeitschel, Philipp
2008-08-04 10:36 ` Matthias
2008-08-04 21:22 ` Roland Damm [this message]
2008-08-05  7:46   ` AW: " Zeitschel, Philipp
2008-08-05 10:14     ` Zeitschel, Philipp

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=200808042322.59759.roland-damm@arcor.de \
    --to=roland-damm@arcor.de \
    --cc=gentoo-user-de@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