* [PATCH] Revert "nouveau: pci: quiesce GPU on shutdown"
@ 2026-10-25 21:30 Marek Vasut
2026-11-14 16:20 ` Uwe Kleine-König
0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2026-10-25 21:30 UTC (permalink / raw)
To: dri-devel
Cc: Marek Vasut, Danilo Krummrich, David Airlie, Li Chen, Lyude Paul,
Maarten Lankhorst, Maxime Ripard, Ole Carlsen, Simona Vetter,
Thomas Zimmermann, Uwe Kleine-König, linux-kernel, nouveau
This reverts commit 310326bb7df4bba094a3fc60364c641c547fd923.
This breaks shutdown on ThinkPad W510, without the offending commit
the system normally powers off, with the offending commit the system
ends up spinning indefinitely and the CPU fan goes full throttle on
shutdown.
The behavior was already reported in debian bugtracker multiple times
for various other computers too, and git bisect lands as this commit.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1141969
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1146033
I tested the revert with Linux 7.2.12 from debian unstable, not next
or drm trees, mainly because it was easier with debian test-patches
script on that machine.
Signed-off-by: Marek Vasut <marex@nabladev.com>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: David Airlie <airlied@gmail.com>
Cc: Li Chen <me@linux.beauty>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Ole Carlsen <ole.carlsen@tutamail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Uwe Kleine-König <ukleinek@debian.org>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: nouveau@lists.freedesktop.org
---
NOTE: Maybe the revert is not the ideal solution, but it does fix my
problem, and I think being able to shut computer down is a good
functionality to have.
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 32 ---------------------------
1 file changed, 32 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 5e1336615cf6d..36c74f9edaa83 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1090,37 +1090,6 @@ nouveau_pmops_resume(struct device *dev)
return ret;
}
-static void
-nouveau_drm_shutdown(struct pci_dev *pdev)
-{
- struct nouveau_drm *drm = pci_get_drvdata(pdev);
- int ret;
-
- if (!drm)
- return;
-
- if (drm->dev->switch_power_state == DRM_SWITCH_POWER_OFF ||
- drm->dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
- return;
-
- ret = nouveau_do_suspend(drm, false);
- if (ret)
- NV_ERROR(drm, "shutdown suspend failed with: %d\n", ret);
-
- pci_save_state(pdev);
- pci_disable_device(pdev);
- pci_set_power_state(pdev, PCI_D3hot);
- /*
- * This is just to give the pci power transition time to settle
- * before an immediate kexec jump. it’s mirroring the existing
- * nouveau_pmops_suspend() behavior, which already does
- * udelay(200) right after pci_set_power_state(..., pci_d3hot). In
- * ->shutdown() we’re allowed to sleep, so I used usleep_range()
- * instead of a busy-wait udelay().
- */
- usleep_range(200, 400);
-}
-
static int
nouveau_pmops_freeze(struct device *dev)
{
@@ -1480,7 +1449,6 @@ nouveau_drm_pci_driver = {
.id_table = nouveau_drm_pci_table,
.probe = nouveau_drm_probe,
.remove = nouveau_drm_remove,
- .shutdown = nouveau_drm_shutdown,
.driver.pm = &nouveau_pm_ops,
};
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Revert "nouveau: pci: quiesce GPU on shutdown"
2026-10-25 21:30 [PATCH] Revert "nouveau: pci: quiesce GPU on shutdown" Marek Vasut
@ 2026-11-14 16:20 ` Uwe Kleine-König
0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2026-11-14 16:20 UTC (permalink / raw)
To: Marek Vasut, dri-devel
Cc: Danilo Krummrich, David Airlie, Li Chen, Lyude Paul,
Maarten Lankhorst, Maxime Ripard, Ole Carlsen, Simona Vetter,
Thomas Zimmermann, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3616 bytes --]
Control: forwarded -1 https://lore.kernel.org/nouveau/aviIPk4xbKhgqcTy@monoceros
Hello,
On Sun, Oct 25, 2026 at 10:30:06PM +0100, Marek Vasut wrote:
> This reverts commit 310326bb7df4bba094a3fc60364c641c547fd923.
>
> This breaks shutdown on ThinkPad W510, without the offending commit
> the system normally powers off, with the offending commit the system
> ends up spinning indefinitely and the CPU fan goes full throttle on
> shutdown.
>
> The behavior was already reported in debian bugtracker multiple times
> for various other computers too, and git bisect lands as this commit.
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1141969
I think the original bug #1141969 is a different issue.
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1146033
Here it affects a Lenovo ThinkPad T510 and I think that's the same issue
that Marek has.
> I tested the revert with Linux 7.2.12 from debian unstable, not next
> or drm trees, mainly because it was easier with debian test-patches
> script on that machine.
>
> Signed-off-by: Marek Vasut <marex@nabladev.com>
> ---
> Cc: Danilo Krummrich <dakr@kernel.org>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Li Chen <me@linux.beauty>
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Ole Carlsen <ole.carlsen@tutamail.com>
> Cc: Simona Vetter <simona@ffwll.ch>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Uwe Kleine-König <ukleinek@debian.org>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org
> Cc: nouveau@lists.freedesktop.org
> ---
> NOTE: Maybe the revert is not the ideal solution, but it does fix my
> problem, and I think being able to shut computer down is a good
> functionality to have.
> ---
> drivers/gpu/drm/nouveau/nouveau_drm.c | 32 ---------------------------
> 1 file changed, 32 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
> index 5e1336615cf6d..36c74f9edaa83 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
> @@ -1090,37 +1090,6 @@ nouveau_pmops_resume(struct device *dev)
> return ret;
> }
>
> -static void
> -nouveau_drm_shutdown(struct pci_dev *pdev)
> -{
> - struct nouveau_drm *drm = pci_get_drvdata(pdev);
> - int ret;
> -
> - if (!drm)
> - return;
> -
> - if (drm->dev->switch_power_state == DRM_SWITCH_POWER_OFF ||
> - drm->dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
> - return;
> -
> - ret = nouveau_do_suspend(drm, false);
> - if (ret)
> - NV_ERROR(drm, "shutdown suspend failed with: %d\n", ret);
> -
> - pci_save_state(pdev);
> - pci_disable_device(pdev);
> - pci_set_power_state(pdev, PCI_D3hot);
> - /*
> - * This is just to give the pci power transition time to settle
> - * before an immediate kexec jump. it’s mirroring the existing
> - * nouveau_pmops_suspend() behavior, which already does
> - * udelay(200) right after pci_set_power_state(..., pci_d3hot). In
> - * ->shutdown() we’re allowed to sleep, so I used usleep_range()
> - * instead of a busy-wait udelay().
> - */
> - usleep_range(200, 400);
> -}
> -
I cannot reproduce it, but maybe it's helpful to find out where/how the
driver hangs. Adding printks might be enough, and if not, remove stuff
from nouveau_drm_shutdown() until it works. I'd guess this gives the
needed insights to determine a fix without reverting the identified
commit.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-14 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 21:30 [PATCH] Revert "nouveau: pci: quiesce GPU on shutdown" Marek Vasut
2026-11-14 16:20 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®