LCD stays off on lid open
Michal Jaegermann
michal at harddata.com
Tue Nov 28 03:34:38 UTC 2006
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
M.
More information about the fedora-test-list
mailing list