# Laptop Lid - Backlight stays off

## Shucklak

Alright, first off I am failry new to linux.  I've been able to learn my way around quite nicely but I have yet to fix the problem when I close the lid on my laptop, the backlight stays off.

The only thing that will turn it back on is if I plug in an outside monitor, then use the fn + F8(CRT/LCD) it will turn the monitor on, then if I hit it again it will turn the laptop LCD back on.

This is frustrating.

I've been searching this forum for months for a fix and nothing seems to work.  Even switching from X to a console and back does not bring the backlight back on.

I have a Dell Inspiron 6000 with the Intel Mobile 915GM.

Suggestions Please??

----------

## TheRAt

I assume you have tried playing with the brightness level buttons on the machine ?

----------

## Shucklak

Yes.  I have tried virtually every combination of keys with no luck.

I have also tried the KDE Power Options in the Control Center and they work, but the backlight still does not come back on.  For instance if I have it set to Standby when the lid is closed, it will, but when I power the laptop back on, the backlight stays off while the computer powers on. 

Thanks for the suggestion, all help is very much appreciated.

----------

## beatryder

Have you check in your BIOS for any relevant settings?

----------

## Shucklak

Yep. There aren't any settings for the laptop lid, that I can see anyway.

----------

## Maedhros

Moved from Desktop Environments to Kernel & Hardware.

----------

## PMcCauley

I have the same issue on a Dell Inspiron 2200.  After the reed switch is activated(the one that turns off the LCD) there must be some software control to reactivate it.  It would be nice if this was handled in hardware but it doesn't seem to be.  I haven't really looked for a solution but as a work around if kde is open alt + ctrl + f? to another tty and back to f7 or whatever and that reactivates the screen.

Patrick

Edit: this page shows a possible solution.

http://www.linuxquestions.org/questions/showthread.php?s=&threadid=364781

Fixing LCD love to switch off forever. In section "Monitor" in xorg.conf add 'Option "DPMS" "on"' . Now try 'xset dpms force on' . I've written a small script, so from console it temporarily launches X for this, and then returns.

----------

## Shucklak

Nope and Nope.

I've tired switching from ctr + alt F[0-9] and back and it doesn't work.

I've also seen the thread you listed and have attempted that and similar tasks without any luck.  Thanks though.

----------

## PMcCauley

You may want to try to PM Sejam, he has the same notebook as you.  

You could take a look at his xorg.conf(looks pretty plain to me):  http://james.whitt.name/xorg.conf

here's the thread https://forums.gentoo.org/viewtopic-t-306856-highlight-inspiron+6000.html

here's another Inspiron 6000 user: http://www.geetduggal.com/linux_on_inspiron_6000.html

Neither of the above pages show a solution as far as I read anyway but there are quite a few people with this notebook, I would email them and ask if they have ran into this.

One more link here(this one mentions your problem specifically) http://justlinux.com/forum/showthread.php?threadid=145494

EDIT: above solution is YAST specific so no idea what the chance of it working.

When I have some time I'll get try to get this working on my system.

Patrick

----------

## Shucklak

Patrick, thanks for the time to try and help.  Oddly enough I've been to everyone of those pages.

I updated my Kernel (which I have never done since I installed Gentoo a year ago) and that did not fix the problem either.

I did find something interesting out however.  If I leave another monitor plugged in, the backlight or the screen for that matter do not turn off; so the laptops LCD is not affected in anyway.  This is what I want, I just dont want to have a monitot plugged in all the time.

As always your help is well appreciated  

Thanks

Steve

----------

## Shucklak

Curious, would there be any way in maybe "tricking" the laptop into thinking that there is a monitor plugged in at all times.  Maybe this would solve my problem, but I would not know how to implement it.  Maybe editing something in my /etc/acpi/lid.sh or something similar could do it?

----------

## kurtg

I have the exact same problem on an Inspiron 9400.  It seems most people fair better such as switching consoles as a workaround, but nothing seems to help except a reboot (usually via ssh from another machine).

----------

## bigmauler

Perhaps the configs a few lines down on this page would work

http://www.konsistent.de/dat/latitude/

I do have one question. Where is the appropriate place to put 

```
lid)    /etc/acpi/actions/lid.sh

    ;;
```

 in the /etc/acpi/default.sh ?? Its all greek to me in there.

----------

## PMcCauley

Ok for anybody having this problem try this:

vbetool should hopefully reenable the LCD.  Description:   Run real-mode video BIOS code to alter hardware state (i.e. reinitialize video card)

```
echo sys-apps/vbetool ~x86 >> /etc/portage/package.keywords

emerge vbetool
```

ACPID is a daemon to monitor acpi events and run commands based on events

```
emerge sys-power/acpid
```

create file /etc/acpi/lid.sh.  You will need to make this executable as well(chmod +x).

```

#!/bin/bash

if [ ! "$(cat /proc/acpi/button/lid/LID/state | grep open)" = "" ]; then

vbetool dpms on

fi

```

add to /etc/acpi/events/default

```

event=button/lid*

action=/etc/acpi/lid.sh %e

```

start acpid

```
/etc/init.d/acpid start
```

add to default runlevel.  If you have a battery runlevel add it to that too

```
rc-update add acpid default
```

If you are having issues at thjs point check /var/log/acpid to make sure the lid open close events are registered and action performed.  Post errors and questions.

Patrick

 *bigmauler wrote:*   

> Perhaps the configs a few lines down on this page would work
> 
> http://www.konsistent.de/dat/latitude/
> 
> I do have one question. Where is the appropriate place to put 
> ...

 Last edited by PMcCauley on Mon Nov 20, 2006 6:50 am; edited 1 time in total

----------

## Shucklak

I'm having trouble emerging vbetool.

```

localhost steve # ACCEPT_KEYWORDS="~x86" emerge vbetool

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-apps/vbetool-0.5-r1 to /

>>> md5 files   ;-) vbetool-0.3.ebuild

>>> md5 files   ;-) vbetool-0.2.ebuild

>>> md5 files   ;-) vbetool-0.5.ebuild

>>> md5 files   ;-) vbetool-0.5-r1.ebuild

>>> md5 files   ;-) files/digest-vbetool-0.2

>>> md5 files   ;-) files/digest-vbetool-0.3

>>> md5 files   ;-) files/vbetool-0.3-pci-compile-fix.patch

>>> md5 files   ;-) files/digest-vbetool-0.5

>>> md5 files   ;-) files/digest-vbetool-0.5-r1

>>> md5 src_uri ;-) vbetool_0.5-1.tar.gz

>>> Unpacking source...

>>> Unpacking vbetool_0.5-1.tar.gz to /var/tmp/portage/vbetool-0.5-r1/work

>>> Source unpacked.

 * econf: updating vbetool-0.4/config.guess with /usr/share/gnuconfig/config.guess

 * econf: updating vbetool-0.4/config.sub with /usr/share/gnuconfig/config.sub

./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --without-x86emu --build=i686-pc-linux-gnu

checking for a BSD-compatible install... /bin/install -c

checking whether build environment is sane... yes

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether i686-pc-linux-gnu-gcc accepts -g... yes

checking for i686-pc-linux-gnu-gcc option to accept ANSI C... none needed

checking for style of include used by make... GNU

checking dependency style of i686-pc-linux-gnu-gcc... gcc3

configure: creating ./config.status

config.status: creating Makefile

config.status: executing depfiles commands

Making all in x86emu

make[1]: Entering directory `/var/tmp/portage/vbetool-0.5-r1/work/vbetool-0.4/x86emu'

gcc -g -O -Wall -c -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -DDEBUG -I. -Ix86emu -I../../include -I../x86emu_include debug.c

gcc -g -O -Wall -c -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -DDEBUG -I. -Ix86emu -I../../include -I../x86emu_include decode.c

debug.c: In function `X86EMU_dump_memory':

debug.c:224: warning: unsigned int format, x86emuu32 arg (arg 3)

debug.c: In function `x86emu_dump_xregs':

debug.c:403: warning: unsigned int format, x86emuu32 arg (arg 2)

debug.c:404: warning: unsigned int format, x86emuu32 arg (arg 2)

debug.c:405: warning: unsigned int format, x86emuu32 arg (arg 2)

debug.c:406: warning: unsigned int format, x86emuu32 arg (arg 2)

debug.c:407: warning: unsigned int format, x86emuu32 arg (arg 2)

debug.c:408: warning: unsigned int format, x86emuu32 arg (arg 2)

debug.c:409: warning: unsigned int format, x86emuu32 arg (arg 2)

debug.c:410: warning: unsigned int format, x86emuu32 arg (arg 2)

debug.c:415: warning: unsigned int format, x86emuu32 arg (arg 2)

gcc -g -O -Wall -c -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -DDEBUG -I. -Ix86emu -I../../include -I../x86emu_include fpu.c

gcc -g -O -Wall -c -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -DDEBUG -I. -Ix86emu -I../../include -I../x86emu_include ops.c

gcc -g -O -Wall -c -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -DDEBUG -I. -Ix86emu -I../../include -I../x86emu_include ops2.c

gcc -g -O -Wall -c -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -DDEBUG -I. -Ix86emu -I../../include -I../x86emu_include prim_ops.c

gcc -g -O -Wall -c -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -DDEBUG -I. -Ix86emu -I../../include -I../x86emu_include sys.c

ar rv libx86emu.a debug.o decode.o fpu.o ops.o ops2.o prim_ops.o sys.o

ar: creating libx86emu.a

a - debug.o

a - decode.o

a - fpu.o

a - ops.o

a - ops2.o

a - prim_ops.o

a - sys.o

make[1]: Leaving directory `/var/tmp/portage/vbetool-0.5-r1/work/vbetool-0.4/x86emu'

make[1]: Entering directory `/var/tmp/portage/vbetool-0.5-r1/work/vbetool-0.4'

if i686-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"vbetool\" -DVERSION=\"0.3\"  -I. -I.    -g -Wall -pedantic -std=gnu99 -O3 -march=pentium3 -pipe -MT vbetool.o -MD -MP -MF ".deps/vbetool.Tpo" \

  -c -o vbetool.o `test -f 'vbetool.c' || echo './'`vbetool.c; \

then mv -f ".deps/vbetool.Tpo" ".deps/vbetool.Po"; \

else rm -f ".deps/vbetool.Tpo"; exit 1; \

fi

if i686-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"vbetool\" -DVERSION=\"0.3\"  -I. -I.    -g -Wall -pedantic -std=gnu99 -O3 -march=pentium3 -pipe -MT thunk.o -MD -MP -MF ".deps/thunk.Tpo" \

  -c -o thunk.o `test -f 'thunk.c' || echo './'`thunk.c; \

then mv -f ".deps/thunk.Tpo" ".deps/thunk.Po"; \

else rm -f ".deps/thunk.Tpo"; exit 1; \

fi

In file included from /usr/include/stdlib.h:433,

                 from vbetool.c:14:

/usr/include/sys/types.h:62: error: conflicting types for `dev_t'

/usr/include/linux/types.h:25: error: previous declaration of `dev_t'

/usr/include/sys/types.h:72: error: conflicting types for `mode_t'

/usr/include/linux/types.h:31: error: previous declaration of `mode_t'

/usr/include/sys/types.h:77: error: conflicting types for `nlink_t'

/usr/include/linux/types.h:34: error: previous declaration of `nlink_t'

In file included from /usr/include/sys/types.h:216,

                 from /usr/include/stdlib.h:433,

                 from vbetool.c:14:

/usr/include/sys/select.h:78: error: conflicting types for `fd_set'

/usr/include/linux/types.h:22: error: previous declaration of `fd_set'

make[1]: *** [vbetool.o] Error 1

make[1]: *** Waiting for unfinished jobs....

make[1]: Leaving directory `/var/tmp/portage/vbetool-0.5-r1/work/vbetool-0.4'

make: *** [all-recursive] Error 1

!!! ERROR: sys-apps/vbetool-0.5-r1 failed.

!!! Function src_compile, Line 28, Exitcode 2

!!! emake failed

!!! If you need support, post the topmost build error, NOT this status message.

```

Any ideas?

----------

## PMcCauley

Shucklak, it looks like existing files on your system are creating a problem.    I took a look at those files mentioned in the source /usr/include/stdlib.h belongs to glibc,  /usr/include/linux/types.h belongs to sys-kernel/linux-headers, and /usr/include/sys/types.h belongs to glibc.  So if you "emerge  sys-kernel/linux-headers sys-libs/glibc" that may fix the issue.  Make sure you emerge --sync if you haven't yet today.  

Good luck,

Patrick

----------

## stanley

 *Quote:*   

> I do have one question. Where is the appropriate place to put
> 
> Code:
> 
> lid)    /etc/acpi/actions/lid.sh
> ...

 

There will be something like:

I don't know the exact syntax, so please nobody flame me

```
case [something] in [something]

[somethingA]) [some commands]

;;

```

Just copy the format of the entries (things like somethingA), and find an appropriate place. If there is more than one loop like that, think about what the 'case something in something' says.[/quote]

----------

## beatryder

Well, I have managed to work around this problem my self, except for the fact that I can only open/close the lid like 5 or 6 times before the lcd wont come on any more. I have noticed though that when the lid is closed, it switches to the external display.

----------

## thomasa88

Yay! Thx PMcCauley =) this works perfect and its even better than xset dpms

----------

