From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C52E4C55186 for ; Wed, 22 Apr 2020 23:25:09 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F38E20706 for ; Wed, 22 Apr 2020 23:25:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Lwt3hTCB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZlR+o4j/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F38E20706 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AE61A16DA; Thu, 23 Apr 2020 01:24:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AE61A16DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1587597907; bh=eQWN3pP46KHM49RJh6DB+rLU7u/InpAf2XNNJk3Uh0A=; h=Date:From:To:Subject:In-Reply-To:Cc:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=Lwt3hTCBZ3UKk5ni1UTzpuq2OiEublVDDa+Mrj7hN+Jztd99emXMh2GvDL+ihQ+rH mGwokVU4TwsHx3Mqp1LeDG8Bz7ti9vGpkRisGPFotYigb1+IvR2Nil1F4oLUDv50fg b4OoKN+Gb9Y5lyddG8galzxKlp5yIeNMGerbDfs4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4AEFDF8020C; Thu, 23 Apr 2020 01:21:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 05628F8021C; Thu, 23 Apr 2020 01:21:35 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A082DF80108 for ; Thu, 23 Apr 2020 01:21:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A082DF80108 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZlR+o4j/" Received: from localhost (mobile-166-175-187-227.mycingular.net [166.175.187.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 529712076C; Wed, 22 Apr 2020 23:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587597689; bh=eQWN3pP46KHM49RJh6DB+rLU7u/InpAf2XNNJk3Uh0A=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ZlR+o4j/dIfsKlG85ZyM/YXf5IjN3j5mL315OQtJva0g0unK7gSvSEvf93zO6/i9D RXsaegX5CNyrsxE8zkl9PnrDZXu5bGH8raTLZ40pfFSDEBdGUpy9GmQDya+o6RsQrc KS9fX0bRBoDa5BlL1cBbNhSkocIzs8LGohDtrQaQ= Date: Wed, 22 Apr 2020 18:21:27 -0500 From: Bjorn Helgaas To: Takashi Iwai Subject: Re: Unrecoverable AER error when resuming from RAM (hda regression in 5.7-rc2) Message-ID: <20200422232127.GA24666@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: alsa-devel@alsa-project.org, linux-pm@vger.kernel.org, linux-pci@vger.kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, "Alex Xu \(Hello71\)" , Roy Spliet X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, Apr 22, 2020 at 11:25:04PM +0200, Takashi Iwai wrote: > On Wed, 22 Apr 2020 22:50:28 +0200, > Bjorn Helgaas wrote: > > ... > > I feel like this UR issue could be a PCI core issue or maybe some sort > > of misuse of PCI power management, but I can't seem to get traction on > > it. > > > > > Then the display freezes and the system basically falls apart (can't > > > even sudo reboot -f, need to use magic sysrq). > > > > > > I bisected this to "ALSA: hda: Skip controller resume if not needed". > > > Setting snd_hda_intel.power_save=0 resolves the issue. > > > > FWIW, the complete citation is c4c8dd6ef807 ("ALSA: hda: Skip > > controller resume if not needed"), > > https://git.kernel.org/linus/c4c8dd6ef807, which first appeared in > > v5.7-rc2. > > Yes, and I posted the fix patch right now: > https://lore.kernel.org/r/20200422203744.26299-1-tiwai@suse.de > > The possible cause was the tricky resume code that both HD-audio > controller (the parent PCI device) and the codec devices used. > > At least the patch above seems working for the reporter's machine. > Now we need a bit more testing before merging, but it looks promising, > so far. Great, I'm glad you figured something out because I sure wasn't getting anywhere! Maybe this is a tangent, but I can't figure out what snd_power_change_state() is doing. It *looks* like it's supposed to change the PCI power state, but I gave up trying to figure out where it actually touches the device. It seems like sound has more magic in power management than other device types, which makes me wonder if we're not providing the right interfaces or something. Bjorn From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B54ABC55186 for ; Wed, 22 Apr 2020 23:21:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 747792084D for ; Wed, 22 Apr 2020 23:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587597694; bh=eQWN3pP46KHM49RJh6DB+rLU7u/InpAf2XNNJk3Uh0A=; h=Date:From:To:Cc:Subject:In-Reply-To:List-ID:From; b=mVmHPi9qGFGTLmQ5AVQvKHUzyuDTmxDhYGD0N1em14xVHQSfvVnvlRT8NunLoFew1 Ax4341TXki+P+iQeQZK6GixIbiiUgnB+8eQoeuhkFnRgobve8+SiTpjgovXTrwqnp1 kf/llCRv0bmfafJCVK/zTiY36NrYXlAilVnx37/A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726046AbgDVXVa (ORCPT ); Wed, 22 Apr 2020 19:21:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:60670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbgDVXVa (ORCPT ); Wed, 22 Apr 2020 19:21:30 -0400 Received: from localhost (mobile-166-175-187-227.mycingular.net [166.175.187.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 529712076C; Wed, 22 Apr 2020 23:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587597689; bh=eQWN3pP46KHM49RJh6DB+rLU7u/InpAf2XNNJk3Uh0A=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ZlR+o4j/dIfsKlG85ZyM/YXf5IjN3j5mL315OQtJva0g0unK7gSvSEvf93zO6/i9D RXsaegX5CNyrsxE8zkl9PnrDZXu5bGH8raTLZ40pfFSDEBdGUpy9GmQDya+o6RsQrc KS9fX0bRBoDa5BlL1cBbNhSkocIzs8LGohDtrQaQ= Date: Wed, 22 Apr 2020 18:21:27 -0500 From: Bjorn Helgaas To: Takashi Iwai Cc: "Alex Xu (Hello71)" , alsa-devel@alsa-project.org, Roy Spliet , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org Subject: Re: Unrecoverable AER error when resuming from RAM (hda regression in 5.7-rc2) Message-ID: <20200422232127.GA24666@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, Apr 22, 2020 at 11:25:04PM +0200, Takashi Iwai wrote: > On Wed, 22 Apr 2020 22:50:28 +0200, > Bjorn Helgaas wrote: > > ... > > I feel like this UR issue could be a PCI core issue or maybe some sort > > of misuse of PCI power management, but I can't seem to get traction on > > it. > > > > > Then the display freezes and the system basically falls apart (can't > > > even sudo reboot -f, need to use magic sysrq). > > > > > > I bisected this to "ALSA: hda: Skip controller resume if not needed". > > > Setting snd_hda_intel.power_save=0 resolves the issue. > > > > FWIW, the complete citation is c4c8dd6ef807 ("ALSA: hda: Skip > > controller resume if not needed"), > > https://git.kernel.org/linus/c4c8dd6ef807, which first appeared in > > v5.7-rc2. > > Yes, and I posted the fix patch right now: > https://lore.kernel.org/r/20200422203744.26299-1-tiwai@suse.de > > The possible cause was the tricky resume code that both HD-audio > controller (the parent PCI device) and the codec devices used. > > At least the patch above seems working for the reporter's machine. > Now we need a bit more testing before merging, but it looks promising, > so far. Great, I'm glad you figured something out because I sure wasn't getting anywhere! Maybe this is a tangent, but I can't figure out what snd_power_change_state() is doing. It *looks* like it's supposed to change the PCI power state, but I gave up trying to figure out where it actually touches the device. It seems like sound has more magic in power management than other device types, which makes me wonder if we're not providing the right interfaces or something. Bjorn