Skip to content
KirodevBackPublic

About

tray app that puts discord and spotify in efficiency mode to save ram and cpu

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

logo shut up

shut up is a tiny tray app that puts discord, spotify and your browser in efficiency mode so they stop eating your ram and cpu in the background. right click the icon, go to shut it up, tick what you want to calm down. untick it (or quit) and everything goes back to normal.

why

discord is rewriting its desktop app in rust to replace electron (discord phoenix), and the early build uses way less ram. i couldn't wait for it to come out, so i made this.

discord phoenix at 290 mb in task manager
discord phoenix early build in task manager (screenshot from the articles below)

once discord phoenix is out i'll stop updating shut up, since the electron version of discord will be dropped anyway.

what it does

on windows it's the same thing as the "efficiency mode" button in task manager, plus a bit more:

  • priority goes to idle and ecoqos is turned on, so the cpu runs them slow and cool.
  • their memory priority is set to very low and their working set gets trimmed, so the ram is given back.
  • it checks again every 30 seconds, so new processes (like a new browser tab) get caught too.
  • your choice is saved, so it's applied again when your pc starts.

on linux it does the same with SCHED_IDLE, nice 19, idle io priority and process_madvise to page the memory out.

on macos it puts them in background mode (same as taskpolicy -b) with nice 20, so the cpu, disk and network go easy on them. macos doesn't let an app empty another app's ram, so there it's the cpu part only and the system compresses their memory on its own.

how much does it save?

measured on my pc with task manager, ram of all the processes added up:

app before after
discord ~800-1600 mb ~100-600 mb
spotify (playing music) ~600-900 mb ~100-400 mb

discord at 144 mb with shut up
discord with shut up on, i'm just sitting in a discord conversation and nothing more

discord at 133 mb and librewolf at 100 mb with shut up
discord and librewolf with shut up on

it depends on what they're doing (in a call discord takes back the ram it needs), so your numbers won't be the same. shut up itself sits at around 350 kb.

clean cached ram

there's also clean cached ram in the menu. it empties the ram your system keeps in cache (the standby list on windows, the page cache on linux, purge on macos) so it shows up as free again.

a popup warns you first: it asks for admin rights, and right after it some stuff can stutter for a few seconds while it loads back what it needs. don't do it while you're in game.

download

everything is on the releases page.

  • windows: grab shut-up-setup.exe and run it. it installs for your user only (no admin), starts with windows and shows up in "installed apps" so you can remove it.
  • macos: grab shut-up-macos.zip, unzip it and drag Shut up.app to your applications folder. it lives in the menu bar and starts with your mac. the app isn't signed with an apple account, so the first time right click it and hit open.
  • linux: grab shut-up-linux-x86_64, or build it with the script below.

configuration

on first launch a config.ini is created in %APPDATA%\shut-up (~/.config/shut-up on linux, ~/Library/Application Support/shut-up on macos):

  • refresh_seconds: how often it applies the settings again (minimum 5).
  • trim_memory: empties their ram, turn it off if you only want the cpu part.
  • restore_on_exit: puts everything back to normal when you quit.
  • [Discord], [Spotify], [LibreWolf]...: each section is an entry in the menu, processes is the list of exe names.

out of the box you get discord, spotify, librewolf, firefox, chrome, edge, brave, opera, vivaldi, claude and visual studio code. remove the sections you don't use if you want a shorter menu.

if you tick an app that isn't running or isn't installed, a popup tells you. it stays ticked and kicks in as soon as you open the app.

when an update adds new apps, shut up adds them to your config.ini on its own and keeps your changes. if you delete a section it won't come back.

careful with visual studio code: its exe is just code.exe, so make sure no other app you use runs as code.exe too, or it'll get shut up as well.

want to shut up another app? add a section:

[Steam]
processes = steam, steamwebhelper

it works best on apps built with electron, cef or webview2, they're basically a whole browser running in the background. some you can add:

[Teams]
processes = ms-teams, teams

[Slack]
processes = slack

[WhatsApp]
processes = whatsapp

[Epic]
processes = epicgameslauncher, epicwebhelper

even after discord phoenix comes out, shut up still works for all of these.

building

you need rust and, for the installer, nsis.

cargo build --release
makensis installer.nsi

linux

you need a desktop with a tray (kde, xfce, cinnamon, or gnome with the appindicator extension).

./install.sh

it goes to ~/.local/bin, starts with your session, and asks for sudo once to give it cap_sys_nice (needed to free the ram and put the priority back). ./uninstall.sh removes it.

macos

to build it yourself you need the xcode command line tools (xcode-select --install).

./macos/install.sh

it builds Shut up.app, puts it in ~/Applications and opens it. ./macos/uninstall.sh removes it.

more

i tested it with discord voice calls, screen streaming and camera on and everything still works fine, so you can leave it on. ty! :3

sources

about discord phoenix:

license

you can do whatever you want with it except sell it. if you use it or fork it, credit @metixw or link this repo. see LICENSE.

About

tray app that puts discord and spotify in efficiency mode to save ram and cpu

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages