Re: [PATCH] Revert "nouveau: pci: quiesce GPU on shutdown"

From: Thorsten Leemhuis

Date: Thu Nov 26 2026 - 03:00:09 EST


On 10/25/26 22:30, 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
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1146033

@airlied: given that you recently applied a few nouveau bugfixes, could
you maybe pick this one up, too?

I'd even say it's eligible for -fixes, as I'd say this is still a
somewhat recent regressions and the fix hence "should be expedited", as
Linus said some time ago[1].

And to make it obvious: this will reintroduce warnings during kexec the
commit being reverted tried to fix. YMMV, but that seems like the
smaller problem.

Ciao, Thorsten

[1]
https://lore.kernel.org/all/CAHk-=wis_qQy4oDNynNKi5b7Qhosmxtoj1jxo5wmB6SRUwQUBQ@xxxxxxxxxxxxxx/

> 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@xxxxxxxxxxxx>
> ---
> Cc: Danilo Krummrich <dakr@xxxxxxxxxx>
> Cc: David Airlie <airlied@xxxxxxxxx>
> Cc: Li Chen <me@linux.beauty>
> Cc: Lyude Paul <lyude@xxxxxxxxxx>
> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Cc: Maxime Ripard <mripard@xxxxxxxxxx>
> Cc: Ole Carlsen <ole.carlsen@xxxxxxxxxxxx>
> Cc: Simona Vetter <simona@xxxxxxxx>
> Cc: Thomas Zimmermann <tzimmermann@xxxxxxx>
> Cc: Uwe Kleine-König <ukleinek@xxxxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: nouveau@xxxxxxxxxxxxxxxxxxxxx
> ---
> 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,
> };
>