Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1552862rdf; Sun, 5 Nov 2023 04:40:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGFVrrdPDY0sw3YUbiWY9YEcEBV1kFH3nm+m5KNIeIEMVaWcPKf1sDOtAMcVYzENiMkhQ4T X-Received: by 2002:a05:6a20:3ca2:b0:15e:d84:1c5e with SMTP id b34-20020a056a203ca200b0015e0d841c5emr33423730pzj.38.1699188026056; Sun, 05 Nov 2023 04:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699188026; cv=none; d=google.com; s=arc-20160816; b=lrtFHihQObpZBJea/ckXrizjWs+IOVJVO34Ln0PHiOEKRWvOaBRWz5qGE/i/mb5+gZ sDl0XTE/WfXCW5HXLhD/UfbzGtVz5z8J7vh8eSRLQ3hvWT4QMMuZg50JVNIe82yi5fMn LtD+xZTOo0J/J86tDlT37qd8XtsDTE0BFI76H98YwxizR3UpEg9ZU0USX7qPexGjeqRy r6hIcYh7OrpbShnx2ZOGl9GQBk5u3SM/Bg9ZZFC0LwhoHdHqVViqa/CjdXEzaZqmzBsv nBzcoFk0V4vGY5myAujuqM3o4wMP5hD329hcjFX6BLT1WwyvPDHW6THYdfTw5gnOfysT 1xoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GQGaTLmY+w0Zj+thd6Mmk8ewyjOqU0rwIPDroCStk8s=; fh=wbyqTyn4GyCeTaoG6eNy0GCQLTb0Nol6UpY2jEE1O50=; b=s0nuv0cXjmyNlymvpdyoIp4D6EvEhPyQFuU5mBJ9BlQZ6jpzq5fYLoJbK1k1K6C29B pM3zIZ3qJI64iBHrd5xfYZ8JvI4GT1iu6+Hqs8gYdRbO6pz0GYoXvhJpMYssxQBNnlqJ LwMvWZxd3rR5Zipej7pLoQyiZOk6IpM536TRc5+fW/EoQqsnrbZ0tosMJwGHTUqcntDu JpuvlD39JYfmhcQAL9p2ZAP0L0CnUwE4Mt6BXKYf1M9WlrmaPKn28mQ71piT+hd36W11 VBNyyX1dnbgwaQ45NBeoGhpj5ds9ju8orxDhIHWsd3bjdm4xQDi2OxCBoczP6gM1hVBN Jsbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e0Sqcsla; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id om9-20020a17090b3a8900b0027d4901b0b1si6181934pjb.82.2023.11.05.04.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 04:40:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e0Sqcsla; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D3BF580A5F60; Sun, 5 Nov 2023 04:40:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229470AbjKEMkX (ORCPT + 99 others); Sun, 5 Nov 2023 07:40:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKEMkW (ORCPT ); Sun, 5 Nov 2023 07:40:22 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3F0DB for ; Sun, 5 Nov 2023 04:40:19 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B52FEC433CB for ; Sun, 5 Nov 2023 12:40:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699188018; bh=UlRvN1XW4imDj5hB5w4pH9EFySsWe4m678JLij106MY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=e0Sqcsla1lp118ajyAU3s50PVm8wMNyTOZqPBFMVBxLaM+QgIVYUy68tFgRmSE0N9 4jSg3DUmfaoqG/uk9nnZ4kMC99dEEXZ552WpX9PBke7NUyCqYS0i6jBSuatGRcXci4 AnbSAlpCII3Om5FSnxmef4n3PjYYwJgZsbiqrZC8iNF9eB/8pxzdJAk84gE8VFMDJs cx9YVuJwjzqwqKcbNk0B7lDBToppxNweQ9hTFW8bCKBD/EShtNITsZ6JRQHivNy/0t mgGgI42H2GgKbMKm9JdQnFTIwhPF9MDDAx+datSBm5/M4M19n6tACKEH9AEsS4VfXv 9I/4/2RvxGqLQ== Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-9c2a0725825so523222566b.2 for ; Sun, 05 Nov 2023 04:40:18 -0800 (PST) X-Gm-Message-State: AOJu0YwwJ0zZN5ES+zDqZ1zxJoknj2iUaeu4lR3+2S3fGMIAm/9KpR13 1j1fGO9Znd+PN5ovOsJHb1VOqiXcVFZI5RzjXIs= X-Received: by 2002:a17:906:478a:b0:9be:e278:4d47 with SMTP id cw10-20020a170906478a00b009bee2784d47mr12268596ejc.27.1699188017004; Sun, 05 Nov 2023 04:40:17 -0800 (PST) MIME-Version: 1.0 References: <31ed0db1-9398-4c46-a391-fc644ec49268@ristioja.ee> In-Reply-To: From: Huacai Chen Date: Sun, 5 Nov 2023 20:40:05 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Blank screen on boot of Linux 6.5 and later on Lenovo ThinkPad L570 To: Evan Preston Cc: Jaak Ristioja , Linux regressions mailing list , Linux Kernel Mailing List , Linux DRI Development , Javier Martinez Canillas , Thorsten Leemhuis , Thomas Zimmermann , Bagas Sanjaya Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_PDS_OTHER_BAD_TLD, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 05 Nov 2023 04:40:25 -0800 (PST) Hi, Evan, On Sat, Nov 4, 2023 at 10:50=E2=80=AFAM Evan Preston = wrote: > > Hi Huacai, > > On 2023-11-03 Fri 02:36pm, Huacai Chen wrote: > > Hi, Evan, > > > > On Fri, Nov 3, 2023 at 1:54=E2=80=AFPM Evan Preston wrote: > > > > > > Hi Huacai, > > > > > > On 2023-11-02 Thu 08:38pm, Huacai Chen wrote: > > > > Hi, Jaak, > > > > > > > > On Wed, Nov 1, 2023 at 7:52=E2=80=AFPM Jaak Ristioja wrote: > > > > > > > > > > On 31.10.23 14:17, Huacai Chen wrote: > > > > > > Hi, Jaak and Evan, > > > > > > > > > > > > On Sun, Oct 29, 2023 at 9:42=E2=80=AFAM Huacai Chen wrote: > > > > > >> > > > > > >> On Sat, Oct 28, 2023 at 7:06=E2=80=AFPM Jaak Ristioja wrote: > > > > > >>> > > > > > >>> On 26.10.23 03:58, Huacai Chen wrote: > > > > > >>>> Hi, Jaak, > > > > > >>>> > > > > > >>>> On Thu, Oct 26, 2023 at 2:49=E2=80=AFAM Jaak Ristioja wrote: > > > > > >>>>> > > > > > >>>>> On 25.10.23 16:23, Huacai Chen wrote: > > > > > >>>>>> On Wed, Oct 25, 2023 at 6:08=E2=80=AFPM Thorsten Leemhuis > > > > > >>>>>> wrote: > > > > > >>>>>>> > > > > > >>>>>>> Javier, Dave, Sima, > > > > > >>>>>>> > > > > > >>>>>>> On 23.10.23 00:54, Evan Preston wrote: > > > > > >>>>>>>> On 2023-10-20 Fri 05:48pm, Huacai Chen wrote: > > > > > >>>>>>>>> On Fri, Oct 20, 2023 at 5:35=E2=80=AFPM Linux regressio= n tracking (Thorsten > > > > > >>>>>>>>> Leemhuis) wrote: > > > > > >>>>>>>>>> On 09.10.23 10:54, Huacai Chen wrote: > > > > > >>>>>>>>>>> On Mon, Oct 9, 2023 at 4:45=E2=80=AFPM Bagas Sanjaya = wrote: > > > > > >>>>>>>>>>>> On Mon, Oct 09, 2023 at 09:27:02AM +0800, Huacai Che= n wrote: > > > > > >>>>>>>>>>>>> On Tue, Sep 26, 2023 at 10:31=E2=80=AFPM Huacai Che= n wrote: > > > > > >>>>>>>>>>>>>> On Tue, Sep 26, 2023 at 7:15=E2=80=AFPM Linux regr= ession tracking (Thorsten > > > > > >>>>>>>>>>>>>> Leemhuis) wrote: > > > > > >>>>>>>>>>>>>>> On 13.09.23 14:02, Jaak Ristioja wrote: > > > > > >>>>>>>>>>>>>>>> > > > > > >>>>>>>>>>>>>>>> Upgrading to Linux 6.5 on a Lenovo ThinkPad L570= (Integrated Intel HD > > > > > >>>>>>>>>>>>>>>> Graphics 620 (rev 02), Intel(R) Core(TM) i7-7500= U) results in a blank > > > > > >>>>>>>>>>>>>>>> screen after boot until the display manager star= ts... if it does start > > > > > >>>>>>>>>>>>>>>> at all. Using the nomodeset kernel parameter see= ms to be a workaround. > > > > > >>>>>>>>>>>>>>>> > > > > > >>>>>>>>>>>>>>>> I've bisected this to commit 60aebc9559492cea6a9= 625f514a8041717e3a2e4 > > > > > >>>>>>>>>>>>>>>> ("drivers/firmware: Move sysfb_init() from devic= e_initcall to > > > > > >>>>>>>>>>>>>>>> subsys_initcall_sync"). > > > > > >>>>>>>>>>>>>>> > > > > > >>>>>>>>>>>>> As confirmed by Jaak, disabling DRM_SIMPLEDRM makes= things work fine > > > > > >>>>>>>>>>>>> again. So I guess the reason: > > > > > >>>>>>>>>> > > > > > >>>>>>>>>> Well, this to me still looks a lot (please correct me = if I'm wrong) like > > > > > >>>>>>>>>> regression that should be fixed, as DRM_SIMPLEDRM was = enabled beforehand > > > > > >>>>>>>>>> if I understood things correctly. Or is there a proper= fix for this > > > > > >>>>>>>>>> already in the works and I just missed this? Or is the= re some good > > > > > >>>>>>>>>> reason why this won't/can't be fixed? > > > > > >>>>>>>>> > > > > > >>>>>>>>> DRM_SIMPLEDRM was enabled but it didn't work at all bec= ause there was > > > > > >>>>>>>>> no corresponding platform device. Now DRM_SIMPLEDRM wor= ks but it has a > > > > > >>>>>>>>> blank screen. Of course it is valuable to investigate f= urther about > > > > > >>>>>>>>> DRM_SIMPLEDRM on Jaak's machine, but that needs Jaak's = effort because > > > > > >>>>>>>>> I don't have a same machine. > > > > > >>>>>>> > > > > > >>>>>>> Side note: Huacai, have you tried working with Jaak to ge= t down to the > > > > > >>>>>>> real problem? Evan, might you be able to help out here? > > > > > >>>>>> No, Jaak has no response after he 'fixed' his problem by d= isabling SIMPLEDRM. > > > > > >>>>>> > > > > > >>>>> > > > > > >>>>> I'm sorry, what was it exactly you want me to do? Please be= mindful that > > > > > >>>>> I'm not familiar with the internals of the Linux kernel and= DRI, and it > > > > > >>>>> might sometimes take weeks before I have time to work and r= espond on this. > > > > > >>>> It doesn't matter. I hope you can do some experiments to inv= estigate > > > > > >>>> deeper. The first experiment you can do is enabling SIMPLEFB= (i.e. > > > > > >>>> CONFIG_FB_SIMPLE) instead of SIMPLEDRM (CONFIG_DRM_SIMPLEDRM= ) to see > > > > > >>>> whether there is also a blank screen. If no blank screen, th= at > > > > > >>>> probably means SIMPLEDRM has a bug, if still blank screen, t= hat means > > > > > >>>> the firmware may pass wrong screen information. > > > > > >>> > > > > > >>> Testing with 6.5.9 I get a blank screen with CONFIG_DRM_SIMPL= EDRM=3Dy and > > > > > >>> get no blank screen with CONFIG_FB_SIMPLE=3Dy and CONFIG_DRM_= SIMPLEDRM unset. > > > > > >> CONFIG_FB_SIMPLE and CONFIG_DRM_SIMPLEDRM use the same device= created > > > > > >> by sysfb_init(). Since FB_SIMPLE works fine, I think the real = problem > > > > > >> is that DRM_SIMPLEDRM has a bug. The next step is to enable > > > > > >> CONFIG_DRM_SIMPLEDRM and trace its initialization. In detail, = adding > > > > > >> some printk() in simpledrm_probe() and its sub-routines to see= where > > > > > >> the driver fails. The output of these printk() can be seen by = the > > > > > >> 'dmesg' command after boot. > > > > > > I need your help. I tried with my laptop (ThinkPad E490, Intel = Core > > > > > > i3-8145U, UHD Graphics 620) but I can't reproduce your problem.= So > > > > > > please patch your 6.5.x kernel with this temporary patch [1], t= hen > > > > > > build a "bad kernel" with SIMPLEDRM enabled. And after booting = your > > > > > > machine with this "bad kernel", please give me the dmesg output= . Thank > > > > > > you very much. > > > > > > > > > > > > [1] http://ddns.miaomiaomiao.top:9000/download/kernel/patch-6.5= .9 > > > > > > > > > > I'm unable to download it. Can you please send it by e-mail? > > > > I'm sorry, please download from attachment. > > > > > > When applying this patch the first hunk (drivers/firmware/sysfb.c) fa= ils for > > > me with 6.5.9. Attempting to load the 6.5.9 kernel without this patc= h > > > produces no dmesg output on my machine. > > You copy-paste the patch? If you download it directly it can be > > applied successfully, I think. > > The patch downloaded from your URL applies successfully. However, I stil= l > see no dmesg output using the patched 6.5.9 kernel. 'journalctl -k -b al= l' > shows no dmesg output from any 6.5.x boots, only from 6.4.12 boots. Thank you for your testing. Since you cannot boot to GUI successfully as Jaak, you may have some troubles with getting the dmesg output. But you can try to use "systemd.unit=3Dmulti-user.target" boot parameters. In this way you may boot to the login: prompt and then you can get dmesg output. Or if you still fail, you may use 'jornalctl -k -b -1' to get the previous dmesg output with 6.4.12. Hi, Jaak, Have you tested? I think you can successfully get a dmesg output with my pa= tch. > > Evan > > > > > Huacai > > > > > > > > Evan > > > > > > > > > > > Huacai > > > > > > > > > > > > > > Jaak > > > > > > > > > > > > > > > > > > > > > > > Huacai > > > > > > > > > > > >> > > > > > >> Huacai > > > > > >> > > > > > >>> > > > > > >>> Jaak > > > > > >>> > > > > > >>>> > > > > > >>>> Huacai > > > > > >>>> > > > > > >>>>> > > > > > >>>>> Jaak > > > > > >>>>> > > > > > >>>>>>> > > > > > >>>>>>> But I write this mail for a different reason: > > > > > >>>>>>> > > > > > >>>>>>>> I am having the same issue on a Lenovo Thinkpad P70 (Int= el > > > > > >>>>>>>> Corporation HD Graphics 530 (rev 06), Intel(R) Core(TM) = i7-6700HQ). > > > > > >>>>>>>> Upgrading from Linux 6.4.12 to 6.5 and later results in = only a blank > > > > > >>>>>>>> screen after boot and a rapidly flashing device-access-s= tatus > > > > > >>>>>>>> indicator. > > > > > >>>>>>> > > > > > >>>>>>> This additional report makes me wonder if we should rever= t the culprit > > > > > >>>>>>> (60aebc9559492c ("drivers/firmware: Move sysfb_init() fro= m > > > > > >>>>>>> device_initcall to subsys_initcall_sync") [v6.5-rc1]). Bu= t I guess that > > > > > >>>>>>> might lead to regressions for some users? But the patch d= escription says > > > > > >>>>>>> that this is not a common configuration, so can we maybe = get away with that? > > > > > >>>>>> From my point of view, this is not a regression, 60aebc= 9559492c > > > > > >>>>>> doesn't cause a problem, but exposes a problem. So we need= to fix the > > > > > >>>>>> real problem (SIMPLEDRM has a blank screen on some conditi= ons). This > > > > > >>>>>> needs Jaak or Evan's help. > > > > > >>>>>> > > > > > >>>>>> Huacai > > > > > >>>>>>> > > > > > >>>>>>> Ciao, Thorsten (wearing his 'the Linux kernel's regressio= n tracker' hat) > > > > > >>>>>>> -- > > > > > >>>>>>> Everything you wanna know about Linux kernel regression t= racking: > > > > > >>>>>>> https://linux-regtracking.leemhuis.info/about/#tldr > > > > > >>>>>>> If I did something stupid, please tell me, as explained o= n that page. > > > > > >>>>>>> > > > > > >>>>>>>>>>>>> When SIMPLEDRM takes over the framebuffer, the scre= en is blank (don't > > > > > >>>>>>>>>>>>> know why). And before 60aebc9559492cea6a9625f ("dri= vers/firmware: Move > > > > > >>>>>>>>>>>>> sysfb_init() from device_initcall to subsys_initcal= l_sync") there is > > > > > >>>>>>>>>>>>> no platform device created for SIMPLEDRM at early s= tage, so it seems > > > > > >>>>>>>>>>>>> also "no problem". > > > > > >>>>>>>>>>>> I don't understand above. You mean that after that c= ommit the platform > > > > > >>>>>>>>>>>> device is also none, right? > > > > > >>>>>>>>>>> No. The SIMPLEDRM driver needs a platform device to w= ork, and that > > > > > >>>>>>>>>>> commit makes the platform device created earlier. So,= before that > > > > > >>>>>>>>>>> commit, SIMPLEDRM doesn't work, but the screen isn't = blank; after that > > > > > >>>>>>>>>>> commit, SIMPLEDRM works, but the screen is blank. > > > > > >>>>>>>>>>> > > > > > >>>>>>>>>>> Huacai > > > > > >>>>>>>>>>>> > > > > > >>>>>>>>>>>> Confused... > > > > > >>>>>>>>>>>> > > > > > >>>>>>>>>>>> -- > > > > > >>>>>>>>>>>> An old man doll... just what I always wanted! - Clar= a > > > > > >>>>>>>>>>> > > > > > >>>>>>>>>>> > > > > > >>>>>>>> > > > > > >>>>>>>> > > > > > >>>>> > > > > > >>> > > > > > > > > > > >