Kashyap Koshti

updated

1 month ago

KK

Kashyap Koshti

1 Rookie

•

9 Posts

•

46 Points

0

157

October 18th, 2026 08:24

[GUIDE / FIX] Solved: Dell G15 5511 High Battery Drain (28W–35W -> 11W–13W) & RTX dGPU Stuck in D0 State (6–7+ Hours Battery Life)

The Problem

Many Dell G15 (5511 / 5515 / 5520) owners experience terrible battery life (1.5 to 2.5 hours, even with the 86Wh battery upgrade) because total system discharge sits at 28W to 35W during light Chrome browsing.

Even when the NVIDIA System Tray icon says "Inactive" and NVIDIA Control Panel is set to Integrated Graphics, the NVIDIA dGPU remains secretly trapped in the D0 (Active) hardware power state instead of entering D3cold (0W off) across the PCIe bus—burning an extra 16W–18W continuously.

  • Kashyap Koshti

    1 Rookie

    •

    9 Posts

    •

    46 Points

    0

    0

    Posted October 18th, 2026 08:26

    Step 3: Run the Automated PowerShell Fix & Permanent Watchdog Installer

    This single script works on any laptop model and any NVIDIA driver version. It:

    • Unlocks and renames the bugged _DisplayDriverRAS.dll and _nvtopps.dll telemetry plugins to .bak inside your active DriverStore folder.

    • Enables PCIe Link State Power Management (Maximum Power Savings / ASPM) on battery.

    • Installs an automatic Windows Scheduled Task (DellG15_NVIDIA_D3_BatteryGuard) that runs at startup and whenever you unplug your charger (Kernel-Power Event ID 105), ensuring future NVIDIA driver updates never bring the problem back.

    How to run: Right-click the Windows Start button -> click Terminal (Admin) or PowerShell (Admin), paste the entire block below, and press Enter:

    # ==============================================================================
    # UNIVERSAL NVIDIA OPTIMUS D3COLD BATTERY GUARD & TELEMETRY FIX
    # Compatible with Dell G15 (5510/5511/5515/5520/5530) & all NVIDIA Optimus laptops
    # ==============================================================================
    
    $scriptDir = "C:\Scripts"
    $scriptPath = "C:\Scripts\NvidiaBatteryGuard.ps1"
    New-Item -Path "$scriptDir" -ItemType Directory -Force | Out-Null
    
    $guardCode = @'
    # 1. Disable Telemetry DLLs (_DisplayDriverRAS.dll & _nvtopps.dll) that block D3cold
    $activeDlls = @(Get-ChildItem -Path "C:\Windows\System32\DriverStore\FileRepository\nv*\Display.NvContainer\plugins\LocalSystem\*.dll" -ErrorAction SilentlyContinue | Where-Object { $_.Name -in "_DisplayDriverRAS.dll", "_nvtopps.dll" })
    if ($activeDlls.Count -gt 0) {
        Stop-Service -Name "NVDisplay.ContainerLocalSystem" -Force -ErrorAction SilentlyContinue
        Stop-Process -Name "NVDisplay.Container" -Force -ErrorAction SilentlyContinue
        Start-Sleep -Seconds 2
        Get-ChildItem -Path "C:\Windows\System32\DriverStore\FileRepository\nv*\Display.NvContainer\plugins\LocalSystem" -Directory | ForEach-Object {
            takeown /F $_.FullName /A /R /D Y | Out-Null
            icacls $_.FullName /grant Administrators:F /T /C /Q | Out-Null
        }
        foreach ($file in $activeDlls) {
            Rename-Item -Path $file.FullName -NewName ($file.Name + ".bak") -Force -ErrorAction SilentlyContinue
        }
        Start-Service -Name "NVDisplay.ContainerLocalSystem" -ErrorAction SilentlyContinue
    }
    
    # 2. Enforce PCIe ASPM Maximum Power Savings on Battery
    powercfg /setdcvalueindex SCHEME_CURRENT SUB_PCIEXPRESS ASPM 2
    powercfg /setactive SCHEME_CURRENT
    
    # 3. If on battery, restart NVDisplay.ContainerLocalSystem to flush stuck NVAPI handles
    $batt = Get-CimInstance -Namespace "root\wmi" -ClassName "BatteryStatus" -ErrorAction SilentlyContinue
    if ($null -ne $batt -and (-not $batt.PowerOnline)) {
        Restart-Service -Name "NVDisplay.ContainerLocalSystem" -Force -ErrorAction SilentlyContinue
    }
    '@
    
    Set-Content -Path "$scriptPath" -Value $guardCode -Force
    
    # Execute immediately for current session
    & powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$scriptPath"
    
    # Register Permanent Scheduled Task (Runs at Boot, Logon, and AC/Battery Unplug Event 105)
    $taskName = "DellG15_NVIDIA_D3_BatteryGuard"
    Unregister-ScheduledTask -TaskName "$taskName" -Confirm:$false -ErrorAction SilentlyContinue
    
    $action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File `"$scriptPath`""
    $triggerBoot = New-ScheduledTaskTrigger -AtStartup
    $triggerLogon = New-ScheduledTaskTrigger -AtLogOn
    
    $cimTriggerClass = Get-CimClass -ClassName "MSFT_TaskEventTrigger" -Namespace "Root/Microsoft/Windows/TaskScheduler"
    $triggerPowerEvent = New-CimInstance -CimClass $cimTriggerClass -ClientOnly
    $triggerPowerEvent.Enabled = $true
    $triggerPowerEvent.Subscription = "<QueryList><Query Id='0' Path='System'><Select Path='System'>*[System[Provider[@Name='Microsoft-Windows-Kernel-Power'] and EventID=105]]</Select></Query></QueryList>"
    
    $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -ExecutionTimeLimit (New-TimeSpan -Minutes 2)
    $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest
    
    Register-ScheduledTask -TaskName "$taskName" -Action $action -Trigger @($triggerBoot, $triggerLogon, $triggerPowerEvent) -Settings $settings -Principal $principal | Out-Null
    Write-Host "`n[SUCCESS] NVIDIA D3 Battery Guard applied and scheduled task installed!" -ForegroundColor Green
  • Kashyap Koshti

    1 Rookie

    •

    9 Posts

    •

    46 Points

    0

    0

    Posted October 18th, 2026 08:26

    Step 4: Verification Audit Script (Check Your Wattage & Settings)

    Wait 20–30 seconds after unplugging your charger (without keeping the NVIDIA Control Panel window open), then paste this read-only verification script into PowerShell (Admin) to verify all fixes and view your live battery discharge rate in Watts:

     

    Write-Host "`n=== NVIDIA OPTIMUS & BATTERY OPTIMIZATION AUDIT ===" -ForegroundColor Cyan
    
    Write-Host "`n[1] Telemetry Plugin Status:" -ForegroundColor Yellow
    $activeDlls = @(Get-ChildItem -Path "C:\Windows\System32\DriverStore\FileRepository\nv*\Display.NvContainer\plugins\LocalSystem\*.dll" -ErrorAction SilentlyContinue | Where-Object { $_.Name -in "_DisplayDriverRAS.dll", "_nvtopps.dll" })
    $bakDlls = @(Get-ChildItem -Path "C:\Windows\System32\DriverStore\FileRepository\nv*\Display.NvContainer\plugins\LocalSystem\*.bak" -ErrorAction SilentlyContinue)
    if (($activeDlls.Count -eq 0) -and ($bakDlls.Count -ge 2)) {
        Write-Host ("    [PASS] Telemetry DLLs are disabled (" + $bakDlls.Count + " .bak files verified).") -ForegroundColor Green
    } else {
        Write-Host "    [WARN] Active telemetry DLLs still present!" -ForegroundColor Red
    }
    
    Write-Host "`n[2] Background Services Check:" -ForegroundColor Yellow
    @("NVFrameViewSdk", "AWCCService", "OCButtonService", "DellTechHub", "DDVDataCollector") | ForEach-Object {
        $sName = $_
        $srv = Get-Service -Name "$sName" -ErrorAction SilentlyContinue
        if ($null -eq $srv) {
            Write-Host ("    [PASS] " + $sName + " : Not installed") -ForegroundColor Green
        } elseif ($srv.Status -eq "Stopped") {
            Write-Host ("    [PASS] " + $sName + " : Stopped (" + $srv.StartType + ")") -ForegroundColor Green
        } else {
            Write-Host ("    [WARN] " + $sName + " : RUNNING (" + $srv.StartType + ")") -ForegroundColor Red
        }
    }
    
    Write-Host "`n[3] PCIe Link State Power Management (DC/Battery):" -ForegroundColor Yellow
    $aspm = (powercfg /query SCHEME_CURRENT SUB_PCIEXPRESS ASPM) | Select-String "Current DC Power Setting Index"
    if ("$aspm" -match "0x00000002") {
        Write-Host "    [PASS] Maximum Power Savings enabled (0x00000002)" -ForegroundColor Green
    } else {
        Write-Host ("    [INFO] Current setting: " + $aspm) -ForegroundColor Yellow
    }
    
    Write-Host "`n[4] Scheduled Task Guard Status:" -ForegroundColor Yellow
    $t = Get-ScheduledTask -TaskName "DellG15_NVIDIA_D3_BatteryGuard" -ErrorAction SilentlyContinue
    if ($null -ne $t) {
        Write-Host ("    [PASS] Task Installed (" + $t.State + ")") -ForegroundColor Green
    } else {
        Write-Host "    [WARN] Scheduled Task not found!" -ForegroundColor Red
    }
    
    Write-Host "`n[5] Live Battery Discharge Rate:" -ForegroundColor Yellow
    $batt = Get-CimInstance -Namespace "root\wmi" -ClassName "BatteryStatus" -ErrorAction SilentlyContinue
    if ($null -ne$batt) {
        $watts = [math]::Round(($batt.DischargeRate / 1000), 2)
        $remWh = [math]::Round(($batt.RemainingCapacity / 1000), 2)
        if ($batt.PowerOnline) {
            Write-Host ("    [INFO] Laptop is plugged into AC Power (Remaining: " + $remWh + " Wh)") -ForegroundColor Cyan
        } elseif ($watts -le 16) {$estHours = [math]::Round(($remWh / [math]::Max($watts, 1)), 1)
            Write-Host ("    [PASS] Discharge Rate: " + $watts + " W (Remaining: " + $remWh + " Wh -> Est. ~" + $estHours + " hrs)") -ForegroundColor Green
        } else {
            Write-Host ("    [WARN] Discharge Rate is high: " + $watts + " W") -ForegroundColor Red
        }
    }
    Write-Host "`n===================================================`n" -ForegroundColor Cyan
  • Kashyap Koshti

    1 Rookie

    •

    9 Posts

    •

    46 Points

    2

    0

    Posted October 18th, 2026 08:25

    The Root Cause (And Common Myths That Actually Hurt Battery Life)

    1. NVIDIA Display Container Telemetry Leak (_DisplayDriverRAS.dll & _nvtopps.dll): Whenever the dGPU wakes up (unplugging from AC, opening NVIDIA Control Panel, or closing a game), two background telemetry plugins inside C:\Windows\System32\DriverStore\FileRepository\nv*\Display.NvContainer\plugins\LocalSystem\ (_DisplayDriverRAS.dll and _nvtopps.dll) hook an NVAPI handle to the GPU and fail to release it. This blocks the Windows kernel driver (nvlddmkm.sys) from shutting off the GPU's power rail (D3cold).

    2. NVIDIA App / Overlay & Dell Telemetry Services: The NVIDIA App (NVIDIA Overlay.exe / NVFrameViewSdk), Alienware Command Center (AWCCService), and Dell TechHub (DellTechHub) periodically ping the dGPU temperature registers, waking the PCIe bus every few seconds.

    3. Myth #1 — Disabling the NVIDIA GPU in Device Manager: Do NOT disable the dGPU in Device Manager. Disabling it unloads nvlddmkm.sys, leaving the PCIe slot in an unmanaged D0 Uninitialized hardware state where the GPU draws ~15W–18W continuously with no driver loaded to send the ACPI _OFF command.

    4. Myth #2 — Disabling Intel SpeedShift & Chrome Hardware Acceleration:

      • Keep Intel SpeedShift ENABLED: Windows 11's Best Power Efficiency slider relies entirely on Intel SpeedShift's hardware EPP register to drop CPU voltage in ~1ms. Disabling SpeedShift forces slow legacy ACPI P-states. (Note: Disabling Intel Turbo Boost on battery is fine to cap peak voltage spikes, but keep SpeedShift ON).

      • Keep Chrome Hardware Acceleration ENABLED: Disabling it forces your CPU cores to software-decode VP9/AV1 video, adding 8W–12W of CPU drain instead of letting the Intel UHD iGPU decode video for <1W.

  • Kashyap Koshti

    1 Rookie

    •

    9 Posts

    •

    46 Points

    4

    0

    Posted October 18th, 2026 08:25

    Step-by-Step Permanent Fix (Compatible With All NVIDIA Optimus Laptops)

    Step 1: Verify If Your NVIDIA GPU Is Stuck in D0

    1. Open Device Manager -> expand Display adapters -> double-click your NVIDIA GeForce RTX GPU.

    2. Go to the Details tab -> change the Property dropdown to Power data.

    3. Look at Current power state: at the margin: 0;">D0 = Your GPU is stuck awake and burning 15W–18W right now.

    4. D3 = Your GPU is properly powered off (0W).

    Step 2: Remove or Disable Background GPU Pollers

    1. NVIDIA App: Either uninstall NVIDIA App from Windows Settings -> Installed Apps (keeping NVIDIA Graphics Driver and NVIDIA Control Panel), OR open the NVIDIA App -> Settings -> turn NVIDIA Overlay OFF, and disable NVIDIA FrameView SDK service in services.msc.

    2. Dell Telemetry Services: Press Win + R, type services.msc, and set Dell TechHub, Dell Data Vault Collector, and Alienware Command Center Service (AWCCService) to Manual or Disabled (so they don't poll GPU sensors on battery).

    3. Screen Refresh Rate: Set your display to 60Hz while on battery (Settings -> System -> Display -> Advanced display).