From patchwork Fri Oct 19 13:35:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 1618521 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 297AADF2AB for ; Fri, 19 Oct 2012 13:36:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4F8AA0BEA for ; Fri, 19 Oct 2012 06:36:04 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 603DB9E7E9 for ; Fri, 19 Oct 2012 06:35:51 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id hj13so175834wib.12 for ; Fri, 19 Oct 2012 06:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dZf+5pdyGPw1X6Prb5LuNGKc5b4QjDlRj1JWqK5yr6c=; b=c7MdWCt4kCWhZEb7Vc4lKXp/S/9R/FmjErsPINzZFkz6ycSMCZjpAnjKbIVUWdyty3 0EOPSufMWmdz2lofu+LIb/UB74nrqzJCTNA5skMHQLWQSKnNAnXWq0k8chHkImujfPWt 32JECINLKCzs8HyBiFA6Fz/YLc7ebu0y3aQSa6HDUgR51bOYsHUwpceoQoXYrNp2BXgC DETSOVlZkmOYe0m7xXqbEGy54rU4cwn5GLGXSai4lXb2BYuFgRiUJjSdr7uYlQdGvnpv juerCEFseMqFWL4TWxr4/CjteMLnXOFWzGc5itn1a9rhO1gcBxRsC+97g3zFXtMEmJlv CXRQ== MIME-Version: 1.0 Received: by 10.180.100.97 with SMTP id ex1mr3315329wib.17.1350653750599; Fri, 19 Oct 2012 06:35:50 -0700 (PDT) Received: by 10.217.45.138 with HTTP; Fri, 19 Oct 2012 06:35:50 -0700 (PDT) In-Reply-To: References: <1350485362.4391.11.camel@mattotaupa> <1350487602.4391.14.camel@mattotaupa> <1350506901.14277.4.camel@mattotaupa> <1350652208.20040.5.camel@mattotaupa> Date: Fri, 19 Oct 2012 09:35:50 -0400 Message-ID: Subject: Re: Linux 3.x: Flickering when logging into GNOME Shell or Unity From: Alex Deucher To: Paul Menzel Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org On Fri, Oct 19, 2012 at 9:34 AM, Alex Deucher wrote: > On Fri, Oct 19, 2012 at 9:10 AM, Paul Menzel > wrote: >> Am Donnerstag, den 18.10.2012, 18:14 -0400 schrieb Alex Deucher: >>> On Wed, Oct 17, 2012 at 4:48 PM, Paul Menzel wrote: >>> > Am Mittwoch, den 17.10.2012, 16:25 -0400 schrieb Alex Deucher: >>> >> On Wed, Oct 17, 2012 at 11:26 AM, Paul Menzel wrote: >>> > >>> >> > Am Mittwoch, den 17.10.2012, 16:49 +0200 schrieb Paul Menzel: >>> >> > >>> >> >> setting up an ASUS M2A-VM after some months with >>> >> >> >>> >> >> [ 3.178337] [drm] initializing kernel modesetting (RS690 0x1002:0x791E 0x1043:0x826D). >>> >> >> >>> >> >> logging in into GNOME Shell (GNOME 3) or for testing with Ubuntu 12.04 >>> >> >> and Unity, the image flickers for a second and then works normally. >>> >> >> >>> >> >> Turning on debugging >>> >> >> >>> >> >> /sys/module/drm/parameters$ echo "0x06" | sudo tee debug >>> >> >> sudo: unable to resolve host granit >>> >> >> 0x06 >>> >> >> >>> >> >> before logging in, the following is logged. Looking at the source code, >>> >> >> I do not see that this is supposed to be a problem. But maybe you can >>> >> >> figure out more. >>> >> >> >>> >> >> [ 454.896408] [drm:drm_mode_addfb], [FB:41] >>> >> >> [ 454.896427] [drm:radeon_crtc_page_flip], flip-ioctl() cur_fbo = ffff880072438400, cur_bbo = ffff880037072400 >>> >> > >>> >> > trying Linux 3.5 >>> >> > >>> >> > $ dpkg -l linux-image-3.5* | grep ii | tr -s ' ' | cut -d ' ' -f 2-4 >>> >> > linux-image-3.5-trunk-amd64 3.5.5-1~experimental.1 amd64 >>> >> > >>> >> > the flickering is still there. >>> >> >>> >> I don't see anything wrong in the log. Does the flicker occur at >>> >> regular intervals or just at start up? >>> > >>> > As far as I see, one second after hitting enter in the graphical login >>> > manager (LightDM in this case). >>> > >>> >> I suspect the flicker may be due to your desktop environment probing >>> >> for monitors at startup >>> > >>> > Hmm. Only a VGA monitor is detected and I do not see that issue on >>> > different system where I tested GNOME Shell to reproduce this. I have >>> > test Unity too again. >>> >>> Depends on the system and what connectors they have and whether or not >>> they support load detection. >> >> Is there a way to find out? This is an ASUS M2A-VM [1] with a VGA and >> DVI connector. > > The VGA and S-video ports on your system support load detection. I > don't know what your other system supports. > >> >>> > Though the probing should be in the logs somehow? But there are not >>> > during the time of login. >>> > >>> >> which causes a flicker if nothing is attached to the analog ports >>> >> (VGA, s-video) as that results in a load detection operation to probe >>> >> for old monitors without EDIDs or analog TVs. >>> > >>> > Any hint on how to rule that out? Disable some outputs on the command >>> > line or so? >>> >>> Depending on what is doing the probing you could try starting bare X >>> without a desktop environment. Or disable the analog outputs you >>> aren't using in your xorg.conf. E.g., >>> >>> Section "Monitor" >>> Identifier "S-video" >>> Option "Disable" "true" >>> EndSection >> >> I added that to the new file `/etc/X11/xorg.conf.d/99-disable.conf` also >> disabling HDMI-0 and DVI-0. Nothing changed though after restarting the >> graphical login manager (logging out and back in). > > You can try this kernel patch to disable load detection in the driver > altogether: > > diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c > b/drivers/gpu/drm/radeon/atombios_encoders.c > index 57c8277..3ffa5bb 100644 > --- a/drivers/gpu/drm/radeon/atombios_encoders.c > +++ b/drivers/gpu/drm/radeon/atombios_encoders.c > @@ -2197,6 +2197,8 @@ atombios_dac_load_detect(struct drm_encoder > *encoder, struct drm_connector *conn > struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); > struct radeon_connector *radeon_connector = > to_radeon_connector(connector); > > + return true; > + > if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT | > ATOM_DEVICE_CV_SUPPORT | > ATOM_DEVICE_CRT_SUPPORT)) { > > Actually this patch will disable load detection and tell you when it's being called: ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_CRT_SUPPORT)) { diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index 57c8277..b456da0 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -2197,6 +2197,9 @@ atombios_dac_load_detect(struct drm_encoder *encoder, struct drm_connector *conn struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); struct radeon_connector *radeon_connector = to_radeon_connector(connector); + DRM_INFO("skipping load detection\n"); + return true; + if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT |