I have a pretty much similar problem. Though the laptop screen just turns straight back on again without even waiting for me to hit the keyboard.
I have a Dell D520 on a docking station. I turn it on with the lid closed and use the external keyboard and screen. It was with some dismay I noticed that the screen has been on for hours on end, explains why the laptop screen is a bit dull now, it's aged.
So I turned it on with a bit of cardboard holding the lid button down. It boots with the laptop screen off, the external on. Right up until X (gdm login) gets going the laptop screen is off ... but then, on it goes.
I tried the script above in /etc/acpi/local ... I did not have a local dir (running Ubuntu 8.04 and keeping it up to date) so I created one. No joy. No idea why.
In the meantime I have lifted the lid (so I can see - no longer "trust" ubuntu on this) inserted cardboard on the button and manually run the xrandr --ouput LVDS --off in a shell. This works.
this is the lshal -m output at the moment
---------
having manually (xrandr) fixed the prob, external:on laplcd:off
I have a pretty much similar problem. Though the laptop screen just turns straight back on again without even waiting for me to hit the keyboard.
I have a Dell D520 on a docking station. I turn it on with the lid closed and use the external keyboard and screen. It was with some dismay I noticed that the screen has been on for hours on end, explains why the laptop screen is a bit dull now, it's aged.
So I turned it on with a bit of cardboard holding the lid button down. It boots with the laptop screen off, the external on. Right up until X (gdm login) gets going the laptop screen is off ... but then, on it goes.
I tried the script above in /etc/acpi/local ... I did not have a local dir (running Ubuntu 8.04 and keeping it up to date) so I created one. No joy. No idea why.
In the meantime I have lifted the lid (so I can see - no longer "trust" ubuntu on this) inserted cardboard on the button and manually run the xrandr --ouput LVDS --off in a shell. This works.
this is the lshal -m output at the moment
---------
having manually (xrandr) fixed the prob, external:on laplcd:off
remove cardboard from lid switch (open the lid)
15:11:41.626: computer_ logicaldev_ input condition ButtonPressed = switch-videomode logicaldev_ input_3 property button.state.value = false logicaldev_ input_3 condition ButtonPressed = lid i8042_i8042_ KBD_port_ logicaldev_ input condition ButtonPressed = switch-videomode
15:11:41.629: computer_
15:11:41.632: computer_
15:11:41.787: platform_
both screens on ... fine
replace cardboard (close the lid)
15:11:53.464: computer_ logicaldev_ input condition ButtonPressed = switch-videomode logicaldev_ input_3 property button.state.value = true logicaldev_ input_3 condition ButtonPressed = lid i8042_i8042_ KBD_port_ logicaldev_ input condition ButtonPressed = switch-videomode
15:11:53.475: computer_
15:11:53.476: computer_
15:11:53.632: platform_
both screens on ... bother
xrandr --output LVDS --off
laplcd:off ... good