Nvidia on Hybrid laptops while on battery goes to D0 state randomly wasting battery life #1201
Replies: 2 comments
|
I reproduced the periodic wakes on a Zephyrus G14 (GA403UI, RTX 4070): the firmware's NVPCF battery notification wakes the suspended GPU for ~20 s each time. I submitted a fix that defers the notification until the GPU next resumes instead of waking it. See #1299 (#1181 is an alternative that drops the notifications instead). |
|
OS: NixOS 26.05 (Yarara) x86_64 Root cause and a firmware-level workaround for the battery-triggered dGPU wakeups (NVPCF)Same symptom as #860 and as this discussion: on battery the dGPU leaves D3cold roughly System
That last point matters: the GPU is being woken up to service a subsystem the machine Step 1 — it is not userspace
Step 2 — the kernel says who resumes itIdentical to the stack in #860, on a much newer kernel and driver. So the firmware sends Step 3 — what the firmware actually doesDumping and disassembling the DSDT shows the exact path. The EC query handler Method (_QB6, 0, NotSerialized)
{
Sleep (0x64)
STPL ()
}
Method (STPL, 0, NotSerialized)
{
If ((FTBL == 0x02))
{
If ((RSOC < 0x32)) // RSOC = relative state of charge, i.e. battery %
{
^^^^NPCF.TPPL = One
DBDI () // dynamic boost disable
}
Else
{
^^^^NPCF.TPPL = 0x2CEC
DBEN () // dynamic boost enable
}
}
ElseIf ((FTBL == Zero))
{
^^^^NPCF.TPPL = 0x00017318
^^^^NPCF.DBDC = One
}
Sleep (0x64)
Notify (NPCF, 0xC2)
Sleep (0x64)
Notify (NPCF, 0xC0)
}So on every change of the charge percentage the firmware recomputes the GPU power
Workaround: drop the STPL call from the battery query handlerExtract the tables, disassemble, and comment out the call: Method (_QB6, 0, NotSerialized)
{
- Sleep (0x64)
- STPL ()
+ // Sleep (0x64)
+ // STPL ()
}Bump the OEM revision in the header so it is obvious which table is loaded: -DefinitionBlock ("", "DSDT", 2, "_ASUS_", "Notebook", 0x01072009)
+DefinitionBlock ("", "DSDT", 2, "_ASUS_", "Notebook", 0x0107200A)Recompile with What this costs
For anyone not running CaveatsThis is a firmware override: it taints the kernel, has to be redone after a BIOS update, Suggested fix in the driverThe original report in #860 already pointed at it: It is worth stressing that on this system the wakeups happen with Related: #860 (closed with no comment and no fix). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have spent too much time trying to figure out, why does my nvidia gpu keep waking up when nothing is triggering it when on battery. When the laptop is plugged in to power, it doesn't randomly wake up the Nvidia GPU.
How to reproduce:
The Nvidia DGPU also always wakes up when charger is plugged in or removed and when power profile is changed. Maybe these are all related?
I really care to have this fixed. As I have two laptops (G16 with rtx4080 and G14 with rtx4060) and both laptops have this issue.
I have accidentally found this issue #860 Maybe this is the issue as others also complain about the same. There is no solution provided. Is it possible to get this solved?
OS: CachyOS x86_64
Host: ROG Zephyrus G16 GU605MZ_GU605MZ (1.0)
Kernel: Linux 7.0.11-1-cachyos
Uptime: 8 hours, 47 mins
Display (SDC41A3): 2560x1600 @ 1.75x in 16", 60 Hz [Built-in]
DE: KDE Plasma 6.6.5
WM: KWin (X11)
CPU: Intel(R) Core(TM) Ultra 9 185H (22) @ 5.10 GHz
GPU 1: NVIDIA GeForce RTX 4080 Max-Q / Mobile [Discrete]
GPU 2: Intel Arc Graphics @ 2.35 GHz [Integrated]
Memory: 10.89 GiB / 30.75 GiB (35%)
All reactions