From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Detecting if display is powered on or not Date: Sun, 17 Oct 2010 16:07:50 +0300 Message-ID: <20101017130750.GW2804@reaktio.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.tele.fi (smtp.tele.fi [192.89.123.25]) by gabe.freedesktop.org (Postfix) with ESMTP id BFFDA9E77A for ; Sun, 17 Oct 2010 06:08:08 -0700 (PDT) Received: from ydin.reaktio.net (reaktio.net [194.89.68.22]) by smtp.tele.fi (Postfix) with ESMTP id 2630FAA7 for ; Sun, 17 Oct 2010 16:07:50 +0300 (EEST) Content-Disposition: inline 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: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hello, While I was discussing the laptop lid/dock issues with Fedora people this issue was brought up. How do you determine if a display is actually powered on or not? Scenario: - Laptop in a docking station, lid open, so internal LVDS enabled. - External DVI display connected, but powered off. So in this case the external display shouldn't be used, since it's off. What happens is this: # cat /sys/class/drm/card0-DVI-D-1/status connected # cat /sys/class/drm/card0-DVI-D-1/enabled enabled # cat /sys/class/drm/card0-DVI-D-1/modes 1920x1080 1600x1200 1680x1050 1280x1024 1440x900 1280x960 1280x800 1024x768 800x600 800x600 640x480 So it *looks* like it's enabled and active, but actually it's powered off. Is there a method to determine the actual state? That is pretty important information for the daemon/tool/script implementing the "policy" of which outputs to enable/disable.. Thanks! -- Pasi