-
-
Notifications
You must be signed in to change notification settings - Fork 60
Performance Rules
Sucrose can automatically Close, Pause, or Resume your live wallpaper based on what the system is doing — whether the workstation is locked, a fullscreen game is running, the laptop is on battery, CPU/GPU/RAM/network usage is high, and more. These rules are enforced by the background service Backgroundog and configured on the Settings → Performance page. This page explains every rule, its default action, the thresholds that trigger it, and the difference between a Heavy and a Light pause. For the per-setting reference table, see Settings Performance.
- How the performance engine works
- The three actions: Close / Pause / Resume
- Heavy vs Light pause
- Every condition and its default
- Thresholds
- The master switch and communication
- Rule evaluation order
- How resume works
- See also
The Backgroundog service (Sucrose.Backgroundog.exe) runs a continuous loop while a live wallpaper is active. On each tick it collects system telemetry (CPU, GPU, memory, network, battery, session/lock/screensaver state, fullscreen/focus detection) and then runs one of two checks:
-
Performance.Start()— when the wallpaper is running and not already paused/closed: tests whether any condition should trip (resume → pause/close). -
Condition.Start()— when already paused/closed: tests whether the triggering condition has cleared so it can resume.
When Backgroundog pauses or closes the engine it also notifies the Launcher tray icon (via a Signal Icon flag) so the tray reflects the paused state.
🖼️ Diagram needed: State machine showing Resume → (condition trips) → Pause or Close → (condition clears) → Resume, with Backgroundog evaluating conditions each tick.
Backgroundog auto-exits when there is no live wallpaper (after a few retries), and is started on demand. The master toggle that enables the whole system is Performance Counter (see below).
Every condition is configured with a PerformanceType value (Sucrose.Shared.Dependency.Enum.PerformanceType):
| Action | Meaning |
|---|---|
| Resume | Keep the wallpaper running normally (the rule is effectively disabled for that condition). |
| Pause | Pause rendering of the wallpaper while the condition holds. |
| Close | Kill the wallpaper engine for that condition (heaviest savings; the engine fully exits). |
A Close rule calls Live.Helper.Kill.Stop(); a Pause rule pauses (or suspends, see below) the live process. When the condition clears, a Close rule restarts the wallpaper and a Pause rule resumes it.
The Pause performance type setting (PausePerformanceType, default Light) controls how aggressive a Pause is:
| Mode | Behavior |
|---|---|
| Light | Pauses the wallpaper's rendering only. |
| Heavy | Additionally suspends the process threads of the live engine — including the browser child processes (WebView2 / CefSharp subprocesses whose command line contains "Sucrose") and the Aurora application process. This frees the most CPU but takes slightly longer to resume. |
Choose Heavy if you want maximum CPU savings (e.g. on a laptop or while gaming) at the cost of a slightly slower resume; choose Light for the quickest, least disruptive pause.
Each row below is a separate ComboBox on the Performance page. All keys are stored in Backgroundog.json. Conditions left at Resume never pause or close the wallpaper.
| Condition | Key | Default action | Triggers when… |
|---|---|---|---|
| Lock (workstation locked) | LockPerformance |
Close | You lock the workstation (Win+L). |
| Sleep | SleepPerformance |
Close | The system enters sleep. |
| Console (user switch) | ConsolePerformance |
Close | Fast user switching / another session takes the console. |
| Session (logoff) | SessionPerformance |
Close | The session logs off. |
| Screen Saver | ScreenSaverPerformance |
Pause | The screensaver starts. |
| Processor (CPU) | ProcessorPerformance |
Resume | CPU usage exceeds the threshold. |
| Graphic (GPU) | GraphicPerformance |
Resume | GPU usage exceeds the threshold. |
| Memory (RAM) | MemoryPerformance |
Resume | RAM usage exceeds the threshold. |
| Network | NetworkPerformance |
Resume | Network ping/upload/download crosses the threshold. |
| Battery | BatteryPerformance |
Resume | Battery charge drops below the threshold. |
| Battery Saver | BatterySaverPerformance |
Resume | Windows Battery Saver / energy saver is active. |
| Virtual (VM) | VirtualPerformance |
Resume | Running inside a virtual machine. |
| Remote (RDP) | RemotePerformance |
Resume | A remote desktop session is active. |
| Full Screen | FullScreenPerformance |
Resume | A foreground app is maximized/fullscreen (e.g. a game). |
| Focus | FocusPerformance |
Resume | The desktop is not the focused window. |
The default behavior, therefore, is: stop the wallpaper when you lock, sleep, switch user, or log off; pause it for the screensaver; and otherwise keep running (the resource/laptop rules are off until you set them).
The full set of conditions is enumerated by CategoryPerformanceType: Not, Lock, Focus, Sleep, Memory, Remote, Battery, Console, Graphic, Network, Session, Virtual, Processor, FullScreen, ScreenSaver, BatterySaver (16 members).
For the resource and network conditions you also set a threshold. All keys live in Backgroundog.json.
| Threshold | Key | Default | Range / unit |
|---|---|---|---|
| Processor usage | ProcessorUsage |
70 |
0–100 (%) |
| Graphic usage | GraphicUsage |
70 |
0–100 (%) |
| Memory usage | MemoryUsage |
80 |
0–100 (%) |
| Battery charge | BatteryUsage |
50 |
0–100 (%) |
| Upload value + unit |
UploadValue / UploadType
|
800 / Kilobyte
|
value 0–99999999; unit is a Skylark.Enum.StorageType
|
| Download value + unit |
DownloadValue / DownloadType
|
10 / Megabyte
|
value 0–99999999 |
| Ping value + host |
PingValue / PingType
|
100 / "Bing"
|
ping 0–1000 ms; host chosen from the available host list |
You can also pin which adapters are measured: Graphic adapter (GraphicAdapter, default auto/first) and Network adapter (NetworkAdapter, default auto/first).
The network condition type (
NetworkPerformanceType) can beNot,Ping,Upload, orDownload, so you can trip on round-trip latency or on bandwidth.
| Setting | Key | Default | Effect |
|---|---|---|---|
| Performance Counter | PerformanceCounter |
true |
The master monitor. When on, Sucrose starts the Backgroundog service; when off, no performance rules are evaluated and Backgroundog is killed. |
| Pause performance type | PausePerformanceType |
Light |
Heavy or Light (see above). |
| Communication type | CommunicationType |
Transmission |
Pipe, Signal, or Transmission — how Backgroundog talks to the wallpaper (also used to deliver the Audio/System data to web wallpapers). |
If you turn Performance Counter off, you lose the automatic Close/Pause behavior and the live data feed that powers audio-reactive web wallpapers.
Performance.Start() checks rules in this fixed order, and the first one that trips wins:
Lock → Focus → Sleep → Memory → Remote → Battery → Console →
Graphic → Network → Session → Virtual → Processor → FullScreen →
ScreenSaver → BatterySaver
Each rule:
- Is skipped if its action is
Resume. - Polls its condition for a number of seconds before tripping. Instant conditions (
MaxCount= 0) include Lock, Sleep, Console, Session, ScreenSaver; most others wait ~5 seconds; the resource conditions (Memory/Graphic/Processor/Battery/Network) trip on their thresholds. - On trip: records the active category, sets the internal
Conditionflag, and applies the action (Close kills the engine; Pause/Heavy suspends it).
When the wallpaper is paused or closed, Condition.Start() mirrors the logic: it polls the active category until the condition clears, then resumes —
- A Close rule restarts the wallpaper (
Run.Start()). - A Pause rule resumes rendering; a Heavy pause resumes the suspended process/threads.
The Launcher tray icon is updated back to its normal state once the wallpaper resumes.
Getting Started
- Installation
- System Requirements
- Quick Start
- Portal Interface Tour
- Updating Sucrose
- Uninstalling Sucrose
Wallpaper Types
Using Sucrose
- Managing Library
- Using Store
- Customizing Wallpaper
- Multi-Monitor
- Wallpaper Cycling
- Choosing Engines
- Performance Rules
- Theme, Tray & Startup
- Discord Rich Presence
Settings Reference
- Settings Overview
- Settings: General
- Settings: Personal
- Settings: Performance
- Settings: Wallpaper
- Settings: System
- Settings: Other
- Settings: All Keys
Creating Wallpapers
- Create Overview
- Create: Step By Step
- Create: Package Format
- Create: Customization Controls
- Create: JS Bridge
- Create: Audio API
- Create: System API
- Create: Property Listener & Filters
- Create: Web Architecture
- Create: Compatibility
- Create: Example Wallpapers
- Create: Sharing & Publishing
Engine Reference
- Engines Overview
- Engine: MpvPlayer
- Engine: VlcPlayer
- Engine: WebView
- Engine: CefSharp
- Engine: Nebula
- Engine: Vexana
- Engine: Xavier
- Engine: Aurora
- Engine Comparison
Automation & Command Line
Architecture & Internals
- Architecture Overview
- Lifecycle
- Commandog Dispatcher
- Single-Instance Mutexes
- IPC
- Backgroundog Service
- Crash Reporting
- Update Internals
- Property Service
- Undo Internals
Data, Files & Diagnostics
Building & Contributing
- Building From Source
- Repository Layout
- Shared Item Projects
- Code Conventions
- Preprocessor Symbols
- Publish Pipeline
- Bundle Installer Internals
- Extending Sucrose
- Contributing
- Translating with Localizer
- Localization Coverage
- Security Policy
- Privacy & Telemetry
Help & Support