LCD stays off on lid open

Fulko.Hew at sita.aero Fulko.Hew at sita.aero
Tue Nov 28 13:45:29 UTC 2006



Michal Jaegermann <michal at harddata.com>  asked on 11/27/2006 10:34:38 PM:

> On Mon, Nov 27, 2006 at 08:44:41AM -0500, Fulko.Hew at sita.aero wrote:
>
> Eh?
> >
> > #!/bin/sh
> > # /etc/acpi/lidswitch.sh
> > # Re-activates the screen when the lid is opened again
> >
> > LID_STATE="/proc/acpi/button/lid/LID/state"
> > LCD_STATE="/proc/acpi/video/VID/LCD/state"
> > VT_NR=/tmp/lid_sh
> >
> > if [ -e /tmp/acpi_sleep ]; then
> >       rm /tmp/acpi_sleep
> >       exit
> > fi
> >
> > grep -q open "$LID_STATE"
> > if [ $? -eq 0 ]; then               # open the lid
>
>   if grep -q open "$LID_STATE"; then  # lid opened
>
> >       vbetool dpms on
> >
> >       if [ -e "$VT_NR" ]; then      # we closed the lid in X
> >             chvt $(cat $VT_NR)
>               chvt $(<$VT_NR)
>
> >             rm -f "$VT_NR"
> >       fi
> > else                                # closing the lid
> >       echo $(fgconsole) > $VT_NR    # remember the current vt
>
> Really weird.  Why not simply 'fgconsole >$VT_NR' ?
>
> >       chvt 1
> > fi

I don't know why most of the code is there.
An abbreviated version would probably work too.

I fetched this solution from somebody's web site
(http://individual.utoronto.ca/jaelle_kitty/inspiron6400)
and it worked for me, so I'm just passing it along.
I suspect there might be extra code (to go along with
other stuff) to support something like suspend.



This document is strictly confidential and intended only for use by the addressee unless otherwise stated.  If you are not the intended recipient, please notify the sender immediately and delete it from your system.





More information about the fedora-test-list mailing list