From owner-freebsd-current@freebsd.org Wed Sep 16 07:08:07 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8090D3DA51A for ; Wed, 16 Sep 2020 07:08:07 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Brrlq1hzwz4Lcw; Wed, 16 Sep 2020 07:08:07 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: lwhsu/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 16C8F17E2D; Wed, 16 Sep 2020 07:08:07 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by mail-yb1-f177.google.com with SMTP id k2so4634812ybp.7; Wed, 16 Sep 2020 00:08:07 -0700 (PDT) X-Gm-Message-State: AOAM532ZVWIGeztyzK6Vb2ubplKsJGGxuSSbcpQewcIZtZnoyAqzS+ja S7ZvQcoRVDYF1LMGYOzNm8lJ+l7WaaYZ0RnOBIw= X-Google-Smtp-Source: ABdhPJxlgig/iADcVVfmKRUDwBpoYzYsYMcorhC8IJujTmkOzQF0TXA5T98dengWQjyAoL3j/P48PKc9QiLdayHBrbk= X-Received: by 2002:a25:d210:: with SMTP id j16mr33309498ybg.451.1600240086368; Wed, 16 Sep 2020 00:08:06 -0700 (PDT) MIME-Version: 1.0 References: <0b2f0f19-490b-4bb5-52b3-201e24ebeaee@anduin.net> <8f160583-47bb-3090-9713-ba0857be9b3e@FreeBSD.org> <39ceba1e-3e9e-a861-ab71-d376969990c4@FreeBSD.org> In-Reply-To: <39ceba1e-3e9e-a861-ab71-d376969990c4@FreeBSD.org> From: Li-Wen Hsu Date: Wed, 16 Sep 2020 15:07:54 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Wake from sleep kinda broken-ish? (ThinkPad Carbon X1 6th gen) To: Andriy Gapon Cc: =?UTF-8?Q?Eirik_=C3=98verby?= , freebsd-current Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2020 07:08:07 -0000 On Wed, Sep 16, 2020 at 2:30 PM Andriy Gapon wrote: > > On 15/09/2020 23:13, Eirik =C3=98verby wrote: > > On 9/15/20 9:50 PM, Andriy Gapon wrote: > >> On 15/09/2020 22:36, Eirik =C3=98verby wrote: > >>> Now, since I updated from r365358 to r365688, I have not once been ab= le to wake from sleep. > >> > >> Is that the only thing that changed? > >> Any port / package upgrades? > > > > There have been updates to packages, yes - but it didn't even occur to = me that these could impact the resume process at such an early stage. Not s= ure which that would be; obviously the drm module has been rebuilt each tim= e I upgraded, but I don't have any other kernel modules installed from pack= ages. Which version of drm module are you using? > Yes, I specifically had drm modules in mind. I also use X1C 6th and it was working perfectly after updating BIOS to 1.30 (which I'm currently using) in Sep. 2018 [1]. I don't remember any suspend/resume failures. But since late 2019, it has exactly the same symptom as yours. Suspending is fine, but upon resuming, there is about a 50% probability that the power LDE continues pulsating with all other LDEs like FnLock and CapsLock are on like the machine is awake. I still doubt if this is related to drm. I have tried to suspend/resume without drm module loads, all successed, but the number of the experiments are too small (< 10) so I can't tell if this is the conclusion. Currently I'm on r363470 with drm-devel-kmod-5.3.g20200724. While reporting issue [2], I found that setting hw.i915kms.enable_psr=3D0 in /boot/loader.conf helps. Before that it has about a 30% probability of failing to resume (yes one of the few things getting better in 2020), after that, I still see some failures, but the failure rate reduces to about 5~10%. I haven't upgraded to newer kernel/world and drm-devel-kmod yet. [1] https://twitter.com/lwhsu/status/1039711710913945601 [2] https://github.com/freebsd/drm-kmod/issues/14 Best, Li-Wen