Synapse 4 (4.0.827.114): RazerAppEngine leaks GDI objects to the 10,000 limit → system-wide UI stutter and input lag on Windows 11 | Razer Insider
Skip to main content
Question

Synapse 4 (4.0.827.114): RazerAppEngine leaks GDI objects to the 10,000 limit → system-wide UI stutter and input lag on Windows 11

  • October 12, 2026
  • 5 replies
  • 26 views

Summary
The main RazerAppEngine.exe process (the one without --type=) starts leaking GDI objects about 40 minutes after launch, at a steady ~70 objects/minute, until it hits the default per-process limit of 10,000. While the leak is active, the whole Windows UI stutters: taskbar, window dragging, app rendering. The input-language hotkey (Alt+Shift) also becomes unreliable. Restarting RazerAppEngine immediately resets the count and the symptoms disappear. Measured over 3 days with per-minute logging plus an ETW kernel trace.

Environment

  • Windows 11 26H2, build 26300.9550
  • NVIDIA RTX 5080, driver 32.0.16.1714; two monitors (240 Hz + 60 Hz)
  • Razer Synapse 4.0.827.114, autostart (--url-params=apps=synapse --launch-force-hidden=synapse --autoStart=1), 10 RazerAppEngine processes
  • Only Razer device connected: BlackShark V2 Pro (USB)

Measurements (per-minute log, main RazerAppEngine process)

  • After start: 39–82 GDI objects, stable. USER objects stable at ~170. Private memory stable at 160–300 MB, so this is not a RAM leak.
  • About 40 min after logon the GDI count starts growing linearly, ~70 objects/min (76 → 325 → 2,049 within 30 min). It reaches 10,000 within roughly 2–2.5 hours and stays pinned there.
  • Session-wide GDI count grew from ~9,000 to ~21,800 accordingly.

Correlation with UI responsiveness
Explorer taskbar response to WM_NULL was probed every 2 s:

  • Before the leak starts: 0–3 ms.
  • From the very minute the leak starts: 8–9 of 30 probes per minute exceed 40 ms, up to ~1 s.
  • Once at 10,000: every minute affected, 35–65% of probes over 40 ms, peaks of 3.5–5 s. This continued for ~46 hours without interruption.
  • Restarting RazerAppEngine reset the GDI count to ~80, and the stutter and Alt+Shift problem disappeared immediately. Reproduced twice.
  • Additional observation: on one occasion the stutter mostly stopped earlier, when Windows killed a hung ShellExperienceHost.exe, while RazerAppEngine was still at 10,000. This suggests the leak interacts with the shell / notification area. That part is a hypothesis.

ETW trace (WPR, CPU + context switch + GPU + DWM)

  • UI threads of dwm.exe and of applications repeatedly block on WrResource waits of 52–60 ms. Each time they are released by a thread executing in win32kfull.sys/win32kbase.sys, i.e. contention on the win32k lock.
  • Frame presentation (PresentMon) shows matching periodic 54–67 ms gaps.
  • Ruled out: CPU starvation (scheduler latency ≤ 13 ms), DPC/ISR (max 2.9 ms), disk I/O (disks idle), GPU throttling.

Not determined
Which code path creates the leaked objects. A tray-icon or bitmap update is suspected but not confirmed. I can collect a GDI object type breakdown or an ETW trace with stacks if needed.

Workaround
Restarting RazerAppEngine when its GDI count starts rising. Note: raising GDIProcessHandleQuota in the registry would only let the leak grow further.

Expected
The GDI object count of RazerAppEngine should stay flat during normal operation.

5 Replies

  • Author
  • Insider Mini
  • October 12, 2026

Update — root cause narrowed down. The leaked objects are device contexts (DC). Other GDI types and USER objects stay flat. The leak starts about 2 s after the display is turned off on a locked PC: bursts of +5…+8 DCs every 6–7 s, ~70/min. It stops as soon as the display turns back on, but the leaked DCs are never released. Reproducible with Win+L and waiting for display-off: 76 → 174 GDI objects in 77 s, all DCs. Synapse logs are silent during the leak.


  • Author
  • Insider Mini
  • October 12, 2026

Update 2 — call stacks (ETW, CPU sampling with stacks, 31 s of display-off). The CrBrowserMain thread of the main RazerAppEngine process spends ~64% of its samples in win32k. It is repeatedly calling, via user32: GetDisplayConfigBufferSizes, QueryDisplayConfig, DisplayConfigGetDeviceInfo, GetHDevName and BuildHwndList. These hold the display mode-change lock (NEEDDYNAMICMODECHANGESHARELOCK) and the USER critical section. Within the same 31 s, threads of explorer.exe, Taskmgr.exe, chrome.exe, csrss.exe and others were blocked on WrResource for up to ~500 ms, and dwm.exe waited up to ~516 ms; each of these waits was released by RazerAppEngine threads. Other modules seen in the gdi32/win32k stacks: SysUtilsNative.dll, detection.node, mscms.dll. The display enumeration runs in ~6 s cycles only while the display is off, and the device contexts it creates are never released.


  • Author
  • Insider Mini
  • October 12, 2026

Update 4 — root cause is in Chromium 146 (Electron 41.2.0), not in Synapse code. RazerAppEngine.exe is a stock Electron 41.2.0 binary (PDB matches symbols.electronjs.org). Symbolized stacks show the leaking call path: ScreenWin::OnWndProc → ScreenWin::UpdateAllDisplaysAndNotify → GetDisplayInfosFromSystem → GetDC(NULL). In Chromium 146.0.7680.179, ui/display/win/screen_win.cc:475-476 does ::EnumDisplayMonitors(::GetDC(HWND_DESKTOP), ...) and never calls ReleaseDC. Every display re-enumeration leaks one screen DC. It is triggered by WM_DISPLAYCHANGE, WM_ACTIVATEAPP and WM_SETTINGCHANGE(SPI_SETWORKAREA), which arrive every few seconds while the monitors are off. Chromium already fixed this by 148.0.7778.0 (base::win::ScopedGetDC). Please update Electron to a Chromium ≥148 based release, or backport the fix.


  • Author
  • Insider Mini
  • October 12, 2026

Update 5 — fix available upstream. The bug is still present in the latest Electron 41 release (41.10.7, Chromium 146.0.7680.216, screen_win.cc:476). It is fixed in Electron 42 and later: Electron 42.11.12 uses Chromium 148.0.7778.280, where the call is wrapped in base::win::ScopedGetDC. Electron 41 no longer receives updates. Moving Synapse to Electron 42+ resolves the leak.


  • Author
  • Insider Mini
  • October 12, 2026
You can buy me a cup of coffee)