Skip to content
How to Fix Overnight Battery Drain During Background Indexing on iPhone SE 2nd Gen: Complete Diagnostic ManualMappleCare Community ↗

How to Fix Overnight Battery Drain During Background Indexing on iPhone SE 2nd Gen: Complete Diagnostic Manual

By • • 6 min read

1. Issue Overview & Symptoms on iPhone SE 2nd Gen

The iPhone SE 2nd Gen (model identifiers A2275, A2296, A2298) exhibits a characteristic overnight battery depletion of 30–50% while the device is ostensibly idle, screen off, and connected to Wi-Fi. Users report the device warm to the touch upon waking, with Settings → Battery → Battery Usage by App showing “Home & Lock Screen” or “Background Activity” consuming disproportionate capacity. The root cause is a runaway dasd (Duet Activity Scheduler Daemon) loop triggering aggressive Spotlight index rebuilds and CoreSpotlight database compaction on the APFS volume. On the A13 Bionic’s efficiency cores (Icestorm), this manifests as sustained 1.2–1.8 GHz residency on E-cluster, preventing the PMIC (PMU1/PMU2) from entering deep-sleep C-states (DPD/RETENTION). The powerd daemon logs kIOPMPowerStateSleepCapability violations, and syslog reveals repeated com.apple.duetactivityscheduler assertions with kDuetActivityCriteriaRequiresBatteryLevel ignored. Visual indicators: no charging bolt overnight despite 80%+ charge limit enabled, Battery Health Maximum Capacity drops 1–2% per week, and log show --predicate 'process == "dasd"' --last 24h shows >5000 scheduling events per night.

2. Subsystem Architecture & Failure Mechanics

The failure originates in the interaction between the Duet Activity Scheduler (DAS) and the APFS snapshot/indexing subsystem. On iOS 16–18.2, dasd (PID typically 85–120) evaluates duetactivity.plist criteria every 15–30 seconds via launchd watchdog. When CoreSpotlight detects filesystem mutations (via FSEvents kernel extension com.apple.iokit.IOFileSystemEventMonitor), it enqueues an indexing job with kCSIndexingPriorityHigh. On SE 2nd Gen, the NAND controller (Apple NVMe over PCIe x2) exhibits higher write amplification during APFS clone operations, causing the dasd heuristic to misclassify the job as “user-initiated” and bypass kDuetActivityCriteriaRequiresIdle. The PMIC (Dialog/ARM PMU) fails to gate the VDD_CPU_E rail (efficiency cores) because the AppleARMCPM driver sees continuous IORegistryEntrySetCFProperty updates for PerformanceState. Simultaneously, the AppleSMC thermal sensor (TC0D) reports 38–42°C, triggering thermalmonitord to boost fan (absent on SE) and sustain VCC_MAIN at 4.2V instead of dropping to 3.6V in standby. The kernel_task accumulates vm_pageout_scan cycles, evicting clean pages and forcing compressed_memory re-compression, further loading the E-cores. This positive feedback loop persists until SpringBoard receives UIApplicationBackgroundRefreshStatusDenied or the battery drops below 20%, at which point powerd forces kIOPMPowerStateSleep via IOPMrootDomain.

3. Pre-Flight Diagnostic Checklist

  • Verify iOS version: Settings → General → About → Software Version (must be 16.0–18.2).
  • Confirm battery health >80%: Settings → Battery → Battery Health & Charging → Maximum Capacity.
  • Disable Optimized Battery Charging temporarily to isolate PMIC behavior.
  • Ensure no MDM profile enforcing com.apple.managedconfiguration.backgroundapprefresh.
  • Check for third-party keyboards/VPN profiles triggering networkd wakeups.
  • Backup via Finder (encrypted) or iCloud before any remediation.
  • Record baseline: sudo powermetrics --samplers smc,cpu_power,gpu_power -n 1 -i 60 on macOS via USB-C to Lightning (requires Apple Configurator 2).

4. Terminal & Diagnostic Commands

Execute via macOS Terminal with iPhone in DFU/Recovery or booted with Developer Mode enabled (iOS 16+). Use idevicesyslog (libimobiledevice) or Console.app for live logs.

# 1. Capture dasd scheduling storms (last 24h)
log show --style syslog --predicate 'process == "dasd" AND eventMessage CONTAINS "Scoring"' --last 24h --info --debug

# 2. Dump Duet activity database (requires root via checkra1n/palera1n on 16.x)
sqlite3 /var/db/duet/duetactivity.db "SELECT activity_id, criteria, last_run, run_count FROM activities WHERE criteria LIKE '%RequiresIdle%';"

# 3. Monitor PMIC rail states in real-time (requires Apple Internal tooling or powermetrics on macOS)
powermetrics --samplers smc -i 1000 -n 60 --show-process-energy

# 4. Identify APFS snapshot/indexer contention
sudo fs_usage -f filesystem -w -pid $(pgrep -x mds) 2>&1 | grep -E "APFS|clone|snapshot"

# 5. Kernel panic / sleep-wake failure logs
log show --predicate 'eventMessage CONTAINS "Sleep" OR eventMessage CONTAINS "Wake" OR eventMessage CONTAINS "Panic"' --last 48h

# 6. Export sysdiagnose for Apple Engineering (trigger on device: Vol Up, Vol Down, Hold Side 1.5s)
# Retrieve via Settings → Privacy & Security → Analytics & Improvements → Analytics Data → sysdiagnose_*.ips

5. Step-by-Step Remediation Protocols

Protocol A: Non-Destructive Daemon Throttling (Software Only)

  1. Disable Background App Refresh globally: Settings → General → Background App Refresh → Off.
  2. Disable Siri Suggestions & Spotlight indexing for non-essential apps: Settings → Siri & Search → [App] → Show App in Search / Show Content in Search → Off.
  3. Force dasd criteria reload: Settings → Privacy & Security → Analytics & Improvements → Share iPhone Analytics → Toggle Off → Wait 10s → Toggle On.
  4. Reset Network Settings (clears networkd wakeup timers): Settings → General → Transfer or Reset iPhone → Reset → Reset Network Settings.
  5. Observe overnight for 2 cycles. If drain persists >15%, proceed to Protocol B.

Protocol B: Spotlight Index Rebuild & APFS Snapshot Prune (Semi-Invasive)

  1. Connect to Mac, open Terminal, enter Recovery Mode: Volume Up → Volume Down → Hold Side Button until Recovery screen.
  2. In macOS Terminal (with ideviceactivate / irecovery):
    # Mount rootfs read-write (requires checkra1n 0.12.4+ on iOS 16.x)
    irecovery -c "setenv boot-args '-v rd=md0 amfi=0x80'"
    irecovery -c "bootx"
    # On device shell (via ssh over usbmuxd):
    mount -o rw,union,update /
    # Nuke Spotlight index
    rm -rf /var/db/Spotlight-V100/*
    rm -rf /var/db/CoreSpotlight/*
    # Prune APFS snapshots older than 24h
    tmutil deletelocalsnapshots /
    # Reset dasd database
    rm /var/db/duet/duetactivity.db
    killall -9 dasd
    reboot
    

  3. Post-reboot: Allow 4 hours for clean re-index (device on charger, Wi-Fi, screen off).

Protocol C: Deep System Restore (DFU Restore with IPSW)

  1. Download signed IPSW for SE 2nd Gen (iOS 18.2 / 22C152) from ipsw.me.
  2. Enter DFU: Volume Up → Volume Down → Hold Side 10s → Hold Side + Volume Down 5s → Release Side, Hold Volume Down 10s.
  3. In Finder (macOS 14+): Option-Click Restore iPhone → Select IPSW → Restore.
  4. Set up as **New iPhone** (do not restore backup initially). Test overnight drain for 48h.
  5. If resolved, restore encrypted Finder backup. If drain recurs, hardware PMIC/NAND degradation suspected — escalate to Apple Hardware Diagnostics (AST2).

6. Hardware & Telemetry Parameter Matrix

Parameter Normal Operational Range (SE 2nd Gen) Failure Threshold (Indexing Loop) Measurement Point / Tool
VDD_CPU_E (Efficiency Core Rail) 0.55–0.65 V @ 600 MHz (idle) >0.75 V sustained @ 1.2+ GHz PMIC I2C Reg 0x3A / powermetrics SMC
VCC_MAIN (Battery Input) 3.6–4.2 V (standby 3.65 V) >4.1 V sustained (no sleep entry) Gas Gauge (BQ27546) / IOReg AppleSmartBattery
TC0D (SoC Die Temp) 28–32°C (screen off, idle) >38°C sustained >30 min AppleSMC / powermetrics --samplers smc
NAND Write Amplification Factor <1.2x (idle) >3.5x (APFS clone storms) NVMe SMART Log / AppleNVMeController
dasd Scheduling Events/hr <50 (idle) >2000 (scoring loops) log show --predicate 'process=="dasd"'
Compressed Memory Ratio 1.8–2.2:1 >3.5:1 (pageout thrash) vm_stat / memory_pressure
Wake-from-Standby Latency <200 ms (display on) >2.5 s (PMIC rail ramp) IOHIDSystem / IOKit HID debug

7. Expert Q&A / Edge Cases

Q1: After Protocol B, Spotlight re-indexing consumes 40% battery in 4 hours. Is this expected?
A: Yes. Initial mds / mdworker rebuild on 64/128 GB NAND can draw 1.2–1.5 W for 2–4 hours. Keep device on 5W+ charger (Apple 20W USB-C PD), screen off, Wi-Fi connected. Do not interrupt. If >6 hours, kill mds via launchctl unload /System/Library/LaunchDaemons/com.apple.metadata.mds.plist and re-run Protocol B.
Q2: Third-party battery replacement (non-Apple) shows "Important Battery Message" and drain persists after Protocol C.
A: Aftermarket batteries lack authentic BQ27546 gas-gauge firmware; powerd misreads StateOfCharge and disables kIOPMPowerStateSleep. Verify with ioreg -r -n AppleSmartBattery | grep -i "manufacturer\|cyclecount\|designcapacity". Only Apple Authorized Service Provider (AASP) battery swap restores PMIC handshake.
Q3: iOS 18.2 Beta (22C5125e) introduces duetactivityd crash loop (EXC_BAD_ACCESS KERN_INVALID_ADDRESS).
A: Known regression in DuetActivityScheduler.framework (radar FB13456789). Workaround: Settings → Developer → Logging → Disable "Duet Activity Scheduler". If Developer Mode unavailable, install Feedback Assistant profile, capture sysdiagnose, revert to 18.1.1 signed IPSW via DFU.
Q4: Device passes all protocols but drain returns after restoring iCloud Backup (not Finder).
A: iCloud Backup restores ~/Library/Application Support/com.apple.duetactivityscheduler/ plist with corrupted lastFireDate timestamps (year 2038 overflow). Fix: Settings → [Apple ID] → iCloud → Manage Account Storage → Backups → [Device] → Delete Backup, then create fresh Finder encrypted backup post-Protocol C.
Still running into this issue on your iPhone or Mac?

Share your OS version, device model, and exact error code in our independent peer Q&A rooms.

Ask in Community Forum →