Repository navigation
Description
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:
- https://forums.developer.nvidia.com/t/nvidia-gpu-fails-to-power-off-prime-razer-blade-14-2022/250023/40
- https://forums.developer.nvidia.com/t/4070-555-and-560-drivers-wont-stay-in-d3cold-lenovo-legion-slim-5/302967
- https://www.markwatkinson.com/knowledge/linux/nvidia-dgpu-power/#known-issues - exactly the same isssue
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
- 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)
- Wait 15s for GPU to go to sleep.
- GPU wakes up immediately after suspending.
- Cycle continues every 15s, gpu can no longer stay d3cold longer than 1s
Bug Incidence
Always
nvidia-bug-report.log.gz
More Info
No response
Activity
[-]nvidia_drm prevents gpu from staying in suspended state[/-][+]nvidia_drm prevents gpu from staying in RT3D suspended state[/+][-]nvidia_drm prevents gpu from staying in RT3D suspended state[/-][+]nvidia_drm prevents gpu from staying in RTD3 suspended state[/+]francoism90 commentedon Jul 25, 2025
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.
Binary-Eater commentedon Jul 25, 2025
This sounds like its similar in nature to the problem I am trying to fix here: #759 (comment)
If you load
nvidia_drmwith the kernel parametersmodeset=1 fbdev=0, are you able to reproduce the issue?imaGuru commentedon Jul 26, 2025
Unfortunately, yes. The issue persists, even with fbdev=0.
Arch Wiki mentions:
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.
Binary-Eater commentedon Jul 26, 2025
Thanks @imaGuru. That suggests to me that there may be other paths in
nvidia-drmwhere 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.nvidia-drmwithmodeset=0parameterIf my theory is correct, I would expect this to enable the GPU to stay in RTD3.
imaGuru commentedon Jul 28, 2025
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 :(
Binary-Eater commentedon Jul 28, 2025
Thanks @imaGuru ,
That's quite peculiar. The reason I wanted to run this experiment is because with
modeset=0,nvidia-drmdoes almost nothing. Would you mind sharing anvidia-bug-report.shdump in the repro-ing case withmodeset=0?imaGuru commentedon Jul 29, 2025
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
francoism90 commentedon Jul 30, 2025
@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=0to verify if this solves the issue, because it wakes my laptop every time after going to sleep (NVIDIA Optimus powered).imaGuru commentedon Jul 30, 2025
@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.
francoism90 commentedon Jul 31, 2025
@imaGuru Confirmation here - the
nomodeset=0doesn'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).
imaGuru commentedon Aug 4, 2025
@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?):
francoism90 commentedon Aug 4, 2025
@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.
83 remaining items
Mulukulum commentedon Aug 23, 2026
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.
ryanabx commentedon Aug 23, 2026
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"?
Mulukulum commentedon Aug 26, 2026
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.
francoism90 commentedon Aug 26, 2026
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. :)
Mulukulum commentedon Aug 27, 2026
@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=0x02set, and I observe no oscillation.Lyude commentedon Aug 27, 2026
Oh that's awesome! Thank you for confirming this
Mulukulum commentedon Sep 7, 2026
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.
ryanabx commentedon Sep 7, 2026
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 🤷♂️
jindalpratik commentedon Sep 18, 2026
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:
ryanabx commentedon Sep 18, 2026
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?
jindalpratik commentedon Sep 21, 2026
Yep already built it and confirmed it works.
inigo001 commentedon Sep 24, 2026
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.
Could this also be added to take the 4070 into account?
Thank you very much for finding the fix for this bug.
codyit commentedon Nov 26, 2026
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.
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_NAMEmight be the cleaner machine unique identifier here in the first place:83DHfor16AHP982Y9for16APH883DXfor15AHP9. Quite sure it's a universal convention across Lenovo products, I've included platform driver grep result at the end.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:
grep result:
alejor commentedon Nov 26, 2026
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
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
After discovering this, I could put videomemory off and no issues, it got D3Cold flawlessly
Thank you for all the time spent figuring this out
codyit commentedon Nov 29, 2026
@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._E10reads PCI configuration offset0x78throughM017, puts the upper 16 bits inETP0, and sendsNotify(\_SB.PCI0.GPP0, 0x02)—an ACPI Device Wake notification—whenETP0is1or3.I instrumented the AML read during the runs that loop the RTD3. The first value was
0x00010009(ETP0=1); later reads were0x00030009(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 was0x0009on this system. Linux PCI register definitionsThat 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:
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"]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 existingbCanUseGc6decision, and valid JT/MSHYB capability. It has no GPU device-ID predicate. ThebCanUseGc6guard 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.