Skip to content

GPU resumes to D0 immediately after ending transition to D3Cold (RTD3) #905

Open

Description

@imaGuru

NVIDIA Open GPU Kernel Modules Version

575.64.03
575.64.05-1
580.76.05

Please confirm this issue does not happen with the proprietary driver (of the same version). This issue tracker is only for bugs specific to the open kernel driver.

  • I confirm that this does not happen with the proprietary driver package.

Operating System and Version

Arch Linux

Kernel Release

6.15.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 17 Jul 2025 21:05:29 +0000 x86_64 GNU/Linux
6.12.39-1
6.16.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 23 Aug 2025 15:32:49 +0000 x86_64 GNU/Linux

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.

  • I am running on a stable kernel release.

Hardware: GPU

NVIDIA GeForce RTX 4060 Laptop GPU (UUID: GPU-a0338cc2-52ca-fc18-d87f-0a5df1c5ca22)

Describe the bug

Laptop: Lenovo Legion Slim 5 16ahp9
CPU: AMD Ryzen 7 8845HS w/ Radeon 780M Graphics

dGPU can enter suspended state and turn off memory but won't stay cold. dGPU is woken up immediately after ending transition to D3cold. Waiting 15s causes GPU to sleep again, only to repeat the cycle. This behaviour persists even after killing all graphical interface (gdm/gnome/wayland/xorg) and no applications are using the GPU.

nvidia_drm module can be removed with modprobe -r when not running gnome (wayland/xorg). After removal the GPU suspends normally. Starting GDM and gnome with nvidia_drm removed works - running apps on dGPU also seems to work. Enabling nvidia-persistenced, nvidia-powerd or modprobing nvidia_drm brings back the bug with 15s turn on/off cycle

Suspending system to ram and waking up the laptop allows the GPU to power down correctly once for indefinite amount of time, until the first wakeup. After the bug manifests as usual.

These look like the same or very similar issues:

30.03.2026: Current perfect workaround - #905 (comment)

Best workaround which allows the dGPU to stay in D3Cold although with memory turned on, but in self refresh mode:

options nvidia NVreg_DynamicPowerManagement=0x02
options nvidia NVreg_DynamicPowerManagementVideoMemoryThreshold=0
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"

# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"

Windows doesn't have this issue.

To Reproduce

  1. Boot into system gdm/gnome (wayland or xorg) (GPU goes into cold state and wakes up during booting into GUI - runtime_suspended_time > 0). If GPU was not d3cold, let it go into d3cold and wake it after up (eg. with nvidia-smi)
  2. Wait 15s for GPU to go to sleep.
  3. GPU wakes up immediately after suspending.
  4. Cycle continues every 15s, gpu can no longer stay d3cold longer than 1s

Bug Incidence

Always

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

No response

Activity

  1. added
    bug
    on Jul 20, 2025
  2. changed the title [-]nvidia_drm prevents gpu from staying in suspended state[/-] [+]nvidia_drm prevents gpu from staying in RT3D suspended state[/+] on Jul 20, 2025
  3. changed the title [-]nvidia_drm prevents gpu from staying in RT3D suspended state[/-] [+]nvidia_drm prevents gpu from staying in RTD3 suspended state[/+] on Jul 20, 2025
  4. francoism90 commented on Jul 25, 2025

    @francoism90

    I have the same issue, and it causes my laptop to overheat! I had placed in my bag thinking the laptop was in sleep, but it almost set fire to it.. this should be fixed asap.

  5. Binary-Eater commented on Jul 25, 2025

    @Binary-Eater
    Member

    This sounds like its similar in nature to the problem I am trying to fix here: #759 (comment)

    If you load nvidia_drm with the kernel parameters modeset=1 fbdev=0, are you able to reproduce the issue?

  6. imaGuru commented on Jul 26, 2025

    @imaGuru
    Author

    Unfortunately, yes. The issue persists, even with fbdev=0.

    > cat /sys/module/nvidia_drm/parameters/modeset
    Y
    > cat /sys/module/nvidia_drm/parameters/fbdev 
    N

    Arch Wiki mentions:

    Note: Kernels officially supported by Arch enable simpledrm, while NVIDIA driver requires efifb or vesafb when nvidia_drm.fbdev is disabled/unavailable (version < 545).

    I do not know if this has any impact on your suggestion

    Only semiworkable solution so far is suspending the laptop and after wakeup the first d3cold state holds correctly, subsequent do not.

  7. Binary-Eater commented on Jul 26, 2025

    @Binary-Eater
    Member

    Thanks @imaGuru. That suggests to me that there may be other paths in nvidia-drm where we may be making allocations that have certain requirements, preventing the GPU from being able to stay in RTD3. It would help me if we could conduct the following test.

    1. Reload nvidia-drm with modeset=0 parameter
    2. Launch GNOME (using Xorg)
    3. Re-conduct the experiment to see if the GPU now stays in RTD3

    If my theory is correct, I would expect this to enable the GPU to stay in RTD3.

  8. imaGuru commented on Jul 28, 2025

    @imaGuru
    Author

    Hey. Unfortunately, still the same result - changing modeset, or fbdev doesn't have any effect on my issue (d3cold holds only for 1s).

    I did however check the issue with external monitors. After connecting external monitor and disconnecting it, GPU cannot enter d3cold at all (even the broken 1s d3colds). Reloading nvidia_drm (modeset, fbdev values don't matter) fixes that - GPU can enter d3cold, but because of my issue they only last 1s :(

  9. Binary-Eater commented on Jul 28, 2025

    @Binary-Eater
    Member

    Thanks @imaGuru ,

    That's quite peculiar. The reason I wanted to run this experiment is because with modeset=0, nvidia-drm does almost nothing. Would you mind sharing a nvidia-bug-report.sh dump in the repro-ing case with modeset=0?

  10. imaGuru commented on Jul 29, 2025

    @imaGuru
    Author

    Sure, here you go modeset=0:

    nvidia-bug-report.log.gz

    To recap: first d3cold after boot or laptop suspend to ram holds, subsequent do not (last only 1s then wakeup). Removing nvidia_drm and stoping nvidia_powerd (removing just nvidia_drm with nvidia_powerd left running, keeps the gpu in the wakeup cycle) allows GPU to stay d3cold after first wakeup

  11. francoism90 commented on Jul 30, 2025

    @francoism90

    @imaGuru If I understand you correctly, it works when setting modeset=0?

    I notice mime is set like this: https://rpmfusion.org/Howto/NVIDIA?highlight=%28%5CbCategoryHowto%5Cb%29#OSTree_.28Silverblue.2FKinoite.2Fetc.29

    I'll try with modeset=0 to verify if this solves the issue, because it wakes my laptop every time after going to sleep (NVIDIA Optimus powered).

  12. imaGuru commented on Jul 30, 2025

    @imaGuru
    Author

    @francoism90 no, modset or fbdev do not change anything for me. I think I have tried every possible configuration of Nvidia driver, xorg and wayland, nothing works unfortunately. RTD3 works only the first time it triggers, after first wakeup it does enter rtd3cold but can never stay cold longer than 1s. The result is that it constantly powers off and on and seems to waste even more power, so it's better to disable rt3d or take great care not to wake the GPU after first sleep since boot/laptop suspend.

  13. francoism90 commented on Jul 31, 2025

    @francoism90

    @imaGuru Confirmation here - the nomodeset=0 doesn't change anything.

    It's weird it seems to sleep fine when being connected on my dock (USB-C). But when I unplug it, and close the laptop - it wakes up again (but without you knowing the screen is back on).

  14. imaGuru commented on Aug 4, 2025

    @imaGuru
    Author

    @Binary-Eater anything interesting in the logs? The weird thing is that the problem persists even when nvidia_drm is unloaded but nvidia-powerd is running. That would suggest to me that the problem is somewhere deeper in the driver? Maybe dGPU is improperly put to sleep and after wakeup something is not setup right?

    It seems that new lenovo legion's suffer from this. My old y540 with 1660ti and legion 5 with 3050ti all worked fine and GPUs stay d3cold with no problem on Linux.

    I also get these error's from nvidia-powerd (maybe related to some improper power managment of the card?):

    sie 04 10:31:12 sanctuary540 nvidia-powerd[895]: ERROR! Error in processParam call : -1 16   13
    sie 04 10:31:12 sanctuary540 nvidia-powerd[895]: ERROR! Error in processParam call : -1 16   13
    sie 04 10:31:12 sanctuary540 nvidia-powerd[895]: ERROR! Error in processParam call : -1 16   13
  15. francoism90 commented on Aug 4, 2025

    @francoism90

    @imaGuru I don't think the powered daemon is compatibel, you can find this error also on the issue tracker. I've disabled that service for now.

    Sleep doesn't work at all. It's also dangerous, because you get the impression it goes to sleep, but it wakes up when you put your laptop in your bag.

  16. 83 remaining items

  17. Mulukulum commented on Aug 23, 2026

    @Mulukulum

    Hi @ryanabx @Lyude , I compiled the kernel with the patch linked above with nvidia's open-gpu-kernel-module as the running driver. I can confirm that the GPU goes into D3Cold when it's inactive and stays there. The GPU also goes into D3Cold after suspend/resume just fine.

    Hotplugging an external monitor works and the GPU wakes up from D3Cold and goes to D0. However, even after the monitor is unplugged, the GPU remains at D0 indefinitely. It never goes back to D3Cold, even after another suspend/resume.

  18. ryanabx commented on Aug 23, 2026

    @ryanabx

    Hi @ryanabx @Lyude , I compiled the kernel with the patch linked above with nvidia's open-gpu-kernel-module as the running driver. I can confirm that the GPU goes into D3Cold when it's inactive and stays there. The GPU also goes into D3Cold after suspend/resume just fine.

    Hotplugging an external monitor works and the GPU wakes up from D3Cold and goes to D0. However, even after the monitor is unplugged, the GPU remains at D0 indefinitely. It never goes back to D3Cold, even after another suspend/resume.

    When this issue occurs, does your system act like another monitor is still connected? For example, going into the display settings, do you see more than one monitor "connected"?

  19. Mulukulum commented on Aug 26, 2026

    @Mulukulum

    No it does not. However, this issue seems to happen even without the patch and doesn't seem to occur on my Bazzite install with KDE, so this might be related to GNOME/my specific config.

    EDIT: This issue appears to be gone after an update and I can no longer reproduce it. Patch seems to work just fine.

  20. francoism90 commented on Aug 26, 2026

    @francoism90

    I don't know if I posted it earlier, but my issues are gone after switching the GPU switch protocol to Basic Mode (it was enhanced mode). Someone else posted this, and it works great on my Lenovo laptop. :)

  21. Mulukulum commented on Aug 27, 2026

    @Mulukulum

    @ryanabx, After some more testing I can confirm that the bug I was seeing was not due to this patch, and was another problem in some other software. The problem seems to have gone away with a recent package update on my distro, and I am able to observe the correct behavior with both the latest Nvidia OpenRM (Driver 610) and nouveau with this patch on kernel 7.1.10. The GPU consistently goes into D3Cold with just options nvidia NVreg_DynamicPowerManagement=0x02 set, and I observe no oscillation.

  22. Lyude commented on Aug 27, 2026

    @Lyude

    @ryanabx, After some more testing I can confirm that the bug I was seeing was not due to this patch, and was another problem in some other software. The problem seems to have gone away with a recent package update on my distro, and I am able to observe the correct behavior with both the latest Nvidia OpenRM (Driver 610) and nouveau with this patch on kernel 7.1.10. The GPU consistently goes into D3Cold with just options nvidia NVreg_DynamicPowerManagement=0x02 set, and I observe no oscillation.

    Oh that's awesome! Thank you for confirming this

  23. Mulukulum commented on Sep 7, 2026

    @Mulukulum

    I believe it's safe to say that the above patch closes this issue.

    Would there be any further testing required of the patch before it can be put into the kernel? I'd be happy to help with testing any other drivers/scenarios etc.

  24. ryanabx commented on Sep 7, 2026

    @ryanabx

    I believe it's safe to say that the above patch closes this issue.

    Would there be any further testing required of the patch before it can be put into the kernel? I'd be happy to help with testing any other drivers/scenarios etc.

    I think it just needs to be reviewed, but I'm new to kernel development, so I don't know when it will be reviewed 🤷‍♂️

  25. jindalpratik commented on Sep 18, 2026

    @jindalpratik

    You may have already guessed, but me and Ryan have been working on getting a proper fix for this into the upstream kernel. It should be ready for testing, it's the top patch here (you're on your own for instructions on building the kernel, I've got too much other work to do today):

    https://gitlab.freedesktop.org/lyudess/linux/-/commit/7c48d301679ce43668cc25eacbb0eb67c0b89581

    This isn't for OpenRM specifically, but it should fix any nvidia hardware driver including OpenRM. This disables the PM notifier for the culprit GPE here, which -should- be fine From nouveau's perspective the only thing we care about wakeup events for is connector hotplugging, and those come across as ACPI_VIDEO events for us which aren't blocked by this patch). I'm not sure if OpenRM uses the same ACPI_VIDEO event as us, but I definitely don't think it uses the GPE either (as evidenced by the fact people here have had success with simply disabling the GPE from userspace). However, testing would be appreciated. The things to test:

    * Making sure the GPU goes into D3Cold when it's inactive and stays there as long as it remains inactive, obv.
    
    * Making sure it still goes into D3Cold when it's inactive even after a full system suspend/resume cycle (and hibernate, if you can test it).
    
    * Testing display connector hotplugging while the GPU is in D3Cold. As in, if your laptop has connectors which you know are routed directly to the discrete nvidia GPU, allow the GPU to idle into D3Cold and then try plugging a monitor into it to make sure it wakes up accordingly and detects the monitor. This is pretty much the only actual wake-up event we care about from the GPU, and it shouldn't be affected by this patch but we should definitely make sure.
    

    Once I can hear back from ryan or someone else regarding testing on the nouveau side, I will be sending this upstream. Testing of this patch with OpenRM would also be appreciated.

    Hi i seem to be facing the same bug on my Lenovo LOQ 15AHP9 (83DX), which has the same RTX 4060 (10de:28e0). The dGPU runtime-suspends and wakes again after about 1.5 s. Every time, exactly one ACPI GPE (gpe10, the wake event for GPP0) fires. Disabling it with echo disable > /sys/firmware/acpi/interrupts/gpe10 keeps the GPU in D3cold. Could the quirk table be extended with:

    	{
    		.matches = {
    			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    			DMI_MATCH(DMI_PRODUCT_VERSION, "LOQ 15AHP9"),
    		},
    	},
    
  26. ryanabx commented on Sep 18, 2026

    @ryanabx

    Hi i seem to be facing the same bug on my Lenovo LOQ 15AHP9 (83DX), which has the same RTX 4060 (10de:28e0). The dGPU runtime-suspends and wakes again after about 1.5 s. Every time, exactly one ACPI GPE (gpe10, the wake event for GPP0) fires. Disabling it with echo disable > /sys/firmware/acpi/interrupts/gpe10 keeps the GPU in D3cold. Could the quirk table be extended with:

    	{
    		.matches = {
    			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    			DMI_MATCH(DMI_PRODUCT_VERSION, "LOQ 15AHP9"),
    		},
    	},
    

    I don't see why not. Have you built the patch with your hardware matched with the quirk to verify it works? If so, @Lyude maybe we do a v2?

  27. jindalpratik commented on Sep 21, 2026

    @jindalpratik

    Hi i seem to be facing the same bug on my Lenovo LOQ 15AHP9 (83DX), which has the same RTX 4060 (10de:28e0). The dGPU runtime-suspends and wakes again after about 1.5 s. Every time, exactly one ACPI GPE (gpe10, the wake event for GPP0) fires. Disabling it with echo disable > /sys/firmware/acpi/interrupts/gpe10 keeps the GPU in D3cold. Could the quirk table be extended with:

    	{
    		.matches = {
    			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    			DMI_MATCH(DMI_PRODUCT_VERSION, "LOQ 15AHP9"),
    		},
    	},
    

    I don't see why not. Have you built the patch with your hardware matched with the quirk to verify it works? If so, @Lyude maybe we do a v2?

    Yep already built it and confirmed it works.

  28. inigo001 commented on Sep 24, 2026

    @inigo001

    You may have already guessed, but me and Ryan have been working on getting a proper fix for this into the upstream kernel. It should be ready for testing, it's the top patch here (you're on your own for instructions on building the kernel, I've got too much other work to do today):

    https://gitlab.freedesktop.org/lyudess/linux/-/commit/7c48d301679ce43668cc25eacbb0eb67c0b89581

    This isn't for OpenRM specifically, but it should fix any nvidia hardware driver including OpenRM. This disables the PM notifier for the culprit GPE here, which -should- be fine From nouveau's perspective the only thing we care about wakeup events for is connector hotplugging, and those come across as ACPI_VIDEO events for us which aren't blocked by this patch). I'm not sure if OpenRM uses the same ACPI_VIDEO event as us, but I definitely don't think it uses the GPE either (as evidenced by the fact people here have had success with simply disabling the GPE from userspace). However, testing would be appreciated. The things to test:

    * Making sure the GPU goes into D3Cold when it's inactive and stays there as long as it remains inactive, obv.
    
    * Making sure it still goes into D3Cold when it's inactive even after a full system suspend/resume cycle (and hibernate, if you can test it).
    
    * Testing display connector hotplugging while the GPU is in D3Cold. As in, if your laptop has connectors which you know are routed directly to the discrete nvidia GPU, allow the GPU to idle into D3Cold and then try plugging a monitor into it to make sure it wakes up accordingly and detects the monitor. This is pretty much the only actual wake-up event we care about from the GPU, and it shouldn't be affected by this patch but we should definitely make sure.
    

    Once I can hear back from ryan or someone else regarding testing on the nouveau side, I will be sending this upstream. Testing of this patch with OpenRM would also be appreciated.

    I have a Lenovo Legion Slim 5 16APH8 (82Y9) but in this case with a GeForce RTX 4070 Max-Q / Mobile [10de:2860] that has been facing the same issue. I have applied the patch changing the Device ID to the one my GPU has (2860) and it seems to be working properly now, with it staying in D3Cold until I execute something that requires the dGPU.

    DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, 0x2860,
                                  PCI_CLASS_DISPLAY_VGA, 8,
                                  quirk_nvidia_dgpu_broken_gpe);
    

    Could this also be added to take the 4070 into account?

    Thank you very much for finding the fix for this bug.

  29. codyit commented on Nov 26, 2026

    @codyit

    Thank you so much for authoring this patch, I can confirmed it works on my 16AHP9 with 4070 too after applying a few ID related changes specific to my situation. Apologies for bringing this up when all seem to have settled for a while, I'd like to bring up a couple of things.

    https://gitlab.freedesktop.org/lyudess/linux/-/commit/7c48d301679ce43668cc25eacbb0eb67c0b89581

    1. Since it seems the patch isn't merged yet. bit of an oddball selfish motivation (Lenovo service tech messed up product version string during motherboard replacement omitting the trailing 16AHP9...) but instead of matching human readable space delimited string, exact matching with DMI_PRODUCT_NAME might be the cleaner machine unique identifier here in the first place: 83DH for 16AHP9 82Y9 for 16APH8 83DX for 15AHP9. Quite sure it's a universal convention across Lenovo products, I've included platform driver grep result at the end.

    2. I've also done a lengthy trial and error session on an unpatched kernel, none of the other module flags have any effect except DynamicPowerManagementVideoMemoryThreshold=0. I wonder why it's not affected by those GPEs when memory is kept on? Timing?

    Flags I've tried then removed:

    cat /etc/modprobe.d/nvidia.conf 
    options nvidia_drm modeset=1
    options nvidia NVreg_DynamicPowerManagementVideoMemoryThreshold=0
    
    # This in particular doesn't affect pci power/control to be set to auto on at least version >=615.78.08
    # options nvidia NVreg_DynamicPowerManagement=0x02
    
    # options nvidia NVreg_PreserveVideoMemoryAllocations=0
    # options nvidia NVreg_EnableS0ixPowerManagement=1
    # options nvidia NVreg_S0ixPowerManagementVideoMemoryThreshold=1024
    # options nvidia NVreg_TemporaryFilePath=/var/cache/nvidia
    # options nvidia NVreg_EnableGpuFirmware=0
    # options nvidia NVreg_ResmanDebugLevel=0
    

    grep result:

    …/x86/lenovo ✗ pwd
    ~/kernel-build/linux-omarchy-custom/src/linux-7.2.15/drivers/platform/x86/lenovo
    
    …/x86/lenovo ❯ grep DMI *
    ideapad-laptop.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    ideapad-laptop.c:			DMI_MATCH(DMI_PRODUCT_NAME, "82L5")
    ideapad-laptop.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    ideapad-laptop.c:			DMI_MATCH(DMI_PRODUCT_VERSION, "IdeaPad 5 15ITL05")
    ideapad-laptop.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    ideapad-laptop.c:			DMI_MATCH(DMI_PRODUCT_NAME, "82QF"),
    ideapad-laptop.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    ideapad-laptop.c:			DMI_MATCH(DMI_PRODUCT_NAME, "82N7"),
    ideapad-laptop.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    ideapad-laptop.c:			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion R7000P2020H"),
    ideapad-laptop.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    ideapad-laptop.c:			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion 5 15ARH05"),
    ideapad-laptop.c: * There used to be a long list of DMI ids for models without a hw rfkill
    ideapad-laptop.c:		DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    ideapad-laptop.c:		DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"),
    Kconfig:	depends on DMI
    Kconfig:	  CAP_SYS_ADMIN capability, to avoid local DoS issues in platforms
    Kconfig:	depends on DMI
    Kconfig:	depends on DMI
    grep: lenovo-wmi-gamezone.o: binary file matches
    grep: lenovo-yb9-kbdock.o: binary file matches
    grep: lenovo-ymc.o: binary file matches
    think-lmi.c:	if (!capable(CAP_SYS_ADMIN))
    think-lmi.c:	if (!capable(CAP_SYS_ADMIN))
    think-lmi.c:	if (!capable(CAP_SYS_ADMIN))
    think-lmi.c:		serial = dmi_get_system_info(DMI_PRODUCT_SERIAL);
    think-lmi.c:	if (!capable(CAP_SYS_ADMIN))
    think-lmi.c:	if (!capable(CAP_SYS_ADMIN))
    thinkpad_acpi.c:/* DMI Quirks */
    thinkpad_acpi.c:	/* (0) - older versions lack DMI EC fw string and functionality */
    thinkpad_acpi.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_BOARD_NAME, "20KU"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_BOARD_NAME, "20KV"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_BOARD_NAME, "20MW"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_BOARD_NAME, "20MX"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_BOARD_NAME, "20MU"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    thinkpad_acpi.c:			DMI_MATCH(DMI_BOARD_NAME, "20MV"),
    thinkpad_acpi.c:	if (!capable(CAP_SYS_ADMIN))
    thinkpad_acpi.c:	if (!capable(CAP_SYS_ADMIN))
    thinkpad_acpi.c:	s = dmi_get_system_info(DMI_BIOS_VERSION);
    thinkpad_acpi.c:	 * See https://thinkwiki.org/wiki/List_of_DMI_IDs
    thinkpad_acpi.c:	while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev))) {
    thinkpad_acpi.c:	s = dmi_get_system_info(DMI_PRODUCT_VERSION);
    thinkpad_acpi.c:		s = dmi_get_system_info(DMI_BIOS_VENDOR);
    thinkpad_acpi.c:	s = dmi_get_system_info(DMI_PRODUCT_NAME);
    thinkpad_acpi.c:	 * Non-ancient models have better DMI tagging, but very old models
    thinkpad_acpi.c:		pr_err("unable to get DMI data: %d\n", ret);
    thinkpad_acpi.c: * DMI matching for module autoloading
    thinkpad_acpi.c: * See https://thinkwiki.org/wiki/List_of_DMI_IDs
    grep: thinkpad_acpi.o: binary file matches
    wmi-gamezone.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    wmi-gamezone.c:			DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8APU1"),
    wmi-gamezone.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    wmi-gamezone.c:			DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go S 8APU1"),
    wmi-gamezone.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    wmi-gamezone.c:			DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go S 8ARP1"),
    wmi-gamezone.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    wmi-gamezone.c:			DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8ASP2"),
    wmi-gamezone.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    wmi-gamezone.c:			DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8AHP2"),
    wmi-gamezone.c: * greater do a DMI check, as some devices report a version that supports
    yb9-kbdock.c:			DMI_MATCH(DMI_SYS_VENDOR,   "LENOVO"),
    yb9-kbdock.c:			DMI_MATCH(DMI_PRODUCT_NAME, "83KJ"),
    ymc.c:MODULE_PARM_DESC(force, "Force loading on boards without a convertible DMI chassis-type");
    ymc.c:			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
    ymc.c:			DMI_MATCH(DMI_PRODUCT_NAME, "83KJ"),
    ymc.c:			DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "31" /* Convertible */),
    ymc.c:			DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "32" /* Detachable */),
    grep: ymc.o: binary file matches
    
  30. alejor commented on Nov 26, 2026

    @alejor

    Thank you for deep digging into this. Yes, my laptop is the same as you 83DH and since I've got it I faced this annoying bug, First I realize some time ago that if I suspended it and resume the bug disappear (with VideoMemory On), but thanks that info, instead of suspending in every boot I can just echo disable > it

    neko@ciel ~ % cat ~/.config/desktop_utils/suspend_quirk
    if [ ! -f /tmp/suspend_quirk ]; then
      echo disable | sudo tee /sys/firmware/acpi/interrupts/gpe10 
      sleep 4
      touch /tmp/suspend_quirk
    #  sleep 4
    #  sudo rtcwake -m no -s 5 && systemctl suspend
    #  touch /tmp/suspend_quirk
    #  sleep 2
    fi
    neko@ciel ~ % 
    

    This works with unpatched kernels and without the need of suspend the laptop :) To work make sure edit visudo to allow that tee with nopasswd, and just make sure this script runs at boot. I use sway and autologin so it runs just before sway does

    neko@ciel ~ % cat ~/.config/sway/sway-service.sh 
    #!/bin/sh
    source $HOME/.config/desktop_utils/suspend_quirk
    source $HOME/.config/sway/env
    exec /usr/bin/sway
    neko@ciel ~ % 
    

    After discovering this, I could put videomemory off and no issues, it got D3Cold flawlessly

    neko@ciel ~ % cat /proc/driver/nvidia/gpus/0000:01:00.0/power
    Runtime D3 status:          Enabled (fine-grained)
    Tegra iGPU Rail-Gating:     Disabled
    Video Memory:               Off
    
    GPU Hardware Support:
     Video Memory Self Refresh: Supported
     Video Memory Off:          Supported
    
    S0ix Power Management:
     Platform Support:          Supported
     Status:                    Enabled
    
    Notebook Dynamic Boost:     Supported
    neko@ciel ~ % cat /etc/modprobe.d/nvidia.conf                
    # options nvidia_drm modeset=0 fbdev=0
    # options nvidia NVreg_DynamicPowerManagement=0x02 NVreg_EnableS0ixPowerManagement=1 NVreg_DynamicPowerManagementVideoMemoryThreshold=0
    options nvidia NVreg_EnableS0ixPowerManagement=1
    neko@ciel ~ % 
    

    Thank you for all the time spent figuring this out

  31. codyit commented on Nov 29, 2026

    @codyit

    I've also done a lengthy trial and error session on an unpatched kernel, none of the other module flags have any effect except DynamicPowerManagementVideoMemoryThreshold=0. I wonder why it's not affected by those GPEs when memory is kept on? Timing?

    @ryanabx @Lyude

    Sharing my investigation result on this particular question. It was done on Lenovo Legion Slim 5 16APH9 (83DH) with an RTX 4070 Max-Q (10de:2860). I appreciate the Linux v4 GPE workaround. Before extending a PCI quirk for this GPU, I wanted to make sure whether we can stop those GPE10 at the source. I used AI tools extensively to help analyze the AML and logs, and checked the key conclusions against the dumps, runtime traces, and OpenRM source. I’m a software developer, not an ACPI power-management specialist, and I learned a lot during the investigation.

    The ACPI dump identifies a specific wake path. In SSDT5, \_GPE._E10 reads PCI configuration offset 0x78 through M017, puts the upper 16 bits in ETP0, and sends Notify(\_SB.PCI0.GPP0, 0x02)—an ACPI Device Wake notification—when ETP0 is 1 or 3.

    I instrumented the AML read during the runs that loop the RTD3. The first value was 0x00010009 (ETP0=1); later reads were 0x00030009 (ETP0=3). Those values match the handler’s condition. The observed GPE10 count increased from 1 to 16, matching the 15 ETP0 reads. The Linux PCI definitions identify the register fields as the PME Requester ID, PME Status, and PME Pending; the captured requester field was 0x0009 on this system. Linux PCI register definitions

    That pins down the immediate wake mechanism: the AML handles Root Status values matching its condition by notifying GPP0 of a device wake, after which the runtime-resume loop continues. It does not yet prove what originally causes that Root Status condition to appear.

    I've pinned down a very concrete A/B capture that point toward a missing platform handoff:

    • With the normal GCOFF path, FBSR standby completed, no deferred JT request appeared in the trace, and the GPE10/ETP0 loop reproduced.
    • In runs with the EGNS deferred request enabled after FBSR, the request appeared and the GPE10 loop did not occur.

    The AML shows how this handoff could change the power sequence. OpenRM calls NVIDIA’s JT ACPI device-specific method (_DSM) with a deferred-GC6 request. The firmware records the defer-GC6 setting in TDGC and the requested exit operation (GPCX) in DGCX. When the device transitions to D3, _PS3 calls the PG00._OFF power-resource method; with the deferred request and EGNS entry selector recorded, _OFF calls GC6I. When the device returns to D0, _PS0 calls PG00._ON; the saved exit selector makes _ON call GC6O and clear the deferred state. Without the deferred request, _OFF follows the firmware’s ordinary GCOFF sequence.

    flowchart TD
        A["OpenRM runtime suspend"] --> B["FBSR saves framebuffer"]
        B --> C{"Deferred JT request set?"}
    
        C -->|"No: observed default path"| D["_PS3 → PG00._OFF native GCOFF"]
        D --> E["Root Status read by _GPE._E10"]
        E --> F["ETP0 is 1 or 3"]
        F --> G["Notify GPP0, 0x02: Device Wake"]
        G --> H["Runtime resume to D0; cycle repeats"]
    
        C -->|"Yes: EGNS + DFGC"| I["JT _DSM stores deferred state"]
        I --> J["_PS3 → PG00._OFF → GC6I"]
        J --> K["GPU stays in D3cold while idle"]
        K --> L["On wake: _PS0 → PG00._ON → GC6O"]
        L --> M["Deferred fields clear; OpenRM resumes"]
    
    Loading

    The first draft PR I submitted is to issue osGC6PowerControl(pGpu, 0x134c01, NULL) after successful standby/FBSR in the dynamic GCOFF path. The command selects EGNS, so NVIDIA self-refresh is not requested; FBSR has already saved the framebuffer. The draft gates it on successful standby, dynamic PM, OpenRM’s existing bCanUseGc6 decision, and valid JT/MSHYB capability. It has no GPU device-ID predicate. The bCanUseGc6 guard matters because OpenRM can otherwise select GCOFF as a fallback when GC6 is unavailable.

    This is a first-draft route for review, not a claim that the GPE workaround is wrong or that this behavior is universal. The captures are from one laptop and firmware image. I also have not finalized error recovery if the JT request fails; the current draft logs that failure, so it needs an unwind policy before it should be considered upstream-ready. I’d welcome feedback on whether this handoff belongs in OpenRM’s GCOFF path and what additional platform tests would be needed. At the moment I have tested repeated idle-to-D3cold cycles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions