-
Notifications
You must be signed in to change notification settings - Fork 243
Description
Avoid duplicates
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issues tracker for a bug report similar to mine, in vain
Ferdium Version
7.1.2-nightly (develop branch, commit 655af84)
What Operating System are you using?
Linux
Operating System Version
Linux 7.0.0-070000rc4-generic
What arch are you using?
x64
Last Known Working Ferdium version
Never worked — this is a default configuration issue that has existed since the setting was introduced.
Expected Behavior
Services should hibernate automatically after inactivity. The hibernateOnStartup: true default setting should cause non-active services to start hibernated. Inactive services should unload their webview renderer processes, freeing ~170MB per service.
Actual Behavior
Hibernation never activates for any service by default. Users see 2-3GB+ memory usage with all service renderer processes running permanently, regardless of inactivity. The hibernateOnStartup setting appears to work (it sets isHibernationRequested = true) but has no actual effect.
Root cause chain:
DEFAULT_SERVICE_SETTINGS.isHibernationEnableddefaults tofalse(src/config.ts:628)canHibernateis computed asthis.isHibernationEnabled && !this.isMediaPlaying(src/models/Service.ts:315-316) — always returnsfalsewhen hibernation is disabledisHibernatingis computed asthis.canHibernate && this.isHibernationRequested(src/models/Service.ts:319-320) — alwaysfalsebecausecanHibernateisfalse_hibernate()in ServicesStore early-returns on!service.canHibernate(src/stores/ServicesStore.ts:1174)- The
hibernateOnStartup: trueglobal default setsisHibernationRequested = truein the Service constructor (src/models/Service.ts:247-248), but this flag is ignored becauseisHibernatingrequirescanHibernateto betrue
The result: Every service runs a permanent Chromium renderer process (~170MB each) regardless of whether the user has interacted with it. With 8 services, that's ~1.4GB in renderer processes alone, plus overhead.
Secondary issue: Even when a user manually enables hibernation per-service, the wakeUpStrategy: '300' default auto-wakes services after 5 minutes, creating a pointless hibernate/wake cycle that defeats memory savings.
Steps to reproduce
- Install Ferdium fresh, add 5+ services
- Note that
hibernateOnStartupistrueby default in Settings - Restart Ferdium
- Open system monitor — all service renderer processes are running
- Wait 5+ minutes without touching any service
- Check system monitor again — all renderer processes still running, no services hibernated
- Check any service's edit screen — "Enable Hibernation" is unchecked by default
Related Issues
- Possible memory issues/leak #2197 — "Possible memory issues/leak" (symptom of this root cause)
- Bug: Ferdium spawns multiple processes and clogs the CPU #219 — "Ferdium spawns multiple processes and clogs the CPU" (partially related)
- Bug: Ferdium main tab (the App itself) consumes more than 1Gb of memory #647 — "Main tab consumes more than 1GB" (symptom)
- Feature: Set memory limits for services and auto reload on exceeding them #606 — "Set memory limits for services" (feature request that wouldn't be needed if hibernation worked)
- Ferdium cache more than 100 Gb #1814 — "Cache more than 100GB" (related to services never being cleaned up)
Proposed Fix
- Change
isHibernationEnableddefault fromfalsetotrue— makes hibernation work out of the box - Change
wakeUpStrategydefault from'300'to'0'— services stay hibernated until user clicks on them - Reduce
hibernationStrategyfrom'300'to'120'— hibernate after 2 min instead of 5 - Add
backgroundThrottling=1to webview webPreferences — throttle inactive service tabs before hibernation kicks in - Change
isWakeUpEnableddefault fromtruetofalse— consistent with wakeUpStrategy change
Expected savings: ~1.2GB for a typical 8-service setup (7 hibernated × ~170MB each).
Note: These are DEFAULT changes only. Existing users with configured services won't be affected — their per-service settings are persisted in the database.
Additional information
PR incoming with the fix.