From: Daniel Drake <dsd@gentoo.org>
To: linux-acpi@vger.kernel.org
Subject: Laptop screen doesn't come on when lid is reopened
Date: Sun, 06 May 2007 16:17:50 -0400 [thread overview]
Message-ID: <463E37EE.2060008@gentoo.org> (raw)
Hi,
Like many Dell's, my Inspiron 640m turns off the LCD display when the
lid is closed, but doesn't power it back up when the lid is opened.
This has been discussed before, with the conclusion that it's a BIOS bug
which Linux can't fix (i.e. including a link in the kernel from ACPI to
video isn't practical). However I'd like to revisit this as I believe
I've found some information which wasn't discussed/observed before:
The lid notification method can be seen here:
http://bugzilla.kernel.org/show_bug.cgi?id=5155#c6
Of specific interest, the lid notification comes with video
notifications - the DSDT seems to be expecting the OS to do something
with the video hardware.
I dug further and found that the first Store in that method is what
turns the display off, and the following If always triggers (for both
open and close events) in my testing. Sidenote: this means that the DSDT
turns the display off both on close and on open.
I also found that no link to the video layer of the kernel would be
needed to restore the display here: the _DSS method of the LCD device
will happily turn the display back on.
I fixed my DSDT with this modification:
Method (LIDE, 0, NotSerialized)
{
+ // If lid open, enable video
+ If (LNotEqual(\_SB.LID._LID(), 0)) {
+ \_SB.PCI0.VID.LCD._DSS(0x80000001)
+ Notify (\_SB.LID, 0x80)
+ Return
+ }
+
+ // If lid closed, continue
+
+ // The following Store turns the LCD off
Store (SMI (0x43, 0x00), Local0)
If (LAnd (LNotEqual (Local0, 0x00), LNotEqual (Local0, 0x0F)))
Works nicely, woohoo!
I'd now like to investigate moving this modification into the kernel so
that no DSDT changes are required. I'm running into some problems here:
If I create an acpi_driver alongside the button driver, the button
driver claims the lid and my driver doesn't. I presume this is by design
-- I was hoping that he subsystem would allow 2 drivers to work on the
same device.
I then tried creating a new module which would use acpi_get_handle() to
find the lid handle, and then acpi_install_notify_handler() to set up an
event handler. I was hoping that the subsystem would allow multiple
handlers on one event, but it appears I'm out of luck again: While the
button driver is loaded and subscribed to this event, my driver gets the
AE_ALREADY_EXISTS error code.
Are there other approaches I can take here? I'm hoping to create some
kind of "Dell extras" driver, which contains a list of buggy systems,
and listens for the lid events. When it detects a lid open event, it
will call _DSS on the LCD device.
Thanks,
Daniel
next reply other threads:[~2007-05-06 20:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-06 20:17 Daniel Drake [this message]
2007-05-09 15:48 ` Laptop screen doesn't come on when lid is reopened Len Brown
2007-05-09 22:00 ` Henrique de Moraes Holschuh
2007-05-09 22:04 ` Matthew Garrett
2007-05-09 22:30 ` Henrique de Moraes Holschuh
2007-06-01 3:03 ` Daniel Drake
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=463E37EE.2060008@gentoo.org \
--to=dsd@gentoo.org \
--cc=linux-acpi@vger.kernel.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