Auto hibernate inactive tabs
-
You actually don't need a mod for this, but you do need to enable an "experimental" flag:
vivaldi://flags/#high-efficiency-mode-available
Set to your preferred hibernation time. Restart.Then:
chrome://settings/performance
Enable Memory saver. Tabs will hibernate on a timer.Note that this flag is Enabled by default in Chrome 112, I don't know why it isn't available by default in Chromium 112. Maybe Google just wants to keep this feature a "secret" to only Chrome users...
All that's lacking is for Vivaldi to implement a Settings UI for it.
-
@Pathduck Thank you! This works very well. I'll need to make a note to turn these settings off if Vivaldi ever offers this feature natively.
-
@Aniexiety I don't believe this mod is actually working in its current state.
While
tab.lastAccessed
works in Firefox, it is not valid in Chromium based browsers.const elapsedTime = Date.now() - tab.lastAccessed;
results inNaN
.I am not sure if there is an equivilant API option, so you might need to write your own log of last accessed times to storage.
Edit: I also wouldn't suggest putting this file in the
user_files
directory. Files in that folder will show up in the Page Actions dialog. Enabling it as a Page Action won't do anything, so it probably shouldn't be there.You can create your own folder in
Vivaldi\Application[VERSION]\resources\vivaldi
or just put the js file in the same directory asbrowser.html
. -
Said:
I'll need to make a note to turn these settings off if Vivaldi ever offers this feature natively.
You will not have to turn it off. Because if Vivaldi implement a Settings UI for it, will only be making visible a feature that is already a native feature.
-
@Pathduck said in Auto hibernate inactive tabs:
You actually don't need a mod for this, but you do need to enable an "experimental" flag:
The flag seems not available in the newest snapshot?
-
@g_bartsch
Hi, this is not experimental anymore, Memory Saver is native now.
Chrome://settings/performanceCheers, mib
-
@mib2berlin Thank you Sir. I had found that by looking at the second link you posted.
But there is now no option to set a hibernate time?
-
@g_bartsch
Hi, iirc only Edge have this feature now, Chromium removed the flags to enable this.Cheers, mib
-
@mib2berlin Thank you.
I think it's here in Vivaldi working? No?
-
@g_bartsch
Yes this is working, I meant the hibernation time setting. -
@mib2berlin I hope Vivaldi will expose that setting. I'm glad hibernation is working but don't feel happy having no idea how long for it is.
-
vivaldi://flags/#memory-saver-multi-state-mode
To Enabled, Restart.Then in
chrome://settings/performance
You're welcome
-
Interestingly, the performance settings seem to live in
Local State
, meaning they are active for all profiles.
Probably because they are still linked to the experimental flag being set.For those brave enough, you can "fine-tune" the value in the JSON directly:
"performance_tuning": { "high_efficiency_mode": { "state": 2, "time_before_discard_in_minutes": 1 } },
-
@Pathduck said in Auto hibernate inactive tabs:
You're welcome
Indeed! Thank you so much; this is nice!!
-
@Pathduck said in Auto hibernate inactive tabs:
vivaldi://flags/#memory-saver-multi-state-mode
To Enabled, Restart.Then in chrome://settings/performance
This memory management system is working really well. Previously after using Vivaldi for some length of time memory and CPU usage would go way up and choosing hibernate background tabs wouldn't free up all the memory back to the way it was just after a restart. But using these flags, and a short hibernate setting, memory usage just doesn't grow. CPU usage is particularly low. I'm not sure why hibernate background tabs can't free up all the memory that was used but setting these flags prevents memory gobbling up before it even happens. I hope before too long Vivaldi exposes these settings within its settings section because that will make it so much easier for people to discover and use.
-
@g_bartsch
Hi, memory is one thing but CPU usage should not rise up using Vivaldi over time.
Vivaldi use 0% CPU after days of usage if it is idle, if it use more and more CPU something is wrong.Cheers, mib
-
@mib2berlin said in Auto hibernate inactive tabs:
Hi, memory is one thing but CPU usage should not rise up using Vivaldi over time.
Thanks. I'm not sure what I was observing but CPU usage now is extremely low. In my case I can't see it go to zero but I'm seeing 0.07 at times. Obviously it fluctuates even at idle. I do have four windows open with many workspaces containing many tabs.
-
Does this auto-hibernating feature also hibernate tabs that are currently playing media? I haven't bothered to test it yet, maybe some of you have any experiences about it. If so, is there a way to prevent hibernating tabs that are playing media?
Thanks!
-
@intMeinVoid
Hi, you can add pages to a white list to keep them working.Cheers, mib
-
@mib2berlin Is this a beta feature? I'm not seeing the whitelist option in my release build ?
6.7.3329.31 (Stable channel) (64-bit)