From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: Radeon 3650HD laptop LVDS lid open/closed detection problem Date: Tue, 27 Jul 2010 11:41:12 +0300 Message-ID: <20100727084112.GN17817@reaktio.net> References: <20100621123119.GJ17817@reaktio.net> <20100621125159.GE2350@barney.localdomain> <87y6e8zbb0.fsf@riseup.net> <20100712115301.GP17817@reaktio.net> <20100712165956.GR17817@reaktio.net> <20100726194242.GI17817@reaktio.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from ydin.reaktio.net (reaktio.net [194.89.68.22]) by gabe.freedesktop.org (Postfix) with ESMTP id B61359E7B1 for ; Tue, 27 Jul 2010 01:41:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Alex Deucher Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, Jul 26, 2010 at 05:13:30PM -0400, Alex Deucher wrote: > On Mon, Jul 26, 2010 at 3:42 PM, Pasi K=E4rkk=E4inen wrote: > > On Mon, Jul 12, 2010 at 01:37:28PM -0400, Alex Deucher wrote: > >> >> >> > >> >> > > >> >> > The other patch (0001-drm-radeon-kms-fix-shared-ddc-handling.patc= h) applied > >> >> > my system mostly works now, but here's a summary about the proble= m I still have > >> >> > with the lid detection: > >> >> > > >> >> > - I boot up the laptop with lid closed (LVDS inactive) so there's= only external > >> >> > DVI display connected. Kernel boot messages show up on the extern= al DVI display, > >> >> > and GDM login prompt appears on the external DVI display. All fin= e so far. > >> >> > > >> >> > - The actual problem: when X starts gnome panel etc show up on th= e internal LVDS > >> >> > display, which I can't see at all since the lid is closed! So tho= se should go to the > >> >> > external DVI display only.. LVDS should be disconnected or inacti= ve or something.. > >> >> > > >> >> > Any pointers appreciated where to look at in the source.. I can d= o some debugging. > >> >> > >> >> Your desktop session manager should check the lid status when it lo= ads > >> >> and attempt to do the right thing if there is an external monitor > >> >> detected. > >> >> > >> > > >> > Ok. > >> > So you think it's not a bug in the lid detection? > >> > >> Not sure. =A0That's handled by apci, not the video driver. =A0You can > >> check it the lid is producing proper events by running: > >> cat /proc/acpi/button/lid/LID/state > >> with the lid open and closed. =A0The desktop manager decides what the > >> policy is for the lid (blank display, suspend, turn off the connector, > >> etc.). =A0It should also take into account other connected outputs, but > >> I don't think it handles that too well at the moment. > >> > > > > Yes, the lid acpi stuff seems to work: > > > > lid closed: > > $ cat /proc/acpi/button/lid/LID/state > > state: =A0 =A0 =A0closed > > > > lid open: > > $ cat /proc/acpi/button/lid/LID/state > > state: =A0 =A0 =A0open > > > > I also verified that the initial lid state is "closed" when > > the lid has been closed all the time during system startup > > and only external DVI display is in use. > > > > (I modified /etc/rc5.d/S01sysstat to sleep+print+sleep > > so I can check it during system startup before X starts). > > > > When the lid is closed xrandr says "LVDS connected", is that correct? > = > Yes. The LVDS is connected, even if you don't necessarily want to use it. > = That's what I was thinking of. But good to get confirmation :) > > > > I think LVDS actually is ON when lid is closed, since I can immediately > > see everything when I open the lid.. correct colors etc. > > > > So what's the component I should start looking at.. gnome-power-manager? > > or something else? > > > > Actually.. I just noticed that already in GDM prompt the internal LVDS > > gets enabled/turned on, even when the lid is closed.. I think. > = > Yes, it's up to to gdm, gnome-power-manager, etc. to decide the > display policy based on the lid state. > = Ok. Is there a way to monitor the status of drm from /proc or /sys or from = somewhere? = I guess I'll have to start reading GDM code to check what it does.. -- Pasi